Initial commit: standalone quiz-testing system

Full-stack F# (Domain/Server/Client via Fable+Elmish+Feliz), PostgreSQL
persistence via Dapper, Docker Compose deployment. Student quiz-taking flow
with time-limit enforcement and focus-loss tracking, Teacher question bank
and quiz builder with results analytics, Admin user management.
This commit is contained in:
danamir
2026-08-06 12:36:16 +03:00
commit 942dfc9c1a
134 changed files with 10712 additions and 0 deletions

47
docker-compose.yml Normal file
View File

@@ -0,0 +1,47 @@
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: quizsystem
POSTGRES_USER: quizsystem
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U quizsystem -d quizsystem"]
interval: 5s
timeout: 5s
retries: 10
networks: [quizsystem]
server:
build:
context: .
dockerfile: src/Server/Dockerfile
environment:
ConnectionStrings__Postgres: "Host=postgres;Port=5432;Database=quizsystem;Username=quizsystem;Password=${POSTGRES_PASSWORD:-devpassword}"
Jwt__Secret: ${JWT_SECRET:?Set JWT_SECRET in .env — see .env.example}
Client__Origin: "http://localhost:8081"
ASPNETCORE_ENVIRONMENT: Production
depends_on:
postgres:
condition: service_healthy
# Mapped to the same host port the client's hardcoded
# Client/Shared/JsonWire.fs `serverUrl` already expects — the browser
# (not any container) is what resolves "localhost:5144", so this keeps
# that working unmodified for local/dev use of the compose stack.
ports: ["5144:8080"]
networks: [quizsystem]
client:
build:
context: .
dockerfile: src/Client/Dockerfile
ports: ["8081:80"]
networks: [quizsystem]
volumes:
pgdata:
networks:
quizsystem: