Backend API for ILMI — course-resource platform for Fasilkom UI.
Built with Django REST Framework & PostgreSQL.
Before you start, make sure you have these installed on your computer:
- Python 3.12+ — Download from python.org. During installation, check "Add Python to PATH".
- PostgreSQL 15+ — Download from postgresql.org. Remember the password you set during installation.
- Git — Download from git-scm.com.
How to check if you have them installed: Open your terminal and type
python --version,psql --version, andgit --version. If they return a version number, you're good to go.
git clone https://github.com/your-username/web-ilmi-be.gitThen move into the project folder:
cd web-ilmi-beCreate it (run once):
python -m venv .venvActivate it (run every time you open a new terminal):
Windows:
.venv\Scripts\activatemacOS / Linux:
source .venv/bin/activateYou'll know it's active when you see (.venv) at the beginning of your terminal prompt.
pip install -r requirements.txtCopy the template and fill in the values:
cp .env.example .env| Variable | What to fill in | Example |
|---|---|---|
DEBUG |
Set to True for local development |
True |
DJANGO_SECRET |
A random string you make up | your-secret-key |
DB_USER |
Your PostgreSQL username | postgres |
DB_PASSWORD |
Your PostgreSQL password | your_password |
DB_NAME |
Name of the database you'll create in the next step | ilmi |
DB_HOST |
Leave as localhost unless you know what you're doing |
localhost |
DB_PORT |
Leave as 5432 unless you know what you're doing |
5432 |
Important: The
.envfile contains sensitive information. Never share it or commit it to Git.
Open a new terminal (not the one with the virtual environment) and run:
psql -U postgresThen run these SQL commands:
CREATE USER ilmi WITH PASSWORD 'your_password';CREATE DATABASE ilmi OWNER ilmi;\qpython manage.py migratepython manage.py createsuperuserpython manage.py runserverThe API is available at http://localhost:8000/api/v1/. The Django admin panel is at http://localhost:8000/admin/.
docker-compose up --build| Service | Description | Port |
|---|---|---|
| web | Django app (gunicorn) | 8000 |
| db | PostgreSQL 15 | 5432 |
web-ilmi-be/
├── manage.py # Django management commands
├── requirements.txt # Python dependencies
├── .env.example # Template for environment variables
├── web_ilmi_be/ # Project settings & root URL config
├── common/ # Shared utilities (responses, pagination, permissions)
├── accounts/ # Auth: SSO login, guest sessions, admin auth
├── catalog/ # MataKuliah & KategoriMateri
├── materi/ # Materi file uploads & FukiClass videos
└── dashboard/ # Admin dashboard stats (no models)
All routes are prefixed with /api/v1/.
| App | Endpoints | Description |
|---|---|---|
| accounts | 7 | SSO login/logout, guest & admin auth |
| catalog | 8 | MataKuliah CRUD, search |
| materi | 12 | Materi CRUD, download, FukiClass |
| dashboard | 1 | Admin stats |
See AGENTS.md for the full endpoint map and model reference.
This project is for Fasilkom UI internal use.