Skip to content
maalikhassanPublic

About

A Personal Brain Training Management System optimized for personalized cognitive health using the Hook Model made with React and CapacitorJS wrapper for android

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MindForge 🧠⚑

Stop Scrolling. Start Sharpening.

MindForge is a high-performance Cognitive Optimization Dashboard built to combat brain rot and accelerate neuroplasticity. This hybrid Android app leverages React + Capacitor to deliver a personal "Neuro-Compass"β€”instantly guiding users to high-ROI cognitive protocols based on their current energy state.

Version License Android


🎯 The Problem

Modern life breeds decision fatigue. When faced with 20 minutes of free time, your brain defaults to scrollingβ€”not because you're lazy, but because friction kills momentum. MindForge eliminates the "What should I do?" bottleneck by serving executable protocols on demand.

If thinking is required, scrolling wins. MindForge removes the thinking.


πŸš€ Core Features

1. The Neuro-Compass Dashboard 🧭

  • Energy-Based Filtering: Instantly surface protocols matching your current state (High/Low energy, 5-90 min time blocks)
  • GitHub-Style Heatmap: Visualize your 13-week cognitive training streak with satisfying green squares
  • Timezone-Aware Logging: Custom offset logic ensures late-night grinding counts toward the correct calendar day (no more UTC bugs!)
  • Smart Sorting: Incomplete tasks float to the top; completed protocols auto-group under a "Completed Today" separator

2. The Infinite Library πŸ“š

  • 15+ Curated Protocols: NSDR, Physiological Sigh, Box Breathing, Cyclic Hyperventilation, Pomodoro Technique, Memory Palace, Cold Exposure, etc.
  • Scientific Descriptions: Every protocol includes neuroscience explanations (e.g., "Triggers Mammalian Dive Reflex to lower heart rate via vagus nerve")
  • Dynamic Store UI: Browse, search, and add protocols to your active dashboard
  • Smart Sorting: Active protocols appear first; undiscovered items stay at the bottom
  • Live Search: Real-time filtering across titles and descriptions

3. Neuro-Fuel Notifications πŸ”₯

  • The Wisdom Engine: Daily motivational quotes delivered at 9 AMβ€”mixing hard truths, science facts, and action triggers
    • "Your brain is dying slightly faster today. Reverse it."
    • "You can grow 700 new neurons today, or let them wither. Your choice."
  • Conflict-Proof Architecture: Reserved ID system (10000-10999) ensures motivational alerts never overwrite task reminders
  • Silence-Proof Engineering: Custom notification channels with Importance Level 5 + custom icons bypass Android's battery optimizations
  • Weekly Auto-Scheduling: 7-day rolling schedule with randomized quotes

