An all-in-one personal tracker for training sessions, diet logging, body metrics, and goals — with AI-powered insights via Claude.
- Next.js 14 (App Router) + TypeScript strict
- Tailwind CSS v3 + Lucide React icons
- Prisma v6 + SQLite (better-sqlite3 adapter)
- NextAuth v5 with Credentials provider
- Recharts for data visualisation
- Anthropic SDK (claude-sonnet-4-6) for AI insights
npm installcp .env.local.example .env.localEdit .env.local:
AUTH_SECRET— generate withopenssl rand -hex 32ANTHROPIC_API_KEY— your Anthropic API keyDATABASE_URL— leave asfile:./prisma/dev.dbfor local SQLite
npx prisma generate
npx prisma db pushcurl -X POST http://localhost:3000/api/seedOr after starting the dev server, visit POST /api/seed with any HTTP client.
Default credentials:
- Email: admin@athletiq.com
- Password: athletiq123
npm run devOpen http://localhost:3000.
src/
app/
(auth)/login/ — Login page
(dashboard)/ — Protected dashboard layout + routes
page.tsx — Dashboard home
api/
auth/[...nextauth]/ — NextAuth handlers
seed/ — Database seed endpoint
globals.css
layout.tsx — Root layout with SessionProvider
components/
Sidebar.tsx — Navigation sidebar (collapsible on mobile)
lib/
auth.ts — NextAuth v5 config
prisma.ts — Prisma client (better-sqlite3 adapter)
types/
index.ts — TypeScript interfaces
prisma/
schema.prisma — Database schema
| Model | Description |
|---|---|
User |
Authentication + profile |
TrainingSession |
Runs, rides, swims, strength, yoga, etc. |
DietEntry |
Meal logging with macro breakdown |
BodyMetric |
Weight, HR, sleep, HRV, VO2max |
Goal |
Targets with progress tracking |
npm run prisma:studio