# Installation ## Requirements - [uv](https://docs.astral.sh/uv/) (it installs Python 3.14 and the dependencies) - Docker, for Redis, the worker and the OCR service - Access to the **development** Airtable base and Shopify store (never production while developing) ## Run the API ```bash git clone git@github.com:rewake-fr/API.git RewakeAPI && cd RewakeAPI cp .env.example .env # then fill it in: see configuration.md make install # uv sync --group dev make dev # API with auto-reload on http://localhost:3002 ``` Open for the list of routes. Check the credentials with `make airtable-check` and `make shopify-check`. ## Run everything (worker, scheduler, Redis, OCR) Scripts, OCR and AI research run in the worker. Start the whole stack from the sources: ```bash docker compose up -d --build docker compose logs -f worker ``` | Service | Role | |---|---| | `api` | the FastAPI application (port 3002 on the Docker bridge) | | `worker` | runs background jobs (`celery -A api.worker.app worker`) | | `beat` | queues scheduled jobs (`celery -A api.worker.app beat`) | | `redis` | job queue, script history, caches | | `ocr` | reads text on label photos | To run the API with `make dev` against this Redis, set `REDIS_URL` to an address your machine can reach. ## Run the tests ```bash make test # never touches the network; fails below the coverage minimum make test-live # also the tests that call the real (development) Airtable make check # lint + types + tests, as CI does ``` ## Build the documentation ```bash make docs # builds docs/_build/html (not committed) and opens it make docs-live # rebuilds on every change, on http://localhost:8000 ```