How gryfklapryd/rust-cbt-master works
This repository is the central server and administration panel for a distributed computer-based testing system; the desktop exam client is a separate project. The main workflow configures sites, participants, questions, exams and schedules in the admin panel, publishes exam packages for local exam sites, then ingests, grades and reports returned attempts. The graph preserves those stages and the shared question-rendering/grading layer. README documents product capabilities not fully represented in sampled source; links for those unsampled details are limited to supported module paths.
Main entry points: client.ts PostgreSQL · app.ts Fastify API · App.tsx Admin application · api.ts Admin API client
Components 27
Admin panel
- Admin application
apps/admin/src/App.tsx - Admin authentication
apps/admin/src/lib/auth.tsx - Sites, participants, users
apps/admin/src/pages/Sites.tsx - Banks and questions
apps/admin/src/pages/QuestionEditor.tsx - Exams and schedules
apps/admin/src/pages/Schedules.tsx - Results and grading
apps/admin/src/pages/Results.tsx - Sync monitoring
apps/admin/src/pages/Sync.tsx - Admin API client
apps/admin/src/lib/api.ts
Central API
- Fastify API
apps/server/src/app.ts - Login and auth
apps/server/src/modules/auth.ts - Catalog and sites
apps/server/src/modules/sites.ts - Participants
apps/server/src/modules/participants.ts - Banks and questions
apps/server/src/modules/questions.ts - Exams and schedules
apps/server/src/modules/schedules.ts - Site synchronization
apps/server/src/modules/sync.ts - Results API
apps/server/src/modules/results.ts
Exam processing
- Package builder
apps/server/src/services/package-builder.ts - Results ingestion
apps/server/src/services/results-ingest.ts - Attempt grading
apps/server/src/services/grading.ts - Queue workers
apps/server/src/worker.ts
Shared and infrastructure
- Question renderer
packages/question-ui/src/QuestionView.tsx - Shared grading rules
packages/shared/src/questions/grading.ts - PostgreSQL
apps/server/src/db/client.ts - S3 object storage
apps/server/src/lib/storage.ts - Queue dispatch
apps/server/src/lib/queue.ts
Other components
- Admin / staff
- Local exam site
Connections 43
- Admin / staff → Admin application: uses
- Admin application → Admin authentication: checks session
- Admin application → Sites, participants, users: manages
- Admin application → Banks and questions: authors
- Admin application → Exams and schedules: schedules
- Admin application → Results and grading: reviews
- Admin application → Sync monitoring: monitors
- Sites, participants, users → Admin API client: requests
- Banks and questions → Admin API client: requests
- Exams and schedules → Admin API client: requests
- Results and grading → Admin API client: requests
- Sync monitoring → Admin API client: requests
- Admin authentication → Admin API client: authenticates
- Admin API client → Fastify API: HTTP requests
- Fastify API → Login and auth: registers routes
- Fastify API → Catalog and sites: registers routes
- Fastify API → Participants: registers routes
- Fastify API → Banks and questions: registers routes
- Fastify API → Exams and schedules: registers routes
- Fastify API → Site synchronization: registers routes
- Fastify API → Results API: registers routes
- Login and auth → PostgreSQL: reads / updates users
- Catalog and sites → PostgreSQL: reads / writes
- Participants → PostgreSQL: reads / writes
- Banks and questions → PostgreSQL: reads / writes
- Exams and schedules → PostgreSQL: reads / writes
- Site synchronization → PostgreSQL: reads / writes
- Results API → PostgreSQL: reads / writes
- Banks and questions → Question renderer: previews questions
- Local exam site → Site synchronization: syncs packages / results
- Site synchronization → Queue dispatch: enqueues processing
- Queue dispatch → Queue workers: dispatches jobs
- Queue workers → Package builder: runs package jobs
- Queue workers → Results ingestion: runs ingest jobs
- Queue workers → Attempt grading: runs grading jobs
- Package builder → PostgreSQL: reads exam data
- Package builder → S3 object storage: stores package
- Results ingestion → S3 object storage: reads batch payload
- Results ingestion → PostgreSQL: stores attempts
- Results ingestion → Queue dispatch: enqueues grading
- Attempt grading → PostgreSQL: reads / updates scores
- Attempt grading → Shared grading rules: uses scoring rules
- Results API → Queue dispatch: dispatches grading