🦷 A smart break tracker app for orthodontic patients using AI-powered advice
DentalPause is a web application designed to help orthodontic patients manage their daily breaks and track progress with their aligners or braces. The app provides personalized AI-powered advice using Google's Gemini API and integrates with MongoDB for secure data storage.
Key Features:
- 📊 Track dental pause sessions (automatic or manual logging)
- 🤖 AI-powered daily advice based on your progress
- 🔐 Secure authentication with JWT tokens
- ⚙️ Customizable settings (patient name, gender, aligner details)
- 📈 Progress tracking by aligner stage
- 🔔 Optional app reminders
Prerequisites: Node.js
- Install dependencies:
npm install - Set the
GEMINI_API_KEYin .env.local to your Gemini API key - Run the app:
npm run dev
- Copy
.env.exampleto.envand set:MONGODB_URIfor your MongoDB Atlas clusterJWT_SECRETfor signing auth tokens- Optional:
PORT(defaults to 5000) andCLIENT_ORIGIN(allowed frontend origin) - Optional frontend helpers:
VITE_API_BASE_URL(defaults tohttp://localhost:5000/api) andVITE_GEMINI_API_KEYfallback if you don't want the key in settings
- Start the API server:
npm run server - Available endpoints (all prefixed with
/api):POST /auth/register– body{ email, password }POST /auth/login– body{ email, password }GET /settings– requiresAuthorization: Bearer <token>PUT /settings– body{ geminiApiKey?: string, aiAdviceEnabled?: boolean }with the same Authorization headerGET /sessions– returns sessions of the logged-in userPOST /sessions/start– starts an active breakPOST /sessions/stop– ends an active breakPOST /sessions/manual– adds a manual entry{ startTime, endTime }GET /advice/today– returns Gemini advice based on today's sessions (requires API key)
- Login/registration is performed via the API; JWT is stored in
localStorage. - In settings, you can enter your Gemini API key, name, and gender, and enable/disable AI advice (saved in MongoDB for your account).
- If you prefer to use a global key instead of settings, set
VITE_GEMINI_API_KEYin.env.local; the backend also has a fallback toGEMINI_API_KEY. - Additionally, you can set the start date of aligner wear, number of brackets for upper/lower arch, change day/time, enable in-app reminders, and track progress by arch in History.
- AI advice also uses bracket progress (percentages by arch) for more personalized responses.