chore: starter template

This commit is contained in:
e2e
2026-07-10 19:42:56 +02:00
commit e5c3377b6b
157 changed files with 6462 additions and 0 deletions

21
db/annotations.ts Normal file
View File

@@ -0,0 +1,21 @@
// Column annotations — compiled by `pikku db migrate` into db/annotations.gen.json,
// which drives BOTH the generated types/zod AND runtime value coercion.
//
// Declare a `kind` for every semantic date/bool/json column you add:
// - kind: 'date' → the column types as `Date` end-to-end. Write real `Date`
// objects, read back `Date` objects; the TEXT storage is coerced both ways.
// - kind: 'bool' → types as `boolean` over the INTEGER 0/1 storage.
// - kind: 'json' → parsed/serialized automatically.
// Without a kind, a SQLite date column is just `string` (write ISO strings via
// `new Date().toISOString()`) and a flag is `number` — that default is fine too;
// just follow the generated type, never fight it with `new Date()` writes or casts.
//
// Optional per column: security ('public' | 'private' | 'pii' | 'secret'),
// classification (anonymize strategy), tsType, format, description.
export const classifications = {
// Example — after adding a `todos` table in a migration:
// todos: {
// created_at: { kind: 'date' },
// done: { kind: 'bool' },
// },
}