Skip to main content

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.

LogiMath runs as two services — a FastAPI backend and a Flet Python desktop app — coordinated by Docker Compose. This page walks you through cloning the repository, configuring your environment file, and bringing both services up. If you prefer not to use Docker, a manual setup path using uvicorn and python is covered below.
1

Clone the repository

Clone the LogiMath repository and enter the project directory:
git clone https://github.com/whitiue/logiMathApp.git LogiMath
cd LogiMath
2

Create your .env file

Copy the example environment file and fill in your values. The Docker Compose configuration reads these variables to configure the database and backend:
cp .env.example .env
The .env.example file contains the following variables:
# PostgreSQL
POSTGRES_USER=logmath_user
POSTGRES_PASSWORD=logmath_pass_change_me_in_production
POSTGRES_DB=logmath_db

# Backend
DATABASE_URL=postgresql://logmath_user:logmath_pass_change_me_in_production@postgres:5432/logmath_db
API_HOST=0.0.0.0
API_PORT=8000
Change POSTGRES_PASSWORD before running in any shared or production environment. Never commit .env to version control.
3

Build and start all services

Build the Docker images and start the backend and PostgreSQL database:
docker-compose build
docker-compose up --build
Docker Compose starts two services: postgres (PostgreSQL 16) and backend (FastAPI on port 8000). The database runs a health check before the backend starts, so startup order is handled automatically.Expected output once everything is ready:
logmath_backend  | INFO: Started server process
logmath_db       | LOG: database system is ready to accept connections
4

Verify the backend is running

Open the Swagger UI to confirm the API is up and browse all available endpoints:
http://localhost:8000/docs
You can also check the base API URL directly at http://localhost:8000.
The Swagger UI lets you test every endpoint interactively without any additional tooling.

Without Docker

If you want to run the backend and frontend directly on your machine, start each service in a separate terminal.

Backend

cd src/BackEnd
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn mainApi:app --reload --host 0.0.0.0 --port 8000
You need a running PostgreSQL instance and a .env file (or exported environment variables) with a valid DATABASE_URL pointing to it. See the prerequisites page for details.

Frontend

In a second terminal:
cd src/FrontEnd
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
python mainApp.py
The Flet desktop app will launch and connect to the backend at http://localhost:8000.

Stopping services

To stop and remove the Docker containers:
docker-compose down
To also remove the database volume (this deletes all stored data):
docker-compose down -v

Build docs developers (and LLMs) love