4. Battle-Tested for Android πŸ“±

  • Zero-Latency UI: Optimized with useMemo, useCallback, and aggressive cleanup patterns
  • Offline-First: 100% local data via localStorage with automated migration hooks for seamless data upgrades
  • Dark Mode Native: MindForge Purple (#9333ea) gradient theme with glassmorphism effects
  • Native Assets: Custom splash screens, adaptive icons, and status bar theming
  • Stateless Architecture: Direct localStorage access prevents the "Amnesia Bug" that plagued early versions

πŸ› οΈ Tech Stack

Layer Technology
Frontend React 18 + Vite (HMR)
Styling Tailwind CSS v3 (Custom Purple Theme)
Mobile Runtime Capacitor 6 + Android Platform
State Management React Hooks + Direct LocalStorage Access
Notifications Capacitor Local Notifications Plugin v8
Type Safety TypeScript (Data Layer)

πŸ“¦ Installation & Build

Prerequisites

  • Node.js v18+
  • Android Studio (for APK generation)
  • Android SDK (API Level 22+)

1️⃣ Clone & Install

git clone https://github.com/maalikhassan/mindforge.git
cd mindforge
npm install

2️⃣ Run in Browser (Dev Mode)

npm run dev

Open http://localhost:5173 to preview the web version.

3️⃣ Sync to Android

npm run build
npx cap sync

4️⃣ Build Production APK

# Open in Android Studio
npx cap open android

# Then in Android Studio:
# Build β†’ Generate Signed Bundle / APK
# Select: APK β†’ Release
# Sign with your keystore

πŸ—οΈ Architecture Highlights

Data Flow

User Action β†’ ActionCard Component β†’ useBrainLog Hook β†’ localStorage + Storage Event
                                                              ↓
                                                      Dashboard Re-renders
                                                              ↓
                                                      Heatmap Updates

Key Design Patterns

  • Stateless Hooks: useBrainLog and useMyHacks use useCallback with direct localStorage reads to prevent data wipe bugs
  • Storage Events: Cross-component sync via window.dispatchEvent(new Event('storage'))
  • Migration System: useMyHacks automatically upgrades existing user data with new descriptions/URLs from INITIAL_BRAIN_HACKS
  • Reserved ID Namespacing: Task reminders use IDs < 10000; motivation notifications use 10000-10999

File Structure

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ Dashboard.jsx          # Main training view
β”‚   β”œβ”€β”€ ExploreView.jsx        # Protocol library browser
β”‚   β”œβ”€β”€ JournalView.jsx        # Activity timeline + filters
β”‚   β”œβ”€β”€ ActionCard.jsx         # Individual protocol cards
β”‚   β”œβ”€β”€ Heatmap.jsx            # 13-week contribution graph
β”‚   └── QuickStartModal.jsx    # Neuro-Compass energy filter
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ useBrainLog.js         # Activity logging (stateless)
β”‚   └── useMyHacks.js          # Active protocol management + migration
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ brainHacks.ts          # Initial 19 seed protocols (TypeScript)
β”‚   β”œβ”€β”€ masterLibrary.ts       # 15 advanced library protocols
β”‚   └── wisdomQuotes.js        # 32 motivational wisdom quotes
└── services/
    └── notificationService.js # Notification scheduling + channels

πŸ§ͺ Known Issues & Solutions

Issue: Notifications Silent After Install

Cause: Android caches notification channel settings
Fix: Uninstall app β†’ Reinstall (channel config is set on first launch)

Issue: Late-Night Logs Show Wrong Date

Cause: UTC vs Local Time
Fix: Already implemented! Logs use timezone offset calculation for accuracy

Issue: Old Protocols Missing Descriptions

Cause: Legacy data from pre-description era
Fix: useMyHacks auto-syncs stored items with fresh data from INITIAL_BRAIN_HACKS


🎨 Design Philosophy

MindForge follows these principles:

  1. Friction = Death: If a user has to think, they'll scroll instead. Remove all decision points.
  2. Visual Feedback Loops: The heatmap provides instant dopamine via green squaresβ€”hijacking the same reward circuits as social media.
  3. Scientific Legitimacy: Every protocol includes neuroscience references. No "woo-woo," only peer-reviewed mechanisms.
  4. Dark Mode First: Designed for night owls and late-night grinders with zero eye strain.
  5. Offline Resilience: Zero server dependencies. Your brain training data stays on your device.

πŸ›£οΈ Roadmap

  • Streaks & Gamification: Track longest streak with confetti effects
  • Export/Import: Backup brain logs to JSON
  • Apple Watch Integration: Quick-start protocols from wrist
  • Spaced Repetition Mode: AI-suggested review cycles for skills
  • Social Proof: Anonymous global heatmap comparison
  • Voice Commands: "Hey MindForge, I have 15 minutes and high energy"

🀝 Contributing

Created by Maalik Hassan. Contributions welcome!

How to Contribute:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/new-protocol)
  3. Commit changes (git commit -m 'Add Memory Palace 2.0')
  4. Push to branch (git push origin feature/new-protocol)
  5. Open a Pull Request

Areas for Contribution:

  • New neuroscience protocols (must include peer-reviewed sources)
  • Performance optimizations
  • UI/UX improvements
  • Accessibility features
  • Localization (i18n)

πŸ“„ License

MIT License - See LICENSE for details.


πŸ™ Acknowledgments

  • Dr. Andrew Huberman for neuroscience protocols (NSDR, Cold Exposure, Morning Sunlight)
  • Cal Newport for Deep Work methodology
  • Wim Hof for breathwork techniques
  • GitHub for heatmap inspiration

πŸ“ž Support

Found a bug? Have a feature request?
Open an issue: GitHub Issues


Built with 🧠 by humans, for humans trying to stay human.

About

A Personal Brain Training Management System optimized for personalized cognitive health using the Hook Model made with React and CapacitorJS wrapper for android

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages