Skip to content

Latest commit

 

History

History
216 lines (163 loc) · 6.23 KB

File metadata and controls

216 lines (163 loc) · 6.23 KB

CourseHub 🎓

A modern online course registration platform with AI-powered learning tracking and automated enrollment management.

Python SQLite Theme


Overview

CourseHub is a full-stack web application built with Flask that enables students to register, enroll in courses, and track their learning progress. Admins can manage courses, monitor student performance, and view analytics — all within a sleek dark-themed interface.


Features

👨‍🎓 Student Features

Feature Description
Registration & Login Email-based signup with OTP verification
Course Enrollment Browse and enroll; auto-approved after 5 minutes
Learning Tracker Chapter-by-chapter progress with checkpoints
Code Editor Built-in practice editor (CodeMirror)
AI Recommendations Personalized suggestions based on learning patterns

🛠️ Admin Features

Feature Description
Course Management Create, edit, and manage courses and chapters
Student Management View enrollments, progress, and analytics
Charts & Analytics Monthly enrollment bar charts, course-wise pie charts
Profile Management Admin account settings and details

🤖 Automation

  • Auto-Enrollment Bot — Approves pending enrollments after 5 minutes and notifies students via email
  • AI Learning Tracker — Adapts content based on learning speed and generates analytics reports

Courses Available

Java · Python · C++ · C · Computer Networks · Office Automation Tools · SQL · Use of AI


Tech Stack

Layer Technology
Frontend HTML, CSS, JavaScript
Backend Python (Flask)
Database SQLite
Charts Chart.js
Code Editor CodeMirror

Getting Started

1. Clone the Repository

git clone <repo-url>
cd coursehub

2. Install Dependencies

pip install -r requirements.txt

3. Configure Email (for OTP & notifications)

export MAIL_USERNAME="your-email@gmail.com"
export MAIL_PASSWORD="your-app-password"

Gmail users: Use an App Password instead of your account password.

4. Run the Application

# Start the Flask app
python app.py

# (Optional) Start the auto-enrollment bot in a separate terminal
python bot.py

5. Open in Browser

http://localhost:5000

Admin Access

Register an admin account, then log in with:

  • Email: admin@<branch>.edu.nitte.in
  • Password: admin@2027 (or whatever you set during registration)

Project Structure

coursehub/
├── app.py                  # Main Flask application
├── bot.py                  # Auto-enrollment approval bot
├── ai_learning_tracker.py  # AI learning tracking system
├── requirements.txt        # Python dependencies
├── coursehub.db            # SQLite database (auto-created)
├── templates/
│   ├── base.html
│   ├── landing.html
│   ├── login.html
│   ├── signup.html
│   ├── verify_otp.html
│   ├── dashboard.html
│   ├── profile.html
│   ├── course_view.html
│   ├── chapter_view.html
│   └── admin_*.html        # Admin templates
└── static/
    └── css/
        └── style.css       # Dark theme styles

API Reference

Student Endpoints
Method Endpoint Description
POST /signup Student registration
POST /verify-otp OTP verification
POST /login User login
GET /dashboard Student dashboard
GET /profile Student profile
GET /enroll/<id> Enroll in a course
GET /course/<id> View course
GET /chapter/<id> View chapter content
POST /complete-checkpoint/<id> Complete checkpoint
POST /api/track-progress Track learning progress
GET /api/ai-recommendations/<id> Get AI recommendations
GET /api/learning-report/<id> Get learning report
Admin Endpoints
Method Endpoint Description
POST /admin-signup Admin registration
GET /admin-dashboard Admin dashboard
GET /admin/courses Manage courses
POST /admin/create-course Create course
POST /admin/edit-course/<id> Edit course
POST /admin/add-chapter/<id> Add chapter
GET /admin/enrollments View all enrollments
GET /admin/students View all students
GET /admin/student-progress/<id> View student progress
GET /admin/course/<id>/students View course students

Database Schema

Table Purpose
user Student accounts
admin Admin accounts
course Course information
chapter Course chapters
enrollment Student–course enrollments
student_progress Learning progress tracking
otp_session Email OTP verification

UI Theme

CourseHub uses a dark "Nothing OS" inspired theme:

Token Value
Background hsl(0 0% 8%) — Very dark gray
Surface/Cards hsl(0 0% 12%) — Dark gray
Text hsl(0 0% 98%) — Near white
Accent hsl(0 72.2% 50.6%) — Vibrant red
Borders hsl(0 0% 14.9%) — Subtle gray

Production Deployment

  • Use Gunicorn or another WSGI server instead of Flask's dev server
  • Switch to PostgreSQL for a more robust database
  • Set all credentials via environment variables
  • Enable HTTPS via a reverse proxy (e.g., Nginx)
  • Use a dedicated transactional email service (e.g., SendGrid, Mailgun)

License

This project is intended for educational purposes.


Contributing

Issues and pull requests are welcome! Feel free to open a discussion for major changes before submitting a PR.