Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Forecasting Online Course Enrollments

A course enrollment platform I built with Flask and SQLite. Students can sign up, browse courses, and enroll, while admins get a dashboard that shows enrollment stats and forecasts what enrollments might look like over the next 30 days using polynomial regression.

What it does

  • Users can register, log in, and enroll in courses
  • Admins get a separate dashboard with:
    • Total users, courses, and enrollments at a glance
    • Recent enrollment activity
    • A 30-day enrollment forecast chart (built with scikit-learn)
  • There's also a small API endpoint (/api/forecast_data) that returns the forecast as JSON

Built with

  • Flask (Python)
  • SQLite
  • pandas + NumPy for data handling
  • scikit-learn for the forecasting model
  • Werkzeug for password hashing

Getting it running

git clone https://github.com/Chandana3026/Forecasting-Online-Course-Enrollments.git
cd Forecasting-Online-Course-Enrollments
pip install flask pandas numpy scikit-learn werkzeug
python app.py

The first time you run it, it sets up the database automatically — creates an admin account, adds a few sample courses, and generates a year's worth of sample enrollment data so the forecast has something to work with.

Admin login (default)

  • Username: admin
  • Password: admin123

(Obviously don't leave this as-is if you ever deploy it somewhere real.)

How the forecasting works

It groups enrollments by date, fits a degree-2 polynomial regression to the data to catch any trends or seasonal patterns, then projects that forward 30 days. Predictions are capped at zero so it doesn't forecast negative enrollments.

Routes

Route What it does
/ Home page
/register, /login, /logout Auth
/user_dashboard Browse and enroll in courses
/admin_dashboard Admin stats + forecast
/enroll/<course_id> Enroll in a course
/api/forecast_data Forecast data as JSON (admin only)

Note

This was built as a learning project, so a few things aren't production-ready — like the hardcoded secret key in app.py. If you were deploying this for real, you'd want to move that to an environment variable and not commit the database file.

About

A course enrollment system I built with Flask + SQLite. Includes an admin dashboard that forecasts upcoming enrollments using simple polynomial regression, so you can see enrollment trends before they happen.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages