DEV Community

Cover image for Game on Djangular ๐ŸŽฎ Ep.1

Game on Djangular ๐ŸŽฎ Ep.1

Episode 1: Welcome to the Vault

โ€œEvery gamer has a backlog. The good ones have a system.โ€


The Backlog Problem ๐ŸŽฏ

Every gamer knows the feeling. Forty-three games in your library. You can only name eight of them from memory. Three are half-finished from two years ago. You started one last week but cannot remember whether the save file is on the laptop or the desktop. Someone on Reddit just posted that a game you bought on sale is โ€œnot worth it past hour 12โ€ and you are on hour 11.

You need a Vault.

GameLib is that vault: a full-stack web application where gamers manage their personal libraries, track progress, discover new titles, and share reviews. Built for a Web Development course at KBTU, it is a working example of the Djangular stack โ€” Django REST Framework on the backend, Angular on the frontend, PostgreSQL as the game database, and JWT tokens as the keys to your personal collection.

This series builds GameLib from the ground up and extends it into enterprise territory: XML file exchange with external Linux servers, TLS and mutual TLS certificate management, SailPoint IAM for identity verification, and a full PKI infrastructure managed by django-ca.


๐Ÿ—‚๏ธ SIPOC โ€” The Vault

Suppliers Inputs Process Outputs Customers
Gamers (registered users) Game titles, play status, ratings, reviews Angular frontend โ†’ DRF API โ†’ PostgreSQL A personal vault: tracked games, statuses, scores, reviews The gamer โ€” with a searchable, filterable record of their entire library
The global game catalogue Game metadata: title, genre, description, cover image Django admin / seed scripts โ†’ Game model A browsable catalogue of all games the system knows about All users โ€” browsing before adding to their vault
External Linux server (Episodes 5โ€“8) XML files containing game catalogue updates or vault exports Django backend โ†” Linux server via HTTP/HTTPS/mTLS Synchronised data; audit trail; identity-verified exchange Enterprise operators, partner systems, compliance teams

The Gamer Metaphor: Your Stack as Your Library ๐Ÿ—‚๏ธ

The metaphor is exact, not decorative.

Game library world Djangular stack
Your game Vault (personal collection) PostgreSQL + Django UserGame model
The global catalogue you browse DRF read-only Game and Genre endpoints
Adding a game to your Vault Authenticated POST to UserGame API
Your status badge (Playing/Finished/Planned) status field โ€” string enum on UserGame
Your review and score out of ten Review model โ€” one per user per game
Genre filter on the shelf django-filter + DRF FilterBackend
Your login / session token JWT via djangorestframework-simplejwt
Angular loading your shelf on login HttpClient โ†’ DRF API โ†’ component binding
Exporting saves to a remote server Django requests.post() with XML payload
Encrypting the connection to the server TLS โ€” self-signed cert, verify=ca.crt
Both sides proving who they are mTLS โ€” mutual certificate handshake
The key factory that issues all certs PKI โ€” Root CA + Intermediate CA
The guildโ€™s member identity check SailPoint IAM โ€” verifying server requester
A banned playerโ€™s membership card Revoked certificate โ€” CRL or OCSP

The Project Structure ๐Ÿ—‚๏ธ

Based on the GameLib repository at github.com/software-journey/djangular:

