AI-powered oral hygiene guidance platform with subscription management and affiliate system.
SmileScore/
├── web/ # Next.js web application
├── mobile/ # React Native/Expo mobile application
├── supabase/ # Database migrations
└── docs/ # Documentation
- Web: Next.js 14+, TypeScript, Tailwind CSS
- Mobile: React Native/Expo, TypeScript
- Backend: Next.js API Routes, Vercel Serverless
- Database: Supabase (PostgreSQL)
- Auth: Supabase Auth
- Storage: Supabase Storage
- Payments: Stripe Checkout
- AI: OpenAI Vision API
- Emails: Resend
- Node.js 18+ installed
- Supabase account and project
- Stripe account
- OpenAI API key
- Resend account
- Create a new Supabase project at https://supabase.com
- Go to SQL Editor and run migrations in order:
supabase/migrations/20250118000001_initial_schema.sqlsupabase/migrations/20250118000002_rls_policies.sqlsupabase/migrations/20250118000003_seed_routine_templates.sql
- Create a storage bucket named
user-photoswith public access - Get your project URL and anon key from Settings > API
- Create products and prices in Stripe Dashboard:
- Essential Monthly:
price_essential_monthly - Essential Yearly:
price_essential_yearly - Pro Monthly:
price_pro_monthly - Pro Yearly:
price_pro_yearly
- Essential Monthly:
- Set up webhook endpoint:
https://your-domain.com/api/webhooks/stripe - Subscribe to events:
checkout.session.completedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_failed
- Get your webhook secret from the webhook configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
OPENAI_API_KEY=your_openai_api_key
RESEND_API_KEY=your_resend_api_key
RESEND_FROM_EMAIL=noreply@yourdomain.com
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME=SmileScoreEXPO_PUBLIC_SUPABASE_URL=your_supabase_project_url
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
EXPO_PUBLIC_APP_URL=https://your-app-domain.com
EXPO_PUBLIC_APP_NAME=SmileScore# Web app
cd web
npm install
# Mobile app
cd ../mobile
npm install# Web app (from web directory)
npm run dev
# Mobile app (from mobile directory)
npm start- Push code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
- Install EAS CLI:
npm install -g eas-cli - Login:
eas login - Configure:
eas build:configure - Build:
eas build --platform iosoreas build --platform android
- ✅ User authentication and onboarding
- ✅ AI-powered photo analysis
- ✅ Routine templates and habit tracking
- ✅ Stripe subscription management
- ✅ Affiliate system with commission tracking
- ✅ Admin dashboard for affiliate management
- ✅ Share card generation
- ✅ Email notifications via Resend
Important: SmileScore is not a replacement for professional dental care. The app does not provide medical advice, diagnosis, or treatment. Users should always consult a licensed dentist for any concerns about their oral health.
Proprietary - All rights reserved