The Active Learning Workspace
Transform passive learning into active knowledge with AI-powered organization
Features • Installation • Usage • Documentation • Contributing
BrainerAI is a desktop learning workspace that helps you capture and organize web content. It combines a PyQt6 desktop application with a browser extension to clip content from any website, organize it into learning paths, and optionally use AI for tagging and flashcard generation.
|
Web Content Clipping
Learning Paths
|
AI Integration (Optional)
Local-First Architecture
|
┌──────────────────────────────┐
│ Browser Extension │
│ (Manifest V3) │
│ Chrome/Edge │
└──────────────┬───────────────┘
│
HTTP REST API
│
▼
┌──────────────────────────────┐
│ Flask Local Server │
│ (localhost:5050) │
└──────┬─────────────────┬─────┘
│ │
│ │
┌────────▼─────┐ ┌──────▼────────┐
│ PyQt6 GUI │ │ AI Engine │
│ Desktop App │ │ (OpenAI API) │
└────────┬─────┘ └───────────────┘
│
│
┌────────▼─────────┐
│ JSON Storage │
│ (Local Files) │
└──────────────────┘
Core Components:
| Component | Technology | Purpose |
|---|---|---|
| Desktop Application | PyQt6 | Main GUI interface with modern styling |
| Browser Extension | JavaScript ES6+ | Web content capture (Manifest V3) |
| Local API Server | Flask + CORS | Bridge between extension and desktop |
| AI Engine | OpenAI GPT-3.5 | Optional intelligent features |
| Data Storage | JSON | Lightweight, portable persistence |
Ensure you have Python 3.8 or higher installed. We recommend using uv for faster dependency installation.
1. Clone the Repository
git clone https://github.com/yourusername/brainerai.git
cd brainerai2. Install Dependencies
# Using uv (recommended for speed)
uv pip install -r requirements.txt
# Or using standard pip
pip install -r requirements.txt3. Launch Application
python main.pyThe desktop application will launch and automatically start the local API server on port 5050.
Installation Steps:
- Open your browser (Chrome or Edge)
- Navigate to
chrome://extensions/ - Enable Developer mode (toggle in top-right)
- Click Load unpacked
- Select the
extensionfolder from the project directory - Pin the extension icon to your toolbar for easy access
To enable AI-powered features:
| Step | Action |
|---|---|
| 1 | Get API key from OpenAI Platform |
| 2 | Launch BrainerAI desktop app |
| 3 | Go to File → Settings |
| 4 | Paste your API key and save |
Note: The application works fully without AI features. OpenAI integration is optional for enhanced functionality.
Organize your knowledge by creating themed learning paths:
1. Click "+ New Learning Path" in the sidebar
2. Enter a descriptive name (e.g., "Machine Learning", "Python Basics")
3. Choose a color for visual identification
4. Add optional description for context
From Any Webpage:
- Select the text, code, or content you want to save
- Click the BrainerAI extension icon in your browser
- Choose content type:
- TEXT - Articles, documentation, blog posts
- VIDEO - YouTube tutorials with timestamps
- CODE - Code snippets and examples
- Select target learning path
- Click "SAVE CLIP"
The extension automatically captures metadata including source URL, page title, and timestamps for videos.
Right-click any clip to access:
| Feature | Description | Benefit |
|---|---|---|
| Generate Tags | AI analyzes content and suggests 3-5 relevant tags | Better organization and searchability |
| Generate Flashcards | Creates Q&A pairs from clip content | Active recall for better retention |
| Shortcut | Action |
|---|---|
Ctrl + F |
Open global search dialog |
Ctrl + N |
Create new learning path |
Ctrl + , |
Open settings |
F5 |
Refresh all data |
Ctrl + Q |
Quit application |
# GUI Framework
PyQt6 # Cross-platform desktop interface
PyQt6-WebEngine # Web content rendering
# Backend
Flask # Local API server
flask-cors # Cross-origin support
# AI & Utilities
openai # OpenAI API client
requests # HTTP requests
# Distribution
pyinstaller # Executable bundlingBrainerAI/
├── assets/ # Icons and screenshots
├── data/ # JSON storage
│ ├── clips/
│ ├── config.json
│ └── learning_paths.json
├── extension/ # Browser extension
│ ├── manifest.json
│ ├── popup.html/js
│ ├── content.js
│ └── background.js
├── src/
│ ├── api/ # Flask server
│ ├── core/ # AI engine, file storage
│ ├── gui/ # PyQt6 UI
│ └── utils/ # Helper functions
├── config.py
├── main.py
└── requirements.txt
Create standalone executables for distribution:
python build_exe.pyOutput Locations:
- Windows:
dist/BrainerAI.exe - macOS:
dist/BrainerAI.app - Linux:
dist/BrainerAI
The build includes Python runtime, all dependencies, and application assets. No installation required.
BrainerAI uses a simple, portable JSON-based storage system:
| File | Content | Purpose |
|---|---|---|
data/learning_paths.json |
Learning path metadata | Stores path names, colors, descriptions |
data/clips/path_{id}.json |
Clips for each path | Individual clip content and metadata |
data/config.json |
User settings | API keys, preferences |
Benefits:
- Human-readable format for easy inspection
- Portable - copy
data/folder to backup or migrate - No database setup required
- Privacy-first - all data stays local
The local Flask server runs on http://localhost:5050 and provides:
| Endpoint | Method | Description | Response |
|---|---|---|---|
/health |
GET |
Server health check | {"status": "ok", "app": "BrainerAI"} |
/learning-paths |
GET |
List all learning paths | Array of path objects |
/clips |
POST |
Create new clip | {"id": int, "message": "..."} |
/clips/{path_id}/{clip_id} |
GET |
Retrieve specific clip | Clip object with details |
/stats |
GET |
Application statistics | {"learning_paths": int, "clips": int} |
Example Request:
curl -X POST http://localhost:5050/clips \
-H "Content-Type: application/json" \
-d '{
"learning_path_id": 1,
"clip_type": "text",
"content": "Your content here",
"title": "Clip Title",
"auto_tag": true
}'Planned Features:
- Spaced repetition system for flashcards
- Export learning paths to Markdown/PDF
- Integrated video player with timestamp navigation
- Dark mode theme
- Optional cloud synchronization
- Import from Notion/Obsidian
- Mobile companion app
Contributions are welcome! Here's how you can help:
| Type | How to Help |
|---|---|
| Report Bugs | Open an issue with steps to reproduce |
| Suggest Features | Open an issue with your idea and use case |
| Submit Code | Fork → Create branch → Make changes → PR |
| Improve Docs | Fix typos, add examples, clarify instructions |
MIT License
Copyright (c) 2025 BrainerAI Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
See LICENSE file for full details.
.png)
.png)