A Markov Chain-based Cards Against Humanity card generator.
- Pipenv: pipenv
- Python 3.14+
- CORS /
APP_ENV: SetAPP_ENV=productionorAPP_ENV=prodon the API for the default production browser origins, orAPP_ENV=development/APP_ENV=devfor localhost defaults (seeapi/env.example). Optionally setCORS_ORIGINSto override the allowlist entirely.
Copy api/env.example to api/.env and configure variables. Use APP_ENV=prod (or production) when deploying the API so CORS allows the public site by default, or set CORS_ORIGINS to a comma-separated list of exact origins if you need a custom allowlist.
Install Pipenv Environment and all dependencies
pipenv installStart the API server
pipenv run startSet APP_ENV=prod (or production) when building the UI for deployment so the client uses the production API and OpenAPI URL by default (ui/.env.example). Local development can omit this or use APP_ENV=dev / development.
Install Dependencies
npm installStart the frontend server
npm run startThe API is accessible at http://localhost:8000/api/v1/. The OpenAPI spec is served at http://localhost:8000/openapi.yaml. With docker-compose.yml, Swagger UI runs at http://localhost:8080 and loads that spec.
To modify any API configuration, edit the gunicorn.conf.py file.
Once the Frontend service is up and running, it can be accessed at http://localhost:3000/.
docker-compose.yml and dev-docker-compose.yml include an optional nginx service so you can hit everything on port 80 locally. In production, traffic goes through Traefik (or your own proxy) directly to the api and ui containers; nginx from this repo is not part of that layout.
Both services expose GET /health (JSON {"status":"ok"}) for Docker’s healthcheck and for upstream checks (for example Traefik’s HTTP health check pointed at /health on each backend).
