No description
Find a file
Mannu 96d28cbadc refactor: full codebase sweep — shared types, utilities, component splits
New foundations:
- src/types/index.ts — shared domain types (Child, Log, GrowthRecord, Medicine,
  Dose, Allergy, Visit, Illness, Vaccination, AIChat, ChatSession, Goal)
- src/lib/formatting.ts — calculateAge, formatAge, formatTimeAgo (eliminates
  3 duplicate implementations spread across page.tsx and growth/page.tsx)
- src/lib/api.ts — typed fetch helpers (api.get/post/patch/delete) with
  consistent error handling; replaces manual fetch boilerplate

New shared components:
- src/components/PageHeader.tsx — reusable back-link + title header
- src/components/TabBar.tsx — horizontal pill tab bar
- src/components/CalendarView.tsx — extracted from activity/page.tsx (was ~170 inline lines)
- src/components/medical/ — medical page split into 5 focused tab components:
  VaccineTab, MedicineTab, AllergyTab, VisitTab, IllnessTab

Pages updated:
- medical/page.tsx: 1029 → 42 lines (thin shell wiring the 5 tab components)
- activity/page.tsx: uses CalendarView + shared Log type + api.ts
- growth/page.tsx: uses shared GrowthRecord/Goal types + formatAge; fixes
  `any` catch clauses; fixes undefined → null in Chart.js dataset values
- page.tsx (home): uses shared Log/AIChat/ChatSession types + formatTimeAgo/
  calculateAge from formatting.ts; removes inline type definitions
- ai/page.tsx: uses shared AIChat/ChatSession types
- FamilyProvider.tsx: uses shared Child type; fixes `c: any` mapping

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 21:37:39 +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
drizzle feat(g5-g6): age-aware UX + mama affiliate page 2026-05-18 00:59:17 +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: full codebase sweep — shared types, utilities, component splits 2026-05-18 21:37:39 +05:30
.dockerignore chore: add Dockerfile and docker config 2026-05-10 03:38:03 +05:30
.gitignore chore: initial setup 2026-05-10 03:33:32 +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.