Dental clinic workflow app — daily tasks, incidents, rota, and manager analytics. Built with Next.js (App Router), Supabase, and Tailwind CSS.
Production target: app.effinic.com
- Node.js 20+
- pnpm
- Supabase CLI
- Docker (for local Supabase)
pnpm install
cp .env.example .env.local
supabase start
supabase db reset
pnpm gen-types
pnpm devOpen http://localhost:3000.
After supabase db reset, the demo practice is available:
| Role | Access |
|---|---|
| Manager | manager@demo.effinic.test / DemoManager1! at /login |
| Nurse | /p/demo-dental/11111111-1111-1111-1111-111111111111 → Sarah Nurse → PIN 1234 |
Testing both roles: Manager and nurse share one auth cookie on the same origin. Signing in as one role replaces the other. For parallel QA, use separate browser profiles or incognito. After nurse flow, re-login as manager if needed.
Copy Supabase keys from supabase start output into .env.local:
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=<anon key>
SUPABASE_SERVICE_ROLE_KEY=<service role key>
NEXT_PUBLIC_SITE_URL=http://localhost:3000
PLATFORM_ADMIN_EMAILS=you@example.com| Command | Description |
|---|---|
pnpm dev |
Start dev server |
pnpm build |
Production build |
pnpm type-check |
TypeScript check |
pnpm test |
Vitest unit tests |
pnpm test:e2e |
Playwright E2E (requires Supabase + dev server) |
pnpm gen-types |
Regenerate src/types/database.ts from local DB |
supabase db reset |
Re-run migrations + seed |
Migrations live in supabase/migrations/. Seed data:
supabase/seed.sql— demo practice for local dev and E2Esupabase/seed.pilot.sql— optional pilot overlay
supabase db reset # migrate + seed
supabase gen types typescript --local > src/types/database.tsDaily task generation runs via Supabase Edge Function:
supabase functions deploy generate-daily-tasksSchedule a daily cron in the Supabase dashboard (≈ 05:00 local per practice timezone).
- Managers:
public/manifest.webmanifest(start_url: /login) - Nurses: dynamic manifest at
/api/manifest/practice/{slug}/{token}(start_url→ practice URL)
@ducanh2912/next-pwa is configured in next.config.ts (disabled in development).
- Connect the GitHub repo to Vercel
- Set environment variables (same as
.env.example, with production Supabase URLs) - Deploy; assign custom domain
app.effinic.com
- Create a project (London region recommended)
- Run migrations:
supabase db push - Set Auth redirect URLs:
https://app.effinic.com/auth/callback - Configure invite email templates for manager onboarding
Point app.effinic.com CNAME to your Vercel deployment.
- Roles & login — platform admin, practice roles, how to add users
- Demo script
- MySQL → Postgres migration stub
- Hostinger photos migration stub
- Design spec:
docs/superpowers/specs/2026-06-12-effinic-rebuild-design.md
E2E tests skip automatically when Supabase env vars are missing.
supabase start && supabase db reset
pnpm test:e2eSession-lock API test additionally requires the dev server started with:
TEST_FROZEN_TIME=2026-06-12T14:00:00+01:00 pnpm dev