Development¶
This page covers working on Yamtrack from source.
Prerequisites¶
- uv
- tailwindcss CLI (install with
npm install -g tailwindcss @tailwindcss/cli) - Docker
- Redis
General setup¶
Clone the repository¶
Start Redis¶
If you do not already have Redis running locally, start it with Docker:
Install dependencies¶
uv manages the Python environment and dependencies:
Installing the development dependencies includes pre-commit. After uv run pre-commit install, the hooks run automatically before each commit. You can also run the full hook set manually:
Configure environment values¶
Create a .env file in the repository root:
TMDB_API=API_KEY
MAL_API=API_KEY
IGDB_ID=IGDB_ID
IGDB_SECRET=IGDB_SECRET
STEAM_API_KEY=STEAM_API_SECRET
BGG_API_TOKEN=BGG_API_TOKEN
SECRET=SECRET
DEBUG=True
See Environment Variables for the full list of supported settings.
Prepare the database¶
Run the app¶
Run the Django development server:
Run the Celery worker with the scheduler in another terminal:
Run Tailwind in another terminal:
Open the development server at:
Documentation¶
Install the docs dependency group, then serve the docs from the current checkout:
Testing¶
Install Playwright browsers before running integration tests:
Run the Django test suite from the src directory:
To run tests for a specific app or test module, pass the test label after test: