feat(01-01): add database schema, shared Zod schemas, seed, and test infrastructure

- Create Drizzle schema with items, categories, and settings tables
- Set up database connection singleton with WAL mode and foreign keys
- Add seed script for default Uncategorized category
- Create shared Zod validation schemas for items and categories
- Export TypeScript types inferred from Zod and Drizzle schemas
- Add in-memory SQLite test helper for isolated test databases
- Wire seed into Hono server startup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 22:34:53 +01:00
parent 67ff86039f
commit 7412ef1d86
9 changed files with 233 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
import { Hono } from "hono";
import { serveStatic } from "hono/bun";
import { seedDefaults } from "../db/seed.ts";
// Seed default data on startup
seedDefaults();
const app = new Hono();