An AI-powered wellness companion that predicts burnout, stress spikes, and academic overload — hyper-personalised to your semester, branch, and daily patterns.
🏆 Built for the AWS Builder Center Hackathon by Ctrl C Ctrl V Engineers
| 🌟 Feature | 📝 Description |
|---|---|
| 🧬 Neural Avatar | A living 3D digital twin (Three.js) that mirrors your academic DNA — reflecting stress patterns, sleep cycles, and workload peaks. |
| 🔮 Burnout Prediction | AI models predict your burnout risk 48 hours before it hits using your daily check-in data. |
| ⏱️ Daily Check-In | A rapid 2-minute pulse check covering sleep, deadlines, and mood. |
| 🎯 Smart Coping | Hyper-personalised wellness strategies built for your exact situation and workload. |
| 💬 Neural Chat | Context-aware AI chat that remembers your deadlines, patterns, and past conversations. |
| 📊 Live Dashboard | Real-time stress heatmaps, workload graphs, and your 3D avatar reflecting your current state. |
| 🏫 University Portal | A dedicated portal for universities to monitor campus-wide student wellness trends. |
| 🚑 Emergency Support | Instant access to emergency mental health resources. |
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS v4
- Database: MongoDB via Mongoose
- Auth: Firebase Auth (Google OAuth) + JWT (
jose) - AI: Google Gemini 1.5 Flash (
@google/generative-ai) - 3D / UI: Three.js, Framer Motion, Recharts
Follow these steps to run your own local instance of Digital Twin AI.
Make sure you have installed:
- Node.js
>= 18 pnpm(Install vianpm install -g pnpm)- MongoDB Atlas cluster (or local setup)
- Firebase project with Google Auth enabled
- Google Gemini API key
1. Clone the repository
git clone https://github.com/<your-username>/DigitalTwinAI.git
cd DigitalTwinAI2. Install dependencies
pnpm install3. Configure Environment Variables
Create a .env.local file in the root directory:
# Database
MONGODB_URI=<your_mongodb_connection_string>
# Authentication
JWT_SECRET=<your_jwt_secret>
# AI Integration
GEMINI_API_KEY=<your_gemini_api_key>
# Firebase
NEXT_PUBLIC_FIREBASE_API_KEY=<your_firebase_api_key>4. Fire it up!
pnpm dev🌐 Open http://localhost:3000 and meet your digital twin.
- Dual Auth: Email/password or Google OAuth via Firebase
- Stateless Security: JWTs issued on login are stored as HTTP-only cookies (
token) - Protected Routes:
middleware.tsguards student routes. University portal usesuni_token
- Metric Computation: Calculates scores (0-100) for
stress,burnout,anxiety,sleep, andwellbeing - Generative Insights: Feeds scores + academic load into Gemini to generate 2–3 sentence personalized insights
DigitalTwinAI/
├── app/ # Next.js App Router
│ ├── api/ # REST endpoints
│ ├── components/ # Shared UI
│ ├── dashboard/ # Student view
│ ├── university/ # University view
├── controllers/ # JWT logic
├── lib/ # DB, Firebase, Gemini
├── models/ # Mongoose schemas
├── utils/ # Auth helpers
└── middleware.ts # Route protection
We welcome contributions!
- Fork the project
- Create a branch:
git checkout -b feat/AmazingFeature- Commit changes:
git commit -m "feat: Add AmazingFeature"- Push:
git push origin feat/AmazingFeature- Open a Pull Request
Released under the MIT License.
Built with ❤️ at AWS Builder Center Hackathon, IIT Kanpur · Ctrl C Ctrl V Engineers