No description
Find a file
Mannu a3d3a140ed refactor(db/schema): align TypeScript schema with production
Path A baseline reconciliation. drizzle-kit pull against tia_prod showed
prod had drifted well past schema.ts because legacy hand-rolled migrations
0003-0015 wrote to the DB but were never reflected back into TypeScript.

Shared-table drift fixed:
- users:          + password_hash, + password_updated_at
- families:       + tier, + max_children, + max_members
- children:       col is 'stage' (kept JS key currentStage -> stage);
                  'image_url' not 'profile_photo_url'; birth_date is DATE;
                  sex nullable; dropped phantom stage_overrides
- family_members: dropped phantom display_name
- family_invites: dropped phantom display_name, accepted_at
- audit_log:      + resource_id, + resource_type; metadata -> jsonb; +5 indexes
- memories:       + vision_tags (text[]), + vision_embedding (vector 1536)
- logs.ts:        'diapers' phantom table renamed to diapersLogs ('diapers_logs')

19 missing tables added across new files:
- admin.ts:     admins, admin_sessions, password_resets
- support.ts:   support_tickets, support_responses
- ai.ts:        chat_sessions, chat_messages, ai_usage
- medical.ts:   medicines, medication_doses, allergies, illness_logs, doctor_visits
- affiliate.ts: member_profiles, recommended_products, product_clicks
- logs.ts:      + milestone_achievements
- audit.ts:     + log_corrections

BUG FIX: schema/index.ts never re-exported ./logs — Drizzle was blind to
feeds/sleeps/vaccinations/growth/medications. Now exported.

Verified: tsc --noEmit has zero non-test errors. Dropped phantom columns
confirmed to have zero references in src/.
2026-05-23 12:17:20 +05:30
docker/init-db chore: initial setup 2026-05-10 03:33:32 +05:30
docs Security hardening: auth, bcrypt, rate-limiting, RLS, audit 2026-05-16 23:11:01 +05:30
public Add menu navigation, sun/moon toggle, baby favicon 2026-05-10 11:34:00 +05:30
scripts Add security libs: auth, audit, rate-limit, scoped db 2026-05-16 23:10:56 +05:30
src refactor(db/schema): align TypeScript schema with production 2026-05-23 12:17:20 +05:30
.dockerignore chore: add Dockerfile and docker config 2026-05-10 03:38:03 +05:30
.gitignore chore(db): archive legacy migrations, stop gitignoring drizzle/ 2026-05-23 12:05:50 +05:30
CLAUDE.md docs: add growth page features to CLAUDE.md 2026-05-17 15:47:52 +05:30
docker-compose.dev.yml chore: initial setup 2026-05-10 03:33:32 +05:30
Dockerfile Dockerfile: enable pnpm in builder stage 2026-05-16 22:38:02 +05:30
drizzle.config.ts feat: add Drizzle config and auth/family schema 2026-05-10 04:08:39 +05:30
next-env.d.ts Security hardening - all 8 patches applied 2026-05-16 23:59:43 +05:30
next.config.ts Security hardening: auth, bcrypt, rate-limiting, RLS, audit 2026-05-16 23:11:01 +05:30
package-lock.json fix: build errors and simplify auth 2026-05-10 04:14:23 +05:30
package.json fix: add Resend for password reset emails + install F1-F2 deps 2026-05-17 16:42:45 +05:30
pnpm-lock.yaml fix: add Resend for password reset emails + install F1-F2 deps 2026-05-17 16:42:45 +05:30
pnpm-workspace.yaml Fix FamilyProvider error handling 2026-05-11 00:12:00 +05:30
postcss.config.mjs chore: initial setup 2026-05-10 03:33:32 +05:30
Project_tia.md chore: initial setup 2026-05-10 03:33:32 +05:30
README.md chore: initial setup 2026-05-10 03:33:32 +05:30
tsconfig.json chore: initial setup 2026-05-10 03:33:32 +05:30

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.