How belloumi79/elearning_platform works
Project Components
• Project Type & Purpose: This is a Flask-based e-learning platform that offers secure authentication (via Supabase), an admin dashboard, course and student management, assignment/quiz handling, and real-time updates. The design should clearly capture both the server-side (backend) and client-side (frontend) components.
• Core Components:
• Web Application (Flask backend)
• API Routes and Controllers (located in app/routes/)
• Business Logic / Services (in app/services/)
• Data Models (in app/models/)
• Middleware for authentication (in app/middleware/)
• Database & Storage: PostgreSQL (via Supabase)
• Frontend: HTML templates in app/templates and static assets in app/static
• External Integrations: Supabase for authentication and possibly real-time features
• Utility/Administrative Scripts: Migration and setup files (e.g., supabase migrations, setup_admin.py)
File Structure
• The "app" folder is organized following the application factory pattern (app/__init__.py), with subdirectories for models, routes, services, middleware, templates, and static files.
• There is a clear separation of concerns:
• Routes (controllers) handle incoming HTTP requests and direct them to proper services.
• Services encapsulate business logic.
• Models define data structures for courses, users, students, instructors, and more.
• Middleware (e.g., auth.py) processes requests before passing them to the routes.
• Configuration directories (config/, .env, default.nix, etc.) indicate how the application is set up for different environments.
• Additional directories (e.g., functions) may host serverless functions, implying potential integration with cloud functions.
• The presence of static pages in “home/user/elearning_platform” might indicate landing pages or support for error pages.
Recommended Elements
• Each component and sub-component clearly labeled (e.g., “Flask Application (app/__init__.py)”, “Admin Routes (app/routes/admin.py)”, “Database Models (app/models/)”, “Authentication Middleware (app/middleware/auth.py)”).
• A small section or note to indicate the session management (using flask_session) and security measures (CSRF, JWT tokens).
Final Touches
• Major components and flows are clearly documented with labels.