A scalable, modular, and production-ready Learning Management System (LMS) API built with FastAPI. The project follows clean architecture principles, asynchronous programming, and RESTful API best practices to support modern e-learning platforms.
🛠️ Developed by Farid Ahmed
- 👤 User Authentication & Authorization (JWT)
- 🎓 Student & Instructor Management
- 📚 Course Management
- 📝 Lesson & Module Management
- 📂 File Upload Support
- 📖 Enrollment System
- 📊 Student Progress Tracking
- 🧾 Quiz & Assignment APIs
- 🏆 Certificate Management
- 🔐 Role-Based Access Control (RBAC)
- ⚡ FastAPI Async Support
- 📖 Automatic Swagger API Documentation
- 🐳 Docker Ready
- 🗄️ Database Migration with Alembic
.
├── app/
│ ├── api/
│ │ └── v1/
│ │ ├── endpoints/
│ │ │ ├── auth.py
│ │ │ ├── users.py
│ │ │ ├── courses.py
│ │ │ ├── lessons.py
│ │ │ ├── enrollments.py
│ │ │ ├── quizzes.py
│ │ │ └── certificates.py
│ │ └── api.py
│ │
│ ├── core/
│ │ ├── config.py
│ │ └── security.py
│ │
│ ├── crud/
│ ├── db/
│ │ ├── base.py
│ │ ├── session.py
│ │ └── init_db.py
│ │
│ ├── models/
│ ├── schemas/
│ ├── services/
│ ├── utils/
│ └── main.py
│
├── tests/
├── alembic/
├── requirements.txt
├── Dockerfile
├── .env.example
└── README.md
Client
│
▼
FastAPI API
│
▼
Authentication (JWT)
│
▼
Business Services
│
▼
CRUD Layer
│
▼
SQLAlchemy ORM
│
▼
PostgreSQL / MySQL
- Python
- FastAPI
- SQLAlchemy
- Pydantic
- Alembic
- PostgreSQL
- MySQL
- SQLite
- JWT Authentication
- Role-Based Access Control (RBAC)
- Docker
- Nginx
- Linux
git clone <repository-url>
cd lms-apipython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtCreate a .env file.
DATABASE_URL=postgresql://username:password@localhost/lms_db
SECRET_KEY=your_secret_key
ACCESS_TOKEN_EXPIRE_MINUTES=30uvicorn app.main:app --reloadApplication:
http://localhost:8000
Swagger Documentation:
http://localhost:8000/docs
ReDoc:
http://localhost:8000/redoc
- Authentication
- Users
- Students
- Instructors
- Courses
- Categories
- Lessons
- Modules
- Enrollments
- Quizzes
- Assignments
- Certificates
- Progress Tracking
- Notifications
| Module | Endpoint |
|---|---|
| Authentication | /api/v1/auth |
| Users | /api/v1/users |
| Courses | /api/v1/courses |
| Lessons | /api/v1/lessons |
| Enrollments | /api/v1/enrollments |
| Quizzes | /api/v1/quizzes |
| Certificates | /api/v1/certificates |
pytestBuild:
docker build -t lms-api .Run:
docker run -p 8000:8000 lms-api- Payment Gateway Integration
- Live Classes
- Video Streaming
- Discussion Forum
- AI Learning Assistant
- Email Notifications
- Mobile API
- Analytics Dashboard
Farid Ahmed
Software Engineer
- GitHub: https://github.com/faridahmed-devhub
- LinkedIn: https://linkedin.com/in/faridahmed-devhub
- Email: faridahmed.devhub@gmail.com
Licensed under the MIT License.