A modern, professional learning platform for programming and technology education
Features β’ Installation β’ Usage β’ API β’ Contributing β’ License
Other screenshots:
{width=150}
Β
{width=150}
Β
{width=150}
Β
{width=150}
Click any thumbnail to view the full-size image.
CodeFlow is a comprehensive learning management system designed to provide a smooth, intuitive experience for both learners and instructors. Built with modern web technologies, it offers structured learning paths, interactive content management, and a professional admin interface.
To create a seamless learning experience that flows naturally from beginner to advanced, making programming education accessible and engaging for everyone.
- π Structured Learning Paths - Browse curated courses and lessons
- π Progress Tracking - Monitor your learning journey with detailed analytics
- π¨ Modern UI/UX - Clean, responsive design that works on any device
- π Smart Search - Find content quickly with advanced filtering
- πΎ Bookmarks - Save favorite lessons for later review
- β Rating System - Rate and review courses to help others
- βοΈ Rich Content Editor - Create engaging lessons with TinyMCE
- πΌοΈ Media Management - Upload images, videos, and course materials
- π Analytics Dashboard - Track course performance and student engagement
- π― Course Management - Organize content with tags and categories
- π₯ Student Management - Monitor progress and provide feedback
- π Secure Authentication - Role-based access control with Flask-Login
- π§ Email Integration - Automated notifications and password reset
- ποΈ Database Migrations - Version-controlled schema management
- π Environment Configuration - Secure .env-based configuration
- π± Responsive Design - Mobile-first approach with Bootstrap 5
- π Admin Panel - Comprehensive Flask-Admin interface
-
π₯ Clone the repository
git clone https://github.com/yourusername/codeflow.git cd codeflow -
π Create virtual environment
python -m venv venv
-
π§ Activate virtual environment
Windows:
venv\Scripts\Activate.ps1
macOS/Linux:
source venv/bin/activate -
π¦ Install dependencies
pip install -r requirements.txt
-
βοΈ Environment setup
Create a
.envfile in the project root:SECRET_KEY=your-super-secret-key-here SQLALCHEMY_DATABASE_URI=sqlite:///codeflow.db MAIL_SERVER=smtp.gmail.com MAIL_PORT=587 MAIL_USE_TLS=true EMAIL_USER=[email protected] EMAIL_PASS=your-app-password MAIL_DEFAULT_SENDER=[email protected]
-
ποΈ Database setup
# Set Flask app export FLASK_APP=run.py # macOS/Linux # $env:FLASK_APP = "run.py" # Windows PowerShell # Initialize database flask db init flask db migrate -m "Initial migration" flask db upgrade
-
π€ Create admin user
flask shell
from codeflow import db, bcrypt from codeflow.models import User admin = User( first_name='Admin', last_name='User', username='admin', email='[email protected]', password=bcrypt.generate_password_hash('admin123').decode('utf-8'), is_admin=True ) db.session.add(admin) db.session.commit() exit()
-
π Run the application
python run.py
-
π Access the application
Open your browser and navigate to:
http://127.0.0.1:5000
CodeFlow/
βββ π codeflow/ # Main application package
β βββ π __init__.py # Application factory
β βββ π config.py # Configuration settings
β βββ π models.py # Database models
β βββ π admin_bp/ # Admin blueprint
β βββ π courses/ # Courses blueprint
β βββ π lessons/ # Lessons blueprint
β βββ π users/ # Users blueprint
β βββ π main/ # Main routes blueprint
β βββ π errors/ # Error handlers
β βββ π templates/ # Jinja2 templates
β βββ π static/ # Static files (CSS, JS, images)
βββ π migrations/ # Database migrations
βββ π instance/ # Instance-specific files
βββ π .env # Environment variables
βββ π run.py # Application entry point
βββ π README.md # This file
| Variable | Description | Default | Required |
|---|---|---|---|
SECRET_KEY |
Flask secret key for sessions | dev-change-me |
β |
SQLALCHEMY_DATABASE_URI |
Database connection string | sqlite:///codeflow.db |
β |
EMAIL_USER |
Email username for notifications | - | β |
EMAIL_PASS |
Email password or app password | - | β |
MAIL_SERVER |
SMTP server | smtp.gmail.com |
β |
MAIL_PORT |
SMTP port | 587 |
β |
MAIL_USE_TLS |
Use TLS encryption | true |
β |
- Development: SQLite (default)
- Production: PostgreSQL, MySQL, or other SQLAlchemy-supported databases
- Create and manage their own lessons
- Access dashboard and profile management
- Browse courses and lessons
- Rate and review content
- Full access to Flask-Admin panel
- Manage all users, courses, and lessons
- System administration capabilities
- Analytics and reporting
- Set
FLASK_ENV=production - Use a production WSGI server (Gunicorn, uWSGI)
- Configure a production database (PostgreSQL recommended)
- Set up proper email configuration
- Configure static file serving
- Set up SSL/HTTPS
- Configure proper logging
# Install production dependencies
pip install gunicorn psycopg2-binary
# Run with Gunicorn
gunicorn -w 4 -b 0.0.0.0:8000 run:app| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/register |
User registration | β |
POST |
/login |
User login | β |
GET |
/logout |
User logout | β |
POST |
/reset_password |
Request password reset | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/courses |
List all courses | β |
GET |
/course/<slug> |
Get course details | β |
POST |
/new_course |
Create new course | β |
GET |
/lesson/<course_slug>/<lesson_slug> |
Get lesson content | β |
POST |
/new_lesson |
Create new lesson | β |
We welcome contributions! Please follow these steps:
- π΄ Fork the repository
- πΏ Create a feature branch
git checkout -b feature/amazing-feature
- πΎ Commit your changes
git commit -m 'Add amazing feature' - π€ Push to the branch
git push origin feature/amazing-feature
- π Open a Pull Request
- Follow PEP 8 style guidelines
- Write comprehensive tests
- Update documentation
- Ensure all tests pass
This project is licensed under the MIT License - see the LICENSE file for details.
- Flask community for the excellent framework
- Bootstrap team for the responsive UI components
- SQLAlchemy for the powerful ORM
- All contributors and users of this platform
