Commit Graph

8 Commits

Author SHA1 Message Date
Paul Huliganga 8b729d7fc4 chore(backend): implement high-priority improvements from code review
- Configuration: dotenv support, env vars for PORT, DB_PATH, CORS_ORIGIN, rate limits
- Security: API key auth for write endpoints, rate limiting on import, configurable CORS, image URL normalization
- Reliability: DB transactions for create/update, dirty flag for saves, foreign key enforcement (PRAGMA), duplicate detection O(1) optimization
- Features: health check endpoint (/api/health)
- Bugfix: corrected tag assignment/removal routes (param order)
- Testing: added tests for PUT/DELETE recipes, tag CRUD and assignment, enabled foreign keys in tests
- All 46 backend tests passing

Closes #<ticket-if-any>
2026-03-29 23:11:27 -04:00
Paul Huliganga 0d61ac70fc feat(workflow): add health check status detector 2026-03-26 15:53:25 -04:00
Paul Huliganga 61846b5d2a feat(workflow): add scheduled resume-and-report runner 2026-03-26 15:50:50 -04:00
Paul Huliganga 0510009597 fix(workflow): align orchestrator API and workflow runner 2026-03-26 15:44:45 -04:00
Paul Huliganga e2599b81f4 feat(api): implement recipe CRUD API endpoints
- Add Recipe type definitions (Recipe, CreateRecipeInput, UpdateRecipeInput)
- Implement RecipeRepository for database operations (CRUD + search)
- Implement RecipeService with business logic validation
- Create Express routes with Zod validation schemas
- Add database initialization module with auto-save functionality
- Implement comprehensive integration tests (16 tests, all passing)
- Support pagination, search filtering, and proper error handling
- Follow layered architecture pattern (Routes → Services → Repositories)

All tests passing (16/16). TypeScript strict mode enabled.
2026-03-24 00:13:58 -04:00
Paul Huliganga 88acb93068 fix(deps): switch to sql.js to resolve Node v22 compatibility
- better-sqlite3 incompatible with Node.js v22.22.0 (V8 API changes)
- Switched to sql.js (pure JavaScript SQLite, zero native deps)
- Updated ARCHITECTURE.md to reflect new choice
- Added ADR-001 documenting decision rationale
- Enables autonomous development on WSL2/Node v22

Per agent-harness methodology: unblock environment issues pragmatically.
2026-03-24 00:00:59 -04:00
Paul Huliganga 07b9be50b9 build(backend): set up TypeScript with strict mode and build script 2026-03-23 23:45:09 -04:00
Paul Huliganga ed1f4f88be feat(backend): initialize Node.js project with Express 2026-03-23 23:40:36 -04:00