Skip to content

Syahratu015/Simple-LMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simple LMS Django Docker

Deskripsi Project

Simple LMS adalah project Django yang dijalankan menggunakan Docker Compose dengan PostgreSQL sebagai database dan Redis sebagai cache.

Project ini dibuat sebagai setup environment development menggunakan Docker, Django, PostgreSQL, dan Redis dengan best practice.

Development dilakukan menggunakan Windows dan Visual Studio Code.


Cara Menjalankan Project (Windows - VS Code)

1. Copy Environment Variables

Buka Terminal di VS Code lalu jalankan:

copy .env.example .env

2. Build dan Jalankan Docker

docker-compose up -d --build

Screenshot

Build Docker

Build Docker 2


3. Jalankan Migration

docker-compose exec web python manage.py migrate

Screenshot

Migration


4. Buat Superuser

docker-compose exec web python manage.py createsuperuser

πŸ“Έ Screenshot

Superuser


5. Cek Container Running

docker-compose ps

Screenshot

Container Running


6. Akses Django

Buka browser

http://localhost:8000

Screenshot

Django


7. Django Admin

http://localhost:8000/admin

Screenshot

Admin

User


Environment Variables

File .env.example

DEBUG=True
SECRET_KEY=django-secret-key

POSTGRES_DB=simple_lms
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=db
POSTGRES_PORT=5432

Project Structure

simple-lms/
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ .env.example
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ manage.py
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ urls.py
β”‚   └── wsgi.py
β”œβ”€β”€ screenshoot/
└── README.md

Teknologi yang Digunakan

  • Python 3.11
  • Django
  • PostgreSQL
  • Redis
  • Docker
  • Docker Compose
  • Visual Studio Code
  • Windows

PROGRESS 2

πŸ“š Simple LMS - Progress 2

Database Design & ORM Implementation

πŸ“Œ Deskripsi

Pada progress ini dilakukan perancangan database LMS menggunakan Django ORM, termasuk relasi antar model, optimasi query, dan penggunaan Django Admin.


🎯 Data Models

Model yang digunakan:

  • User (admin, instructor, student)
  • Category (hierarchy)
  • Course
  • Lesson
  • Enrollment
  • Progress

πŸ“Έ
Category


πŸ”— Tampilan Admin

πŸ”Ή Admin Dashboard

πŸ“Έ
Admin


πŸ”Ή Course List

πŸ“Έ
Course

Course


πŸ”Ή Detail Course

πŸ“Έ
Detail


πŸ”Ή Lesson (Inline)

πŸ“Έ
Lesson Lesson


πŸ”Ή User Role

πŸ“Έ
User


πŸ”Ή Enrollment

πŸ“Έ
Enrollment Enrollment


πŸ”Ή Progress

πŸ“Έ
Progress


⚑ Query Optimization

def for_listing(self):
    return self.select_related('instructor','category')\
               .prefetch_related('lessons')

def for_student_dashboard(self):
    return self.select_related('student','course')\
               .prefetch_related('progress','course__lessons')

# πŸ‘¨ Author

Nama : Syahratu Andhara Satriani
NIM : A11.2023.14934
Project : Simple LMS Django Docker
Environment : Windows - Visual Studio Code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors