Skip to content

πŸš€ 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.

License

Notifications You must be signed in to change notification settings

Jdsb06/BrainHack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BrainHack – Your Personal Productivity & Mental Wellness Companion

License: MIT Version Next.js Firebase


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

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%.

Technology Stack

Built With

Next.js TypeScript Tailwind CSS Framer Motion Three.js Firebase Python


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

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%

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

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •