REST API backend for the EasyMiner data mining platform. It is orchestrated by EasyMiner Center, which provides user authentication and per-user database configuration. The backend handles CSV data ingestion, preprocessing, and association rule mining, with long-running operations offloaded to a Celery task queue.
Stack:
- FastAPI
- Celery
- MariaDB
- Redis
- SQLAlchemy 2.0
- Alembic
The full stack (API, Celery worker, MariaDB, Redis) can be run with Docker Compose.
-
Copy the example env file and adjust hostnames for the container network:
cp .env.example .env
In
.env, replacelocalhostwith the Docker Compose service names:Variable Local value Docker value DATABASE_URL…@localhost:3306/……@mariadb:3306/…DATABASE_URL_SYNC…@localhost:3306/……@mariadb:3306/…CELERY_BROKERredis://localhost/0redis://redis/0CELERY_BACKENDredis://localhost/1redis://redis/1EASYMINER_CENTER_URLhttp://localhost:8001http://localhost:8001 -
Start all services:
docker compose up -d
Add
--buildto build the images locally instead of pulling them. -
The API is available at
http://localhost:8000. Database migrations run automatically on startup.
cp .env.example .env # default values work as-is for local dev
uv sync # install dependenciesStart MariaDB and Redis (recommended: via Docker, but any local install works):
just docker-servicesThen launch the services you need:
just dev # API with hot reload and debug logging (http://localhost:8000)
just celery # Celery worker with auto-reload via watchmedo
just fake_server # EasyMiner Center mock — provides auth and DB config for a fake userfake_server replaces the need for a real EasyMiner Center instance during development. It runs on port 8001, which matches the default value of EASYMINER_CENTER_URL.
just test