Medication adherence and care coordination platform supporting UN SDG 3 (Good Health and Well-being).
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: TailwindCSS + shadcn/ui
- Database: Prisma Postgres with Prisma ORM
- Auth: Auth.js (NextAuth v5)
- Forms: React Hook Form + Zod
- Charts: Recharts
- PDF: jsPDF
Set DATABASE_URL in .env to your Prisma Postgres connection string, then run:
npm install
npx prisma migrate dev
npx prisma db seed
npm run devSet these environment variables in Vercel before deploying to production:
AUTH_SECRET="a-long-random-production-secret"
NEXTAUTH_URL="https://your-production-domain"
DATABASE_URL="your-production-database-url"Generate AUTH_SECRET with a secure random value and keep it private. Do not reuse
the local development value from .env.
For Prisma Postgres, use the connection string Vercel provides as DATABASE_URL.
After connecting the database, deploy the schema with npx prisma migrate deploy
and seed demo data with npx prisma db seed if you want the sample accounts
available.
| Role | |
|---|---|
| Patient | patient@lifelineplus.com |
| Doctor | doctor@lifelineplus.com |
| Caregiver | caregiver@lifelineplus.com |
| Admin | admin@lifelineplus.com |
- Dashboard with health score, adherence, charts, and quick actions
- Medication management (add/edit/delete, log taken/skipped/missed)
- Symptom journal with pain and energy levels
- Mood tracker with weekly trends
- Appointment booking and cancellation
- Health timeline of all events
- In-app notifications
- Monitor assigned patients
- View adherence and health scores
- Receive missed medication alerts
- Patient records with full health history
- Approve and complete appointments
- Write consultation notes
- Download PDF health reports
- User management with role assignment
- Platform analytics and statistics
See lib/health-score.ts for the deterministic scoring algorithm:
- Medication adherence (40%)
- Appointment attendance (20%)
- Mood trend (20%)
- Symptom frequency (10%)
- Logging consistency (10%)
app/ → Pages, API routes, layouts
components/ → UI, layout, charts, shared components
features/ → Feature modules with actions and components
lib/ → Auth, Prisma, health score, PDF, utilities
prisma/ → Schema, migrations, seed
types/ → Shared TypeScript types