← All projects
06 / 07Platform engineering

Online Examination System

Assessment platform: NGINX across FastAPI workers, Redis-held session and scoring state, JWT-scoped endpoints, server-side validation throughout.

PythonFastAPIPostgreSQLRedisDockerNGINXAWSJWT
OutcomeNGINX → FastAPI · Redis · JWT
01 Context

Use case

The problem space.

Hold a consistent assessment session when hundreds of candidates start, autosave and submit inside the same few seconds.

02 Implementation

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.

03 Build guide

Step by step

From zero to
running.

Representative local-development commands that show the implementation path and operating sequence.

  1. 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
  2. 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
  3. 03

    Launch behind the proxy

    Start the API workers and the NGINX container that distributes incoming test traffic.

    docker compose up --build api nginx
  4. 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

Continue exploring

Next project

Secure RAG