You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DeltaAI — AI-Powered Agentic Habit Coach for College Students
DeltaAI is a full-stack AI habit coaching platform built for Indian college students. It uses a ReAct-style agentic AI system that autonomously reasons across three life domains:
🍽️ Eat Smart — AI-generated Indian meal plans within a daily INR budget, personalized to diet, health goals, and BMR
✅ Do Smart — AI-prioritized task management with deadline awareness and urgency scoring
The AI coach doesn't just respond to questions — it proactively detects issues across domains (budget overruns, missed meals, streak breaks, overdue tasks) and provides cross-domain intelligence (e.g., "you have an exam tomorrow, eat light and cheap").
# Clone the projectcd project_delta
# Install Python dependencies
uv sync
# Configure environment
cp .env.example .env
# Edit .env with your MongoDB URI and API keys (see Environment Variables below)# Start backend (with hot reload)cd backend
uv run run.py
# Backend runs at http://localhost:8000# Swagger docs at http://localhost:8000/docs
2. Frontend
# In a new terminalcd project_delta/frontend
npm install
npm run dev
# Frontend runs at http://localhost:3000
3. Seed Demo Data (Optional)
cd project_delta/backend
uv run seed.py
# Populates habits, meals, expenses, tasks, and chat history
Environment Variables
Backend .env
Variable
Required
Description
MONGODB_URI
✅
MongoDB Atlas connection string
JWT_SECRET
✅
Secret key for JWT token signing
OPENROUTER_API_KEY
For testing
OpenRouter API key (sk-or-...) for free model access
ANTHROPIC_API_KEY
For production
Anthropic API key (sk-ant-...) for direct Claude access
ANTHROPIC_MODEL
Optional
Claude model to use (default: claude-sonnet-4-20250514)
AI_MODEL
Optional
OpenRouter model (default: google/gemma-4-31b-it:free)
DB_NAME
Optional
Database name (default: deltaai)
CORS_ORIGINS
Optional
Allowed origins (default: http://localhost:3000)
AI Provider Auto-Detection
The backend automatically selects the AI provider based on which API key is configured:
ANTHROPIC_API_KEY
OPENROUTER_API_KEY
Provider Used
❌ Empty
✅ Set
OpenRouter — free models with smart fallback chain
✅ Set
❌ Empty
Anthropic — direct Claude API
✅ Set
✅ Set
Anthropic primary, OpenRouter fallback on failure
For local testing, leave ANTHROPIC_API_KEY empty and use a free OpenRouter key.
For production, set ANTHROPIC_API_KEY with your Claude key.
Frontend .env.local
NEXT_PUBLIC_API_URL=http://localhost:8000
API Endpoints
Auth
Method
Endpoint
Description
POST
/api/auth/signup
Create account (auto-detects college from email)
POST
/api/auth/login
Login with email/password
GET
/api/auth/me
Get current user
POST
/api/auth/forgot-password
Request password reset OTP
POST
/api/auth/reset-password
Reset password with OTP
Onboarding & Profile
Method
Endpoint
Description
POST
/api/onboarding
Complete onboarding + generates AI baseline (habits + first meal plan)
GET
/api/profile
Get user profile
PUT
/api/profile
Update profile
AI Chat (Agentic)
Method
Endpoint
Description
POST
/api/chat
Cross-domain agentic chat with full context awareness
GET
/api/chat/history
Retrieve conversation history
DELETE
/api/chat/history
Clear conversation history
GET
/api/chat/briefing
Autonomous morning briefing (no prompt needed)
GET
/api/chat/analyze-expenses
Autonomous spending pattern analysis
GET
/api/chat/weekly-report
Comprehensive weekly performance report
Habits
Method
Endpoint
Description
GET
/api/habits
List all habits with streaks
POST
/api/habits
Create a new habit
PUT
/api/habits/{id}/toggle
Toggle habit completion
DELETE
/api/habits/{id}
Delete a habit
GET
/api/habits/stats
Aggregate habit statistics
Meals
Method
Endpoint
Description
POST
/api/meals/generate
AI-generate a meal plan for a given date and budget