MeetRX telehealth marketplace MVP integration and deployment (Next.js + Supabase + Stripe Connect + Daily.co).
DRAFTProject Overview
Existing MVP codebase (~83 files) built with Next.js 14 App Router, Tailwind, shadcn/ui; Supabase (Postgres/Auth/RLS) schema already deployed; API routes and UI already written. Needs wiring of Supabase auth flows, Stripe subscriptions + Stripe Connect payouts, Daily.co video, Resend email, and deployment to Vercel. Codebase will be provided as a zip file.
Features
- Configure Supabase client + env vars
Set SUPABASE_URL, ANON_KEY (and service role key if needed server-side) and ensure clients are initialized correctly for App Router (client/server).
- Validate auth flows end-to-end
Test sign up, sign in, sign out, password reset, session persistence/refresh, and protected routes for both patient and pharmacist/provider roles (as applicable).
- Verify RLS + schema access
Confirm RLS policies allow intended reads/writes for each role across key tables; fix policy or query issues discovered during testing.
- Smoke test API routes with Supabase
Ensure existing API routes (or server actions) interact with Supabase correctly and handle errors/edge cases.
- Configure Daily.co project + keys
Set up Daily.co dashboard, API keys, domain settings, and environment variables needed by the app.
- Implement/verify room creation + access
Create rooms (or pre-create) based on appointment/booking logic; ensure proper permissions/tokens for patient and provider.
- Test consultation flow
Run full consultation scenario including joining/leaving, device permissions, and basic edge cases (refresh/reconnect).
- Handle failure states
Ensure user-friendly handling for room not found, expired links, permission issues, and network errors.
- Create Vercel project + configure build settings
Import repo/codebase into Vercel, confirm Next.js build settings, and set appropriate regions/build commands if needed.
- Configure environment variables
Set all required env vars for Supabase, Stripe, Daily.co, Resend, and any app secrets across preview/production.
- Connect custom domain + DNS
Attach custom domain in Vercel and guide/configure DNS records; verify SSL and routing.
- Production smoke test
Verify production deployment works for key pages and server routes; confirm webhooks/callback URLs updated to production.
- Reproduce compile error locally
Run the app locally, capture the exact error stack, and identify the failing component/module.
- Fix logo component implementation
Patch the logo component (imports, image handling, SSR/client boundary, or asset path issues) and ensure it compiles.
- Verify builds
Confirm `next dev` and `next build` succeed after the fix.
- Create Stripe products/prices (4 tiers)
Create (or confirm) the 4 subscription tiers in Stripe and map price IDs into the app config/env.
- Implement/verify subscription checkout flow
Ensure users can subscribe, manage billing, and that app state reflects subscription status correctly.
- Implement/verify Stripe webhooks
Configure webhook endpoint(s) in Next.js, validate signature verification, and handle key events (e.g., checkout.session.completed, invoice.paid, customer.subscription.updated/canceled).
- Implement/verify Stripe Connect onboarding + payouts
Create/connect provider accounts, run onboarding, store/connect account IDs in Supabase, and validate payout/transfer flow assumptions.
- End-to-end test with Stripe test cards
Run full happy-path and failure-path tests in Stripe test mode; document any required manual dashboard steps.
- Configure Resend API + env vars
Add RESEND_API_KEY and sender/domain configuration; ensure server-side email sending works in Next.js.
- Connect templates to app events
Map existing templates to events (e.g., sign up/verification, booking confirmation, receipts, password reset) as implemented in codebase.
- Send and validate emails in staging/test
Trigger each transactional email, verify deliverability, content, and link correctness; adjust templates/config as needed.
- Define critical user flows and test checklist
Create a concise checklist covering patient booking, provider/pharmacist onboarding, subscription purchase, consultation join, and email notifications.
- Run end-to-end tests in staging/production-like env
Execute the checklist against preview/staging and production deployments; log defects and reproduction steps.
- Fix bugs discovered during testing
Prioritize and resolve defects across UI, API routes, integrations, and RLS; add guardrails and better error handling where needed.
- Final regression pass
Re-run the full checklist after fixes; confirm no critical regressions prior to go-live.