Logo Lanfrica

pingoboxer/Course-Enrollment-Management-API

Domaine:

education

Type de record:

software
Créateur:
pin
HĂŽte:
Altschool Africa Second Semester Project Exam # 📘 Course Management & Enrollment API A modern, modular backend system built with **FastAPI** that manages users, courses, and student enrollments. This project demonstrates clean architecture principles, role-based access control, validation handling, and relationship management using in-memory storage. --- ## 🚀 Features ### đŸ‘€ User Management * Create users (student/admin) * Retrieve all users * Retrieve a specific user by ID * Email validation using Pydantic `EmailStr` * Duplicate email prevention ### 📚 Course Management * Admin-only course creation * Update course details * Delete course (with cascading enrollment cleanup) * Prevent duplicate course codes * Public course retrieval ### 🎓 Enrollment System * Student enrollment into courses * Duplicate enrollment prevention * Student deregistration * Admin force deregistration * View student enrollments * View course enrollments (admin) --- ## 🏗 Architecture & Design This project follows a **layered architecture pattern**: ``` ├── README.md ├── app │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-314.pyc │ │ └── main.cpython-314.pyc │ ├── api │ │ └── v1 │ │ ├── courses.py │ │ ├── enrollments.py │ │ └── users.py │ ├── core │ │ ├── __init__.py │ │ ├── __pycache__ │ │ └── storage.py │ ├── main.py │ ├── schemas │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── common.py │ │ ├── course_schema.py │ │ ├── enrollment_schema.py │ │ └── user_schema.py │ └── services │ ├── __init__.py │ ├── __pycache__ │ ├── course_service.py │ ├── enrollment_service.py │ └── user_service.py ├── env │ ├── pytest.ini ├── requirements.txt └── tests ├── __pycache__ │ ├── test_courses.py ├── test_enrollments.py └── test_users.py ``` ### đŸ”č Separation of Concerns | Layer | Responsibility | | ------- | ----------------------- | | api/v1 | HTTP handling only | | Schema | Input/output validatio