An online multiplayer version of the classic Russian card game Durak, built with Django and Django Channels.
git clone https://github.com/uxabix/Django-Fools_Arena
cd Django-Fools_ArenaCopy .env.example to .env:
cp .env.example .envRun containers:
docker compose up --buildAvailable services:
- Django + Channels: http://localhost:8000
- PostgreSQL: localhost:5432
Run migrations:
docker compose exec web python manage.py migrateCreate a superuser (optional):
docker compose exec web python manage.py createsuperuserdocker compose exec web python manage.py collectstaticRun migrations, tests, and management commands inside the web container (after docker compose up):
docker compose exec web python manage.py migrate
docker compose exec web python manage.py makemigrations
docker compose exec web pytest -vIf containers are not running yet, you can use a one-off container (starts dependencies per Compose file):
docker compose run --rm web python manage.py migrate
docker compose run --rm web pytest -vREST (session or token auth as configured for DRF):
GET /api/chat/chats/— list chats for the current userPOST /api/chat/chats/direct/— JSON body{ "other_user_id": "<uuid>" }to open or reuse a 1:1 chatGET|POST /api/chat/chats/<chat_uuid>/messages/— list recent messages or{ "content": "..." }to post
Same behaviour in server-rendered UI (login required):
/chat/— inbox/chat/direct/new/— start a direct chat by username/chat/<chat_uuid>/— history, HTTP post form, optional WebSocket client block on the page
Blocking uses accounts.Block: the blocked user cannot send direct messages to the blocker; lobby chats are unchanged.
docker compose downDeveloper documentation is built with Sphinx from the docs/ directory (autodoc, Google-style docstrings via Napoleon, viewcode).
Install dependencies (includes Sphinx):
pip install -r requirements.txtGenerate HTML (either command from the repository root):
cd docs && make htmlsphinx-build -b html docs docs/_buildOpen docs/_build/html/index.html in a browser.
Rebuild after code or docstring changes (clean output, then build again):
cd docs && make clean htmlOr remove the build directory and run sphinx-build again:
rm -rf docs/_build && sphinx-build -b html docs docs/_buildUsing Docker (from the project root, with the stack running and the app image built):
docker compose exec web sphinx-build -b html docs docs/_buildThe docs/_build/ directory is gitignored.
- Django, REST, Channels
- Redis
- PostgreSQL
- Docker
- GitFlow
- Sphinx
Early development stage.
See ROADMAP.md for the roadmap.
No license yet. All rights reserved by the authors.