- Demo
- Overview
- Features
- Future Roadmap
- Technology Stack
- Getting Started
- Project Structure
- Deployment
- Contributing
- License
- Meet the BrainHack Team
BrainHack is an innovative web app that blends AI and neuroscience to help you:
- π Understand and predict distraction risk
- π§ Track and achieve your goals across multiple time horizons
- π€ Chat with an AI-powered coach for productivity & wellness tips
- β±οΈ Run focus sessions with data-driven recommendations
- Interactive Brain Visualization
- Split-brain UI showing logic vs. creativity, with responsive animations.
- Distraction Risk Predictor
- ML model flags high-risk moments using time, stress, notifications & usage data.
- AI Chat Assistant
- Context-aware coach powered by Googleβs Gemini AI for productivity & wellness advice.
- Goal Tracking
- Manage Today, 30-Day, 90-Day & 1-Year goals with progress rings & subtasks.
- Focus Timer
- Preset/custom sessions, end-session stats, break suggestions, and distraction-free mode.
- Analytics Dashboard
- Sparklines and mini-charts visualize your focus vs. distraction trends.
Feature | Vision |
---|---|
Distraction Risk Predictor | Next-Step Simulation: RL engine shows βIf you skip your break, hereβs your 1-hr focus dropβ in real time. |
Personalized Recommendations | Adaptive RL Advisor: Continuously refines tips based on your feedback and predicts long-term habit impact. |
AI Chat Assistant | Proactive Coach: Auto-pings mini-sessions (βYour focus is slippingβtry a 2-min breathing exercise?β). |
Goal Tracking | Dynamic Micro-Goals: RL-powered bite-sized tasks (e.g., βRead 2 pages nowβ) and auto-adjust difficulty per performance. |
Focus Timer | Smart Scheduler: Auto-schedules your next focus block using peak-hour forecasting and calendar context. |
Analytics Dashboard | Predictive Forecasting: βWhat-ifβ scenariosβsee how todayβs tweaks could boost next weekβs total focus time by X%. |
- Node.js v18+
- npm or yarn
- Firebase account
- Google Gemini API key
# Clone repo
git clone https://github.com/Jdsb06/BrainHack.git
cd BrainHack
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your Firebase & Gemini keys
# Run dev server
npm run dev
Open http://localhost:3000 in your browser
brain_hack/
βββ public/ # Static assets & images
βββ src/
β βββ app/ # Next.js app router
β β βββ api/ # API routes
β β βββ ask-ai/ # AI chat page
β β βββ login/ # Login page
β β βββ register/ # Registration page
β β βββ risk-predictor/ # Distraction risk predictor page
β β βββ ... # Other pages
β βββ components/ # Reusable UI components
β βββ lib/ # Firebase, Gemini, and utility setup
β βββ styles/ # Global styles
βββ Bot/ # AI Chatbot backend logic (models, routes, handlers)
βββ flask_app/ # Flask backend for Distraction Risk Predictor (API + ML inference)
βββ BrainHack/ # ML model training code, datasets, notebooks, experiments
βββ scripts/ # Utility scripts
βββ .env.example # Example environment variables
βββ next.config.js # Next.js configuration
βββ package.json # Project dependencies
βββ README.md # Project documentation
The application is deployed on Firebase Hosting. To deploy:
npm run build
firebase deploy --only hosting
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for providing the chat capabilities
- Firebase for authentication and hosting
- The open-source community for the various libraries used in this project
Feature | Current Implementation | Future Vision |
---|---|---|
Distraction Risk Predictor | AI model flags high-risk moments based on time, stress, notifications, and usage patterns | Next-Step Simulation: a reinforcement-learning engine that shows you βif you skip your break, hereβs the 1-hr focus dropβ in real time |
Personalized Recommendations | Static suggestions for breaks, content swaps, and focus tweaks based on past behavior | Adaptive RL Advisor: learns from your feedback to refine advice continuously, even predicting long-term habit impact (βYour focus streak will improve by 12% if you follow thisβ¦β) |
AI Chat Assistant | Context-aware chat powered by Gemini AI offering tips on productivity and wellness | Proactive Coach: autonomously pings you with mini-sessions (βHey, I noticed your focus is slippingβwant a 2-min breathing exercise?β) |
Goal Tracking | Track daily, 30-day, 90-day, and annual goals with progress rings and subtasks | Dynamic Micro-Goals: auto-generate bite-sized habits (e.g., βRead 2 pages nowβ) and adjust goal difficulty using RL based on your performance curve |
Focus Timer | Preset/custom timers + end-session stats and break prompts | Smart Scheduler: the app auto-schedules your next focus block by forecasting your peak hours from past data and calendar context |
Analytics Dashboard | Visualize trends with sparklines and pie/circular charts | Predictive Forecasting: run βwhat-ifβ scenariosβsee how todayβs schedule tweaks could boost next weekβs total focus time by X% |