Skip to content

Limits and improvements ​

What the project does not do yet, and how to improve it. Sorted by importance.

Security ​

LimitRiskImprovement
The API has no authenticationanyone can create or delete products through api.trinity.jostud.comDRF permissions (IsAuthenticated) + accounts, planned for the web part (702)
No secret scanning in the pipeline (gitleaks was planned)a secret committed by mistake goes unnoticedadd a gitleaks job to the lint stage
No image scanninga known flaw in a base image goes unnoticedadd Trivy after *:build
Django 4.2: support ended in April 2026no more security fixesmove to Django 5.2 (LTS)
Unpinned Python dependenciestwo builds may install different versionspin requirements.txt (pip freeze or pip-tools)
Ansible connects with the personal eliashounnou accountdepends on one persona shared admin user, one key per person
SSH not hardened, no fail2ban (planned at first)brute-force attacks on port 22Ansible role: key-only login, root forbidden, fail2ban

Reliability ​

LimitRiskImprovement
No database backupdata lost if the volume or the VM is lostscheduled pg_dump, copied off the VM
A single machine per environmentif the VM goes down, the site goes down, even with two replicasa second Swarm node
Dev does not use the prod imagesan error specific to Dockerfile.prod is only seen in prodalso deploy api:<sha> and web:<sha> in dev
removeProduct (web) does not catch errorsNext.js error page if the API refusesreturn an error state, like addProduct
Delete without confirmationaccidental deletionconfirmation dialog
The web calls the API at its public addressneedless round trip through the Internet and TraefikAPI_URL=http://trinity_api:8000 on the trinity network

Operations (the brief's bonuses) ​

BonusStatusImprovement
Logs persisted across restartsnot done: logs live in the containerslog driver to a volume, or Loki
Load balancerdone: two replicas of api and web, spread by Traefik and Swarm's virtual addressmore replicas, or a second node
Pipeline monitoringnot done: Datadog removedDatadog CI Visibility, or GitLab's pipeline metrics
Failure notificationsnot doneGitLab's Slack or e-mail integration

Small debts ​

LimitImprovement
The Django admin has no styling in prodWhiteNoise to serve staticfiles/
Traefik routes are not deployed by the pipelinea job re-running the Ansible role when infra/traefik/ changes
No automatic system updatesunattended-upgrades in the Ansible role