Skip to content

Commit 3c4889c

Browse files
authored
docs(readme.md):add installation and usage instructions and update project overview
merge with progress
2 parents c8c9ba9 + 1db1158 commit 3c4889c

5 files changed

Lines changed: 216 additions & 4 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.env
22
Pipfile
33
Pipfile.lock
4-
db.sqlite3
4+
db.sqlite3
5+
.idea
6+
./backend/.idea*

README.md

Lines changed: 211 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,211 @@
1-
# slms
1+
# SLMS (Student Learning Management System)
2+
3+
## Table of Contents
4+
5+
- [Overview](#overview)
6+
- [How It Works](#how-it-works)
7+
- [Features](#features)
8+
- [Technology Stack](#technology-stack)
9+
- [Database Schema](#database-schema)
10+
- [Project Structure](#project-structure)
11+
- [Getting Started](#getting-started)
12+
- [Prerequisites](#prerequisites)
13+
- [Backend Setup](#backend-setup)
14+
- [Frontend Setup](#frontend-setup)
15+
- [Using Docker Compose](#using-docker-compose)
16+
- [API Endpoints (Overview)](#api-endpoints-overview)
17+
- [Development & Deployment Notes](#development--deployment-notes)
18+
- [Contribution Guidelines](#contribution-guidelines)
19+
- [License](#license)
20+
21+
## Overview
22+
23+
SLMS is a comprehensive, full-stack web application designed for online learning, course management, and student progress tracking. It features a robust backend powered by Django REST Framework and a modern, responsive frontend built with React and Vite. The system supports user authentication, course enrollment, quizzes, payments, and more, making it suitable for educational institutions and e-learning platforms.
24+
25+
---
26+
27+
## How It Works
28+
29+
SLMS is designed as a modular, scalable platform for online learning. The backend exposes a RESTful API for all operations, while the frontend consumes these APIs to provide a seamless user experience. Here’s how the main features work together:
30+
31+
- **User Authentication & Roles**: Users can register as students or instructors. Admins manage the platform. JWT-based authentication secures all endpoints.
32+
- **Course Management**: Instructors create and manage courses, upload lessons, resources, and quizzes. Courses are categorized for easy discovery.
33+
- **Enrollment & Payment**: Students enroll in courses and complete payments using integrated payment methods. Enrollment status and payment are tracked.
34+
- **Learning Experience**: Students access video lessons, downloadable resources, and class recordings. Progress is tracked automatically.
35+
- **Quizzes & Certification**: Courses can include quizzes. Student performance is tracked, and certificates can be issued upon completion.
36+
- **Dashboard**: Both students and instructors have dashboards to track their activities, progress, and course management.
37+
- **Admin Panel**: Admins manage users, courses, and platform settings via Django’s admin interface.
38+
39+
---
40+
41+
## Features (Detailed)
42+
43+
- **User registration, login, and role-based access**: Secure sign-up and login, with roles for students, instructors, and admins.
44+
- **Course creation and management**: Instructors can create, update, and organize courses, add lessons, modules, and resources.
45+
- **Video lessons and resources**: Upload and stream video content, attach downloadable files, and provide class recordings.
46+
- **Quizzes and progress tracking**: Add quizzes to courses, track student answers, and monitor progress.
47+
- **Payment and enrollment**: Integrated payment system for course purchases, with enrollment status and payment tracking.
48+
- **Student dashboard**: Personalized dashboard for students to view enrolled courses, progress, and certificates.
49+
- **RESTful API**: All backend operations are exposed via a secure, versioned API.
50+
- **Modern frontend**: Responsive, user-friendly interface built with React, Vite, and Tailwind CSS.
51+
- **Dockerized deployment**: Easily run the entire stack with Docker Compose.
52+
53+
---
54+
55+
## Technology Stack
56+
57+
### Backend
58+
59+
- Python 3, Django 5, Django REST Framework
60+
- JWT Authentication
61+
- PostgreSQL (via Docker)
62+
- Docker/Docker Compose for containerization
63+
64+
### Frontend
65+
66+
- React 19, Vite
67+
- Redux Toolkit, React Router
68+
- Tailwind CSS for styling
69+
70+
---
71+
72+
## Database Schema
73+
74+
A visual representation of the database schema is provided below. This schema illustrates the relationships between users, courses, enrollments, payments, quizzes, and other core entities.
75+
76+
![Database Schema](database.schema.png)
77+
78+
Here’s how the main tables/entities relate:
79+
80+
- **User**: Stores user information and roles. Each user can be a student, instructor, or admin.
81+
- **CourseCategory**: Organizes courses into categories.
82+
- **Course**: Contains course details, links to instructors, category, lessons, modules, and resources.
83+
- **Lesson/Module**: Courses are divided into modules and lessons for structured learning.
84+
- **Enrollment**: Connects users (students) to courses, tracks progress, payment status, and completion.
85+
- **Payment**: Linked to enrollments, tracks payment method, status, and transaction details.
86+
- **Quiz/MCQQuestion/Option/QuizResult**: Supports quizzes for courses, with questions, options, and results per student.
87+
- **ClassRecording/ClassResource**: Stores additional resources and class recordings for each course.
88+
89+
**Relationships:**
90+
91+
- A user can enroll in many courses; a course can have many students (many-to-many via Enrollment).
92+
- Instructors can teach multiple courses; courses can have multiple instructors.
93+
- Each course can have multiple modules, lessons, quizzes, and resources.
94+
- Payments are linked to enrollments, ensuring only paid students access premium content.
95+
96+
---
97+
98+
## Project Structure
99+
100+
```
101+
slms/
102+
├── backend/ # Django backend (API, models, admin, etc.)
103+
│ ├── core/ # Core app
104+
│ ├── course/ # Course management (models, views, serializers)
105+
│ ├── payment/ # Payment and enrollment
106+
│ ├── useraccount/ # User management
107+
│ └── slms/ # Django project settings and URLs
108+
├── frontend/ # React frontend (Vite, src, components, pages)
109+
│ ├── src/
110+
│ │ ├── app/ # Redux store
111+
│ │ ├── pages/ # Main pages (dashboard, courses, auth, etc.)
112+
│ │ ├── components/ # Reusable UI components
113+
│ │ └── ...
114+
├── database/ # Database Docker setup and init scripts
115+
├── database.schema.png # Database schema diagram
116+
├── docker-compose.yml
117+
├── LICENSE
118+
├── Pipfile / requirements.txt
119+
└── README.md
120+
```
121+
122+
---
123+
124+
## Getting Started
125+
126+
### Prerequisites
127+
128+
- Docker & Docker Compose
129+
- Node.js (for frontend development)
130+
131+
### Backend Setup
132+
133+
1. Navigate to `backend/`:
134+
```sh
135+
cd backend
136+
```
137+
2. Install dependencies:
138+
```sh
139+
pip install -r requirements.txt
140+
```
141+
3. Run migrations:
142+
```sh
143+
python manage.py migrate
144+
```
145+
4. Create a superuser:
146+
```sh
147+
python manage.py createsuperuser
148+
```
149+
5. Start the backend server:
150+
```sh
151+
python manage.py runserver
152+
```
153+
154+
### Frontend Setup
155+
156+
1. Navigate to `frontend/`:
157+
```sh
158+
cd frontend
159+
```
160+
2. Install dependencies:
161+
```sh
162+
npm install
163+
```
164+
3. Start the development server:
165+
```sh
166+
npm run dev
167+
```
168+
169+
### Using Docker Compose
170+
171+
To run the full stack (backend, frontend, database) with Docker Compose:
172+
173+
```sh
174+
docker-compose up --build
175+
```
176+
177+
---
178+
179+
## API Endpoints (Overview)
180+
181+
- `/api/v1/user/` – User registration, login, profile
182+
- `/api/v1/courses/` – Course listing, details, enrollment
183+
- `/api/v1/purchase/` – Payment and enrollment
184+
185+
See the code for detailed API structure and authentication requirements.
186+
187+
---
188+
189+
## Development & Deployment Notes
190+
191+
- Backend uses Django REST Framework with JWT authentication
192+
- Frontend uses React, Redux Toolkit, and Tailwind CSS
193+
- Environment variables are managed via `.env` files
194+
- Media uploads are stored in `backend/media/`
195+
- Database schema is initialized via `database/init.sql` (see Docker setup)
196+
- For production, set `DEBUG = False` and configure allowed hosts and secrets
197+
198+
---
199+
200+
## Contribution Guidelines
201+
202+
1. Fork the repository and create your branch from `main`.
203+
2. Ensure code follows project conventions and is well-documented.
204+
3. Write tests for new features and bug fixes.
205+
4. Submit a pull request with a clear description of your changes.
206+
207+
---
208+
209+
## License
210+
211+
This project is licensed under the MIT License.

backend/core/tests/test_commands.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ def test_wait_for_db_retries_on_error(self, patched_sleep, patched_check):
3232

3333
# Verify that time.sleep was called during retries
3434
patched_sleep.assert_called()
35+

database.schema.png

139 KB
Loading

frontend/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
65
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React</title>
6+
<title>Shikho</title>
87
</head>
98
<body>
109
<div id="root"></div>

0 commit comments

Comments
 (0)