Skip to content

Repository files navigation

Web ILMI

Backend API for ILMI — course-resource platform for Fasilkom UI.

Built with Django REST Framework & PostgreSQL.

Prerequisites

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, and git --version. If they return a version number, you're good to go.

Local Development Setup

1. Clone the repository

git clone https://github.com/your-username/web-ilmi-be.git

Then move into the project folder:

cd web-ilmi-be

2. Create and activate a virtual environment

Create it (run once):

python -m venv .venv

Activate it (run every time you open a new terminal):

Windows:

.venv\Scripts\activate

macOS / Linux:

source .venv/bin/activate

You'll know it's active when you see (.venv) at the beginning of your terminal prompt.

3. Install dependencies

pip install -r requirements.txt

4. Set up environment variables

Copy 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 .env file contains sensitive information. Never share it or commit it to Git.

5. Set up PostgreSQL database

Open a new terminal (not the one with the virtual environment) and run:

psql -U postgres

Then run these SQL commands:

CREATE USER ilmi WITH PASSWORD 'your_password';
CREATE DATABASE ilmi OWNER ilmi;
\q

6. Run migrations

python manage.py migrate

7. Create a superuser (optional)

python manage.py createsuperuser

8. Run the development server

python manage.py runserver

The API is available at http://localhost:8000/api/v1/. The Django admin panel is at http://localhost:8000/admin/.

Docker Setup (Alternative)

docker-compose up --build
Service Description Port
web Django app (gunicorn) 8000
db PostgreSQL 15 5432

Project Structure

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)

API Endpoints

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.

License

This project is for Fasilkom UI internal use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages