๐ MindSwitch
Domain-Switchable Cognitive Training Chrome Extension with Persistent Behavioral Analytics
MindSwitch is a full-stack Chrome Extension + Flask backend system designed to provide structured cognitive guidance instead of direct solutions.
Unlike traditional AI sidebars that give answers, MindSwitch follows a mentor-style escalation approach to improve problem-solving skills while tracking behavioral dependency metrics.
๐ Features ๐ง Domain-Switchable Modes
DSA Mode โ Structured algorithmic guidance
Interview Mode โ STAR-based response framework
Study Mode โ Concept extraction and reinforcement
๐ Structured Hint Escalation
Each guidance request provides 3 controlled levels:
Level 1 โ Concept direction
Level 2 โ Pattern insight
Level 3 โ Structured approach
No direct solutions are provided.
๐ Persistent Analytics (MySQL)
Session-based tracking
Unlock logging
Mode usage tracking
Level 2 vs Level 3 usage distribution
Level 3 dependency percentage calculation
๐ Context-Aware Content Extraction
Dynamically injects content script (Manifest V3 compliant)
Extracts page content safely
Applies rule-based pattern detection (e.g., Binary Search, Graph, DP)
๐ Behavioral Metrics
The system computes:
Total unlocks
Mode distribution
Level usage frequency
Level 3 dependency percentage
This enables quantifying over-reliance on deeper hints.
๐ Architecture Chrome Extension (Manifest V3) โ Flask REST API โ MySQL Database โ Analytics Engine
๐ Tech Stack
Frontend: JavaScript (Chrome Extension - MV3)
Backend: Flask (Python)
Database: MySQL
Architecture: REST API-based modular design
๐ Project Structure MindSwitch/ โ โโโ backend/ โ โโโ app.py โ โโโ requirements.txt โ โโโ extension/ โ โโโ manifest.json โ โโโ popup.html โ โโโ popup.js โ โโโ styles.css โ โโโ content.js โ โโโ README.md
โ๏ธ Setup Instructions 1๏ธโฃ Backend Setup cd backend python -m venv venv venv\Scripts\activate # Windows pip install -r requirements.txt python app.py
Backend runs on:
2๏ธโฃ Database Setup CREATE DATABASE mindswitch; USE mindswitch;
CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, email VARCHAR(100), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
CREATE TABLE sessions ( id INT AUTO_INCREMENT PRIMARY KEY, user_id INT, mode VARCHAR(50), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
CREATE TABLE unlock_logs ( id INT AUTO_INCREMENT PRIMARY KEY, session_id INT, mode VARCHAR(50), level_unlocked INT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
3๏ธโฃ Chrome Extension Setup
Open chrome://extensions/
Enable Developer Mode
Click Load Unpacked
Select the extension/ folder
๐ฎ Future Enhancements
AI-powered hint engine with strict solution guardrails
Adaptive weakness scoring
Personalized learning recommendations
Interactive analytics dashboard
User authentication system
๐ฏ Project Objective
MindSwitch aims to:
Encourage structured thinking
Prevent passive solution dependency
Quantify learning behavior
Provide domain-specific cognitive assistance
๐ Version
v1.0 โ Rule-Based Cognitive Engine with Persistent Analytics
Future versions will include AI-powered guarded hint generation.