djangular/
โ”œโ”€โ”€ backend/                    โ† Django project
โ”‚   โ”œโ”€โ”€ manage.py
โ”‚   โ”œโ”€โ”€ gamelib/                โ† Django settings/urls/wsgi
โ”‚   โ”‚   โ”œโ”€โ”€ settings.py
โ”‚   โ”‚   โ”œโ”€โ”€ urls.py
โ”‚   โ”‚   โ””โ”€โ”€ wsgi.py
โ”‚   โ”œโ”€โ”€ games/                  โ† Django app: catalogue
โ”‚   โ”‚   โ”œโ”€โ”€ models.py           โ† Game, Genre
โ”‚   โ”‚   โ”œโ”€โ”€ serializers.py
โ”‚   โ”‚   โ”œโ”€โ”€ views.py
โ”‚   โ”‚   โ””โ”€โ”€ urls.py
โ”‚   โ”œโ”€โ”€ vault/                  โ† Django app: personal library
โ”‚   โ”‚   โ”œโ”€โ”€ models.py           โ† UserGame, Review
โ”‚   โ”‚   โ”œโ”€โ”€ serializers.py
โ”‚   โ”‚   โ”œโ”€โ”€ views.py
โ”‚   โ”‚   โ””โ”€โ”€ urls.py
โ”‚   โ”œโ”€โ”€ users/                  โ† Django app: auth
โ”‚   โ”‚   โ”œโ”€โ”€ models.py           โ† Custom User
โ”‚   โ”‚   โ”œโ”€โ”€ serializers.py
โ”‚   โ”‚   โ””โ”€โ”€ views.py
โ”‚   โ”œโ”€โ”€ xml_bridge/             โ† Django app: XML exchange (Ep.5โ€“7)
โ”‚   โ”‚   โ”œโ”€โ”€ client.py           โ† HTTP/HTTPS/mTLS requests
โ”‚   โ”‚   โ”œโ”€โ”€ serializers.py      โ† lxml XML serialisation
โ”‚   โ”‚   โ””โ”€โ”€ views.py
โ”‚   โ””โ”€โ”€ requirements.txt
โ”‚
โ””โ”€โ”€ frontend/gamelib/           โ† Angular project
    โ”œโ”€โ”€ src/
    โ”‚   โ”œโ”€โ”€ app/
    โ”‚   โ”‚   โ”œโ”€โ”€ core/           โ† AuthService, JwtInterceptor, Guards
    โ”‚   โ”‚   โ”œโ”€โ”€ features/
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ catalogue/  โ† Browse games, genre filter
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ vault/      โ† Your library, status, reviews
    โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ auth/       โ† Login, register
    โ”‚   โ”‚   โ””โ”€โ”€ shared/         โ† Components, pipes, models
    โ”‚   โ””โ”€โ”€ environments/
    โ””โ”€โ”€ angular.json
Enter fullscreen mode Exit fullscreen mode

The Series Map: Nine Episodes ๐Ÿ—บ๏ธ

# Episode Gamer concept Technical concept
1 This one โ€” Welcome to the Vault The backlog problem Architecture overview
2 Building the Game Catalogue Designing the Vault Django models, DRF serializers, viewsets
3 Your Login Token The guild membership card JWT auth, simplejwt, Angular interceptor
4 Loading Your Shelf The front of the Vault Angular components, services, routing
5 Save Data Over the Wire Syncing to a remote server XML POST/GET to Linux server, HTTP toggle
6 Encrypting the Channel Locking the save file TLS, self-signed certs, requests verify
7 Both Sides of the Lock Proving who you are mTLS, client cert generation, full handshake
8 The Guild Registry The guildmasterโ€™s identity check SailPoint IAM, SCIM 2.0, access verification
9 The Key Factory Where all locks are made PKI management, django-ca, CRL, OCSP, rotation

Technology Stack Cheat Sheet ๐Ÿ“‹

Backend:

  • Python 3.12+
  • Django 5.x + Django REST Framework 3.15+
  • djangorestframework-simplejwt โ€” JWT auth
  • django-filter โ€” queryset filtering
  • django-cors-headers โ€” CORS for Angular dev server
  • psycopg2-binary โ€” PostgreSQL adapter
  • requests โ€” HTTP client for XML exchange
  • lxml โ€” XML serialisation / deserialisation
  • cryptography / OpenSSL โ€” TLS / mTLS cert handling
  • django-ca โ€” PKI certificate authority management

Frontend:

  • Angular 17+ with standalone components
  • TypeScript 5+
  • Angular HttpClient + HttpInterceptor
  • Angular Router with route guards
  • RxJS for reactive state
  • Angular Material (optional) or TailwindCSS

Database: PostgreSQL 16+

External Linux server: Nginx (TLS termination) + custom XML endpoint

IAM: SailPoint IdentityIQ or IdentityNow (SCIM 2.0 API)


Quick-Start: Running GameLib Locally ๐Ÿš€

# Clone the repo
git clone https://github.com/Elsa-Yanke/web-dev-project-2026.git
cd web-dev-project-2026

# Backend setup
cd backend
python -m venv venv
source venv/bin/activate          # Windows: venv\Scripts\activate
pip install -r requirements.txt

# Create PostgreSQL database
createdb gamelib_db               # or use pgAdmin

# Configure environment
cp .env.example .env              # fill in DB credentials, SECRET_KEY
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

# Frontend setup (new terminal)
cd ../frontend/gamelib
npm install
ng serve                          # http://localhost:4200
Enter fullscreen mode Exit fullscreen mode

In Episode 2, we open the database and build the models: Game, Genre, UserGame, Review. The Vault takes shape.


๐Ÿ”— Resources


๐ŸŽฎ Game on Djangular Series is a series about building GameLib โ€” a full-stack game library tracker โ€” with Django REST Framework and Angular, extended with XML exchange, TLS/mTLS, SailPoint IAM, and PKI management.

Top comments (0)