Skip to content

CodeFlow: A modern Learning Management System (LMS) for programming educationβ€”think virtual classrooms for courses and skills. Built with Python, Flask, Bootstrap, and SQLAlchemy. Features structured learning paths, progress tracking, and a rich content editor. πŸš€

Notifications You must be signed in to change notification settings

KhalilAmamri/CodeFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ CodeFlow

CodeFlow Logo

A modern, professional learning platform for programming and technology education

Python Flask Bootstrap SQLAlchemy License

Features β€’ Installation β€’ Usage β€’ API β€’ Contributing β€’ License


Project overview β€” Home page

Screenshot β€” Home page / course list (click to enlarge on GitHub)

Other screenshots:

Login{width=150} Β  Create Account{width=150} Β  New Lesson{width=150} Β  Admin{width=150}

Click any thumbnail to view the full-size image.

πŸ“– About

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.

🎯 Mission

To create a seamless learning experience that flows naturally from beginner to advanced, making programming education accessible and engaging for everyone.


✨ Features

πŸ‘¨β€πŸŽ“ For Learners

  • πŸ“š 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

πŸ‘¨β€πŸ« For Instructors

  • ✏️ 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

βš™οΈ Technical Features

  • πŸ” 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

πŸ› οΈ Technology Stack

Category Technology Version Purpose
Backend Python 3.8+ Core language
Framework Flask 2.0+ Web framework
Database SQLAlchemy Latest ORM & migrations
Frontend Bootstrap 5.3+ CSS framework
Admin Flask-Admin Latest Admin interface
Email Flask-Mail Latest Email service

πŸš€ Quick Start

Prerequisites

  • Python Python 3.8 or higher
  • Git Git for version control
  • Pip pip for package management

Installation

  1. πŸ“₯ Clone the repository

    git clone https://github.com/yourusername/codeflow.git
    cd codeflow
  2. 🐍 Create virtual environment

    python -m venv venv
  3. πŸ”§ Activate virtual environment

    Windows:

    venv\Scripts\Activate.ps1

    macOS/Linux:

    source venv/bin/activate
  4. πŸ“¦ Install dependencies

    pip install -r requirements.txt
  5. βš™οΈ Environment setup

    Create a .env file 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]
  6. πŸ—„οΈ 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
  7. πŸ‘€ 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()
  8. πŸš€ Run the application

    python run.py
  9. 🌐 Access the application

    Open your browser and navigate to: http://127.0.0.1:5000


πŸ“ Project Structure

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

πŸ”§ Configuration

Environment Variables

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 ❌

Database Configuration

  • Development: SQLite (default)
  • Production: PostgreSQL, MySQL, or other SQLAlchemy-supported databases

πŸ‘₯ User Roles

πŸ‘€ Regular Users

  • Create and manage their own lessons
  • Access dashboard and profile management
  • Browse courses and lessons
  • Rate and review content

πŸ‘‘ Admin Users

  • Full access to Flask-Admin panel
  • Manage all users, courses, and lessons
  • System administration capabilities
  • Analytics and reporting

πŸš€ Deployment

Production Checklist

  • 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

Example Production Setup

# Install production dependencies
pip install gunicorn psycopg2-binary

# Run with Gunicorn
gunicorn -w 4 -b 0.0.0.0:8000 run:app

πŸ“Š API Documentation

Authentication Endpoints

Method Endpoint Description Auth Required
POST /register User registration ❌
POST /login User login ❌
GET /logout User logout βœ…
POST /reset_password Request password reset ❌

Content Endpoints

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 βœ…

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch
    git checkout -b feature/amazing-feature
  3. πŸ’Ύ Commit your changes
    git commit -m 'Add amazing feature'
  4. πŸ“€ Push to the branch
    git push origin feature/amazing-feature
  5. πŸ”€ Open a Pull Request

Development Guidelines

  • Follow PEP 8 style guidelines
  • Write comprehensive tests
  • Update documentation
  • Ensure all tests pass

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ“ž Contact & Support

CodeFlow Development Team

Email GitHub YouTube


πŸ™ Acknowledgments

  • 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

CodeFlow - Where learning flows naturally πŸš€

Made with ❀️

About

CodeFlow: A modern Learning Management System (LMS) for programming educationβ€”think virtual classrooms for courses and skills. Built with Python, Flask, Bootstrap, and SQLAlchemy. Features structured learning paths, progress tracking, and a rich content editor. πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published