build(backend): set up TypeScript with strict mode and build script

This commit is contained in:
Paul Huliganga 2026-03-23 23:45:09 -04:00
parent ed1f4f88be
commit 07b9be50b9
3 changed files with 8 additions and 5 deletions

View File

@ -9,7 +9,7 @@
### Backend Setup
- [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.
- [x] 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.
- [ ] Implement recipe CRUD API endpoints
- [ ] Add Zod validation schemas

View File

@ -6,6 +6,7 @@
"main": "src/backend/index.ts",
"scripts": {
"dev": "ts-node src/backend/index.ts",
"build": "tsc",
"test": "vitest",
"migrate": "ts-node-esm src/backend/db/migrate.ts"
},

View File

@ -3,12 +3,14 @@
"target": "ES2022",
"module": "Node16",
"lib": ["ES2022"],
"rootDir": "src",
"outDir": "dist",
"strict": true,
"moduleResolution": "Node16",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "Node16",
"outDir": "dist"
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*.ts"]
"include": ["src"],
"exclude": ["node_modules", "dist"]
}