A Flask-based Learning Management System with course management, user authentication, and assessment features.
- User authentication and authorization
- Course management
- Test and quiz creation
- PDF resource management
- Progress tracking
- Admin dashboard
- Clone the repository:
git clone <repository-url>
cd <repository-name>
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a .env file with the following variables:
FLASK_APP=app.py
FLASK_ENV=development
SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite:///lms.db
- Initialize the database:
flask db init
flask db migrate
flask db upgrade
Run the development server:
flask run
- Create a Heroku account and install the Heroku CLI
- Login to Heroku:
heroku login
- Create a new Heroku app:
heroku create <app-name>
- Set environment variables:
heroku config:set FLASK_ENV=production
heroku config:set SECRET_KEY=your-secret-key-here
heroku config:set DATABASE_URL=your-database-url
- Deploy to Heroku:
git push heroku main
- Initialize the database:
heroku run flask db upgrade
For other platforms, ensure you:
- Set the appropriate environment variables
- Use a production-grade WSGI server (gunicorn)
- Configure a production database
- Set up proper static file serving
- Configure SSL/TLS
- Always use strong, unique SECRET_KEY in production
- Use HTTPS in production
- Keep dependencies updated
- Regularly backup the database
- Monitor for security vulnerabilities
MIT License