nerubrain
A comprehensive browser extension that intelligently automates Coursera learning activities while maintaining academic integrity and enhancing the learning experience.
Coursera Automation Extension
A comprehensive browser extension that intelligently automates Coursera learning activities while maintaining academic integrity and enhancing the learning experience.
#Table of Contents
- Features
- Architecture
- Quick Start
- Installation
- Development Setup
- Usage
- Testing
- Troubleshooting
- Contributing
- License
#Features
##Core Automation Features
- Quiz Automation - Intelligent quiz completion with answer validation
- Video Management - Automated video playback with speed optimization
- Reading Materials - Smart reading completion tracking
- Ungraded Plugins - Automated handling of interactive elements
- Discussion Participation - Structured discussion engagement
- Shareable Links - Easy content sharing functionality
- Advanced Analytics - Performance tracking and improvement suggestions
##Technical Features
- Manifest V3 - Modern browser extension architecture
- TypeScript - Type-safe development with enhanced DX
- 100% Test Coverage - Comprehensive testing with Jest
- Clean Architecture - SOLID principles and clean code
- Error Handling - Robust error reporting and recovery
- Privacy-First - Local processing with minimal data collection
#Architecture
##Frontend (Browser Extension)
src/
├── background/ # Service worker
├── content/ # Content scripts
├── popup/ # Extension popup
├── core/ # Core automation logic
├── utils/ # Utility functions
└── types/ # TypeScript definitions
##Backend (Python API)
backend/
├── main.py # FastAPI application
├── models/ # Data models
├── services/ # Business logic
└── tests/ # Backend tests
#Quick Start
##1. Load Extension (2 minutes)
- Open Chrome browser
- Go to:
chrome://extensions/
- Turn ON "Developer mode" (toggle top-right)
- Click "Load unpacked"
- Select folder:
/path/to/nerubrain/dist
- Extension loads with blue circular icon
##2. Test Basic Functionality (1 minute)
- Click extension icon on ANY website
- Popup should open immediately
- Shows page information and controls
##3. Test on Coursera (2 minutes)
- Go to: https://www.coursera.org/learn/machine-learning
- Click extension icon
- Should show "Coursera Page" and "Automatable: Yes"
- "Start Automation" button should be ENABLED
#Installation
##Prerequisites
- Chrome browser
- Node.js 18+ and npm
- Python 3.8+
##Backend Setup
# Navigate to backend directory
cd nerubrain/backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Start the API server (from backend directory)
uvicorn main:app --reload --host 0.0.0.0 --port 8000
##Frontend Setup
# Install dependencies
npm install
# Start development build with watch mode
npm run dev
# Build for production
npm run build
##Loading Extension in Chrome
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
dist
folder - The extension should now appear in your extensions list
#Usage
##Basic Usage
- Navigate to Coursera - Go to any Coursera course
- Open Extension - Click the extension icon in your browser toolbar
- Configure Settings - Adjust automation preferences
- Start Automation - Click "Start Automation" for the current page
##Advanced Features
###Settings Configuration
- Video Speed: Adjust playback speed (1x - 2x)
- Quiz Delay: Set delay between quiz actions
- Feature Toggles: Enable/disable specific automation features
- Safety Settings: Configure retry limits and timeouts
###Page Types Supported
- ✅ Quiz Pages - Multiple choice, true/false, text input
- ✅ Video Lectures - Automated playbook and completion
- ✅ Reading Materials - Progress tracking and completion
- ✅ Discussion Forums - Structured participation
- ✅ Assignments - Basic automation support
##Real-World Testing
###Test with Free Course
- Go to: https://www.coursera.org/learn/machine-learning
- Click "Enroll for Free" (no payment required)
- Navigate to first video lesson
- Click extension icon → Start Automation
- Video should auto-play and speed up
###Test Different Content Types
Video Lecture Testing:
- Find a video lecture in the course
- Click extension icon
- Start automation
- Expected: Video should auto-play and speed up
Quiz Testing:
- Find a quiz or practice exercise
- Click extension icon
- Start automation
- Expected: Quiz questions should be automatically answered
Reading Material Testing:
- Find reading material/articles
- Click extension icon
- Start automation
- Expected: Reading should be marked as completed
#Testing
##Running Tests
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
# Run specific test files
npm test -- dom.test.ts
##Test Coverage Requirements
- Line Coverage: 100%
- Branch Coverage: 90%+
- Function Coverage: 90%+
- Statement Coverage: 100%
##Manual Testing Checklist
###Basic Functionality
- Extension loads without errors
- Popup opens on any website
- Correctly detects Coursera vs non-Coursera pages
- Feature toggles work
- Can start automation on Coursera
- Backend server running and accessible
###Expected Results
On Any Website (e.g., google.com):
- Page Type: "Other Website"
- Automatable: "No"
- Start button: DISABLED
On Coursera.org:
- Page Type: "Coursera Page"
- Automatable: "Yes"
- Start button: ENABLED
When Starting Automation:
- Status: Changes to "Automation Active" (blue pulsing dot)
- Log: Shows "Automation started successfully"
- Buttons: Start disabled, Stop enabled
#Troubleshooting
##Extension Issues
###Popup Won't Open
- Go to
chrome://extensions/
- Check for any red error text under the extension
- Click refresh icon (🔄) on extension
- Try clicking the icon again
###Extension Shows Errors
- Check that all files exist in
dist/
folder - Reload extension
- Check browser console for errors
###Content Script Not Working
- Go to a Coursera page
- Open Developer Tools (F12)
- Check Console for "[Coursera Automation]" messages
- Look for any error messages
##Backend Issues
###Backend Not Responding
# Restart backend
pkill -f uvicorn
cd nerubrain/backend
source venv/bin/activate
uvicorn main:app --reload --host 0.0.0.0 --port 8000
###Test Backend Endpoints
curl http://localhost:8000/health
curl http://localhost:8000/api/courses
##Common Solutions
Extension not loading:
# Rebuild extension
npm run clean && npm run build
# Reload in Chrome
# Go to chrome://extensions/ → click refresh icon
Content security policy errors:
- Ensure CSP has been removed from manifest.json
- Check popup console for blocked resource errors
Permission issues:
- Verify host permissions granted for coursera.org
- Check if extension has required permissions
#Development Workflow
##Project Structure
nerubrain/
├── dist/ # Built extension files
├── src/ # Source TypeScript files
├── backend/ # Python FastAPI backend
├── tests/ # Test files
├── package.json # Node.js dependencies
├── tsconfig.json # TypeScript configuration
├── webpack.config.js # Build configuration
└── README.md # This file
##Quick Commands
# Terminal 1: Start backend
cd nerubrain/backend
source venv/bin/activate # On Windows: venv\Scripts\activate
uvicorn main:app --reload --port 8000
# Terminal 2: Build extension
cd nerubrain
npm run build
# Terminal 3: Run tests
cd nerubrain
npm test
##File Monitoring
# Monitor backend logs
tail -f backend/logs/app.log
# Watch webpack rebuild
npm run dev
#Security & Privacy
##Privacy Protection
- Local Processing - Most operations happen locally
- Minimal Data Collection - Only essential data is stored
- Encrypted Storage - Sensitive data is encrypted
- No External Tracking - No third-party analytics
##Academic Integrity
- Transparent Operation - Clear indication of automation
- Learning Enhancement - Focus on efficiency, not cheating
- Respect Course Policies - Compliance with Coursera ToS
- Educational Purpose - Designed to enhance learning
##Technical Security
- Input Validation - All inputs are validated and sanitized
- Secure Communication - HTTPS for all API calls
- Regular Updates - Timely security patches
#Contributing
We welcome contributions! Please follow these guidelines:
##Development Standards
- TypeScript - Use strict type checking
- ESLint - Follow configured linting rules
- Prettier - Code formatting is enforced
- Jest - Write comprehensive tests
- Clean Code - Follow SOLID principles
##Workflow
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes with tests
- Ensure all tests pass:
npm test
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
#License
This project is licensed under the MIT License - see the LICENSE file for details.
#Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
⚠️ Disclaimer: This extension is for educational purposes and to enhance learning efficiency. Please ensure compliance with your institution's academic integrity policies and Coursera's Terms of Service.