LogiMath is structured as a three-tier application where each layer has a clearly defined responsibility. The FastAPI backend exposes a REST API, the Flet frontend consumes it through a Python desktop client, and PostgreSQL persists all data. Docker Compose ties the services together on a shared bridge network, making the full stack reproducible in a single command.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/whitiue/logiMathApp/llms.txt
Use this file to discover all available pages before exploring further.
System layers
Backend
FastAPI application serving a REST API on port 8000. Handles all business logic, database access via SQLAlchemy, and schema validation with Pydantic.
Frontend
Flet Python desktop application running at 400×750 px. Communicates with the backend through
api_services.py and navigates between three views.Database
PostgreSQL 16 (Alpine) instance persisting data across four tables:
users, quizzes, questions, and user_scores.Network and ports
All services communicate overlogmath_network, a Docker bridge network defined in docker-compose.yml. No service is exposed to the host except the backend API.
| Service | Internal port | Host port | Notes |
|---|---|---|---|
backend | 8000 | 8000 | FastAPI / uvicorn |
postgres | 5432 | — | Not published to host |
Docker Compose orchestration
Thedocker-compose.yml at the repository root defines both services, their health checks, resource limits, and shared network. The postgres service must pass its health check before backend starts, enforced with depends_on: condition: service_healthy.
docker-compose.yml
The
backend service will not start until the postgres health check passes. This prevents startup errors caused by the database not yet accepting connections.Starting the stack
http://localhost:8000 and interactive API docs at http://localhost:8000/docs.