Skip to content

Latest commit

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

BrainHack – Your Personal Productivity & Mental Wellness Companion

License: MITVersionNext.jsFirebase


Table of Contents


Demo

BrainHack Demo


Overview

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

Features

  1. Interactive Brain Visualization
    • Split-brain UI showing logic vs. creativity, with responsive animations.
  2. Distraction Risk Predictor
    • ML model flags high-risk moments using time, stress, notifications & usage data.
  3. AI Chat Assistant
    • Context-aware coach powered by Google’s Gemini AI for productivity & wellness advice.
  4. Goal Tracking
    • Manage Today, 30-Day, 90-Day & 1-Year goals with progress rings & subtasks.
  5. Focus Timer
    • Preset/custom sessions, end-session stats, break suggestions, and distraction-free mode.
  6. Analytics Dashboard
    • Sparklines and mini-charts visualize your focus vs. distraction trends.

Future Roadmap

FeatureVision
Distraction Risk PredictorNext-Step Simulation: RL engine shows “If you skip your break, here’s your 1-hr focus drop” in real time.
Personalized RecommendationsAdaptive RL Advisor: Continuously refines tips based on your feedback and predicts long-term habit impact.
AI Chat AssistantProactive Coach: Auto-pings mini-sessions (“Your focus is slipping—try a 2-min breathing exercise?”).
Goal TrackingDynamic Micro-Goals: RL-powered bite-sized tasks (e.g., “Read 2 pages now”) and auto-adjust difficulty per performance.
Focus TimerSmart Scheduler: Auto-schedules your next focus block using peak-hour forecasting and calendar context.
Analytics DashboardPredictive Forecasting: “What-if” scenarios—see how today’s tweaks could boost next week’s total focus time by X%.

Technology Stack

Built With

Next.jsTypeScriptTailwind CSSFramer MotionThree.jsFirebasePython


Getting Started

Prerequisites

  • Node.js v18+
  • npm or yarn
  • Firebase account
  • Google Gemini API key

Installation

# 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

Project Structure

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

Deployment

The application is deployed on Firebase Hosting. To deploy:

npm run build
firebase deploy --only hosting

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • 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

Features & Future Vision

FeatureCurrent ImplementationFuture Vision
Distraction Risk PredictorAI model flags high-risk moments based on time, stress, notifications, and usage patternsNext-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 RecommendationsStatic suggestions for breaks, content swaps, and focus tweaks based on past behaviorAdaptive 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 AssistantContext-aware chat powered by Gemini AI offering tips on productivity and wellnessProactive Coach: autonomously pings you with mini-sessions (“Hey, I noticed your focus is slipping—want a 2-min breathing exercise?”)
Goal TrackingTrack daily, 30-day, 90-day, and annual goals with progress rings and subtasksDynamic 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 TimerPreset/custom timers + end-session stats and break promptsSmart Scheduler: the app auto-schedules your next focus block by forecasting your peak hours from past data and calendar context
Analytics DashboardVisualize trends with sparklines and pie/circular chartsPredictive Forecasting: run “what-if” scenarios—see how today’s schedule tweaks could boost next week’s total focus time by X%

Meet the BrainHack Team 🧠✨

About

🚀 BrainHack – A smart productivity web app that helps users break free from dopamine traps (like reels, shorts, fake motivation) using AI-powered insights, focus tools, and goal tracking.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages