Full-stack mental wellness platform with:
- Next.js frontend (
frontend/) - FastAPI backend (
backend/) - AI-powered assistant and recommenders (Cerebras with safe fallbacks)
- Google sign-in flow and user session handling
- Assessment flow (PHQ-9 + GAD-7), scoring, summary, alerts
- Dashboard overview
- Habit tracker + AI habit coach
- AI assistant chat with conversation history
- Resource library + AI recommendations
- Appointments booking and rescheduling
- Events discovery and registration
- Community posts, likes, replies, groups, mentors
- Frontend: Next.js 16, React 19
- Backend: FastAPI, Pydantic
- AI: Cerebras Chat Completions API (with fallback behavior if key is unavailable)
- Auth/UI session: Firebase (frontend side)
acm2k26/
backend/
main.py
requirements.txt
app/
frontend/
package.json
src/
requirements.txt # root entrypoint -> backend/requirements.txt
- Python 3.10+
- Node.js 18+ (recommended 20 LTS)
- npm
cd backend
python -m venv .venv
.venv\Scripts\activate
pip install -r ..\requirements.txtCreate backend/.env:
APP_NAME=Manah Arogya Backend
APP_VERSION=1.0.0
API_PREFIX=/api/v1
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
SUPABASE_URL=
SUPABASE_SERVICE_KEY=
FIREBASE_CREDENTIALS_PATH=
FIREBASE_PROJECT_ID=
ALLOW_DEV_AUTH_BYPASS=true
CEREBRAS_API_KEY=
CEREBRAS_MODEL=gpt-oss-120b
CEREBRAS_TIMEOUT_SECONDS=30Run backend:
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000cd frontend
npm installCreate frontend/.env.local:
NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8000/api/v1Run frontend:
npm run devOpen: http://localhost:3000
cd frontend
npm run lint
npm run buildBackend docs:
http://127.0.0.1:8000/docs
Health endpoints:
GET /GET /health
- Ensure secrets are not staged (
backend/.env, local keys, tokens). - Run frontend checks (
npm run lintandnpm run build). - Run backend and verify
/docs+ health endpoints. - Check changes:
git statusgit diff --stat
- Stage and commit:
git add .git commit -m "your message"
- Push:
git push origin main
- API routes are mounted under
/api/v1and are aligned with frontend module contracts. - Protected endpoints accept
Authorization: Bearer <firebase_id_token>. For local development,ALLOW_DEV_AUTH_BYPASS=trueenablesX-User-Idfallback. - Root repo contains
backend/.gitas nested metadata in your local workspace. This is ignored by root.gitignoreto avoid accidental nested-repo commits. - Root
requirements.txtis intentionally mapped tobackend/requirements.txtfor simple setup fromacm2k26root.