Online Examination System
Assessment platform: NGINX across FastAPI workers, Redis-held session and scoring state, JWT-scoped endpoints, server-side validation throughout.
Use case
The problem space.
Hold a consistent assessment session when hundreds of candidates start, autosave and submit inside the same few seconds.
What's implemented
Built with intention.
Fast, balanced API layer01
NGINX routes requests across FastAPI workers and Redis keeps hot session and scoring state close to the application.
Secure exam sessions02
JWT-protected endpoints, encrypted data handling, access controls, and server-side validation protect candidate interactions.
Fault-tolerant scoring03
Submission events are safely persisted and a resilient scoring path uses caching to keep results responsive under load.
Architecture
Systems in concert.
The primary request and data paths, presented as a compact operating model.
A conceptual architecture for communicating the system design and operational responsibilities.
Step by step
From zero to
running.
Representative local-development commands that show the implementation path and operating sequence.
- 01
Configure the environment
Set local secrets and start PostgreSQL plus Redis before booting the application.
cp .env.example .env docker compose up -d postgres redis - 02
Apply the schema
Create the required tables and seed a sample examination with questions and access policy.
alembic upgrade head python scripts/seed_exam.py - 03
Launch behind the proxy
Start the API workers and the NGINX container that distributes incoming test traffic.
docker compose up --build api nginx - 04
Exercise concurrent sessions
Run a mixed create, save, and submit traffic scenario to inspect response time and score consistency.
k6 run tests/exam-journey.js
