feat(backend): initialize Node.js project with Express

This commit is contained in:
Paul Huliganga 2026-03-23 23:40:36 -04:00
parent 84648bf0fa
commit ed1f4f88be
6 changed files with 161 additions and 1 deletions

106
KICKOFF.md Normal file
View File

@ -0,0 +1,106 @@
# Recipe Manager — Project Kickoff Summary
**Created:** 2026-03-23
**Status:** ✅ Project harness complete, ready for agent sprint
---
## What Got Built
### 🎯 Core Harness Files
1. **PROJECT.md** — Product vision, constraints, success criteria, key questions
2. **ARCHITECTURE.md** — Tech stack decisions, data models, API design, deployment
3. **ROADMAP.md** — MVP → v1 → v2 milestones with acceptance criteria
4. **AGENT_INSTRUCTIONS.md** — How agents work (Orient → Plan → Implement → Verify → Commit → Report)
5. **README.md** — Project overview, quick start, tech stack
6. **TODO.md** — Task tracking checklist
7. **.gitignore** — Standard exclusions (node_modules, data/, .env, etc.)
### 🔧 Infrastructure
- Git repository initialized (branch: `main`)
- Directory structure created: `src/`, `docs/`, `tests/`
- First commit: Project harness baseline
---
## What This Enables
**Agent autonomy** — Codex can read context and work independently
**Clear scope** — MVP is well-defined, no feature creep
**Quality standards** — Testing, documentation, commit conventions documented
**Iterative development** — Small commits, frequent validation
**Decision tracking** — ADRs (Architecture Decision Records) in `docs/`
---
## Next Steps
### 1. Review & Answer Questions (You)
**From PROJECT.md:**
- **Domain/URL:** Should this be `recipes.paje.ca` or a subdirectory?
- **Initial users:** Just Anne & Elizabeth, or open to friends/family?
- **Data migration:** Export from CopyMeThat, or start fresh?
- **Priority after MVP:** Recipe scraping extension or AI features first?
**Optional tweaks:**
- Any changes to tech stack? (Current: Node + TypeScript + React + SQLite)
- Any MVP features to add/remove?
- Deployment preference (Docker on paje.ca confirmed?)
### 2. Spawn the First Agent (Me or You)
Two options:
#### Option A: Spawn immediately (Cleo does it)
I can kick off the first Codex 5.2 sub-agent right now with:
```
Task: "Build recipe-manager MVP per PROJECT.md. Start with backend setup (Node + TypeScript + SQLite schema). Follow AGENT_INSTRUCTIONS.md workflow. Report progress after each commit."
```
**Advantage:** Overnight work starts now
**Disadvantage:** Agent might ask questions you haven't answered yet
#### Option B: You answer questions first, then spawn tomorrow
Review the files, answer the open questions, tweak anything, then give the green light.
**Advantage:** Agent has complete context, fewer blockers
**Disadvantage:** Delays the start
### 3. Agent Works Autonomously
Once spawned, the agent will:
- Read PROJECT.md, ARCHITECTURE.md, ROADMAP.md
- Pick the first task (likely: "Initialize Node.js project structure")
- Implement, test, commit
- Move to next task
- Report blockers or milestone completion
You can check `git log` anytime to see progress.
### 4. Review & Approve MVP
When agent reports "MVP complete," you:
- Pull the code
- Test locally: `npm install && npm run dev`
- Verify acceptance criteria (Anne can add a recipe, Elizabeth can use cook mode)
- Give feedback or approve for v1.0 milestone
---
## Recommended: Answer Questions Now
I suggest spending 5 minutes answering the open questions so the agent has a clean runway. Want to do that now, or should I spawn anyway and have the agent make reasonable assumptions (documented in ADRs)?
---
## Project Stats
- **Total lines written:** ~1,900 (documentation + harness)
- **Git commits:** 1 (harness baseline)
- **Time to build:** ~10 minutes (all structure, no code yet)
- **Ready for:** First agent sprint
---
_Paul: This is your project. Review, tweak, approve. Then let's unleash Codex overnight! 🚀_

View File

@ -8,7 +8,7 @@
## 🎯 Active Tasks ## 🎯 Active Tasks
### Backend Setup ### Backend Setup
- [ ] Initialize Node.js backend: Create src/backend/, package.json with express, better-sqlite3, zod, vitest. Create src/backend/index.ts with "Hello World" server on port 3000. Verify: npm install && npm run dev (server starts). Commit as "feat(backend): initialize Node.js project with Express" - [x] Initialize Node.js backend: Create src/backend/, package.json with express, better-sqlite3, zod, vitest. Create src/backend/index.ts with "Hello World" server on port 3000. Verify: npm install && npm run dev (server starts). Commit as "feat(backend): initialize Node.js project with Express"
- [ ] Set up TypeScript: Create tsconfig.json (strict mode, ES2022, Node16 module resolution). Add build script to package.json. Verify: npm run build succeeds. Commit. - [ ] Set up TypeScript: Create tsconfig.json (strict mode, ES2022, Node16 module resolution). Add build script to package.json. Verify: npm run build succeeds. Commit.
- [ ] Create SQLite schema: Create src/backend/db/schema.sql with recipes, tags, recipe_tags tables per ARCHITECTURE.md. Create src/backend/db/migrate.ts to apply schema. Verify: npm run migrate creates data/recipes.db. Commit. - [ ] Create SQLite schema: Create src/backend/db/schema.sql with recipes, tags, recipe_tags tables per ARCHITECTURE.md. Create src/backend/db/migrate.ts to apply schema. Verify: npm run migrate creates data/recipes.db. Commit.
- [ ] Implement recipe CRUD API endpoints - [ ] Implement recipe CRUD API endpoints

6
package-lock.json generated Normal file
View File

@ -0,0 +1,6 @@
{
"name": "recipe-manager",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

22
package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "recipe-manager-backend",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "src/backend/index.ts",
"scripts": {
"dev": "ts-node src/backend/index.ts",
"test": "vitest",
"migrate": "ts-node-esm src/backend/db/migrate.ts"
},
"dependencies": {
"express": "^4.18.2",
"better-sqlite3": "^8.4.0",
"zod": "^3.22.4"
},
"devDependencies": {
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vitest": "^1.2.3"
}
}

12
src/backend/index.ts Normal file
View File

@ -0,0 +1,12 @@
import express from 'express';
const app = express();
const port = 3000;
app.get('/', (req, res) => {
res.send('Hello World from Recipe Manager backend!');
});
app.listen(port, () => {
console.log(`Server running on http://localhost:${port}`);
});

14
tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"lib": ["ES2022"],
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "Node16",
"outDir": "dist"
},
"include": ["src/**/*.ts"]
}