How ymj1123/team-14-take-6- works
Project type and purpose
• This is a full-stack real-time multiplayer card game web application.
• Backend: a Django project (with Django REST and Django Channels) providing HTTP/REST APIs for user and room management, plus WebSocket endpoints for real-time gameplay, chat, and state synchronization.
• Persistence: SQLite (for development) via Django ORM; migrations live under backend/game/migrations and backend/users/migrations.
File structure
Top-level:
• backend/
• frontend/
• requirements.txt, package.json
Backend substructure:
• take6/ (Django settings, ASGI/WSGI, URL & routing setup)
• game/ (Django app: models, serializers, views, consumers, routing, game_room logic, admin, tests, templates)
• users/ (Django app: user models, views, URLs, CSRF overrides)
• game_logic/ (pure Python core game engine: card.py, core.py, unit tests)
• static/, templates/ (legacy or fallback HTML)
Frontend substructure:
• src/ (React components, pages, assets, API docs)
• public/ (static images & audio)
• styles/ (CSS modules for each component)
• main.jsx, App.jsx, vite.config.js
README for additional insights
• Frontend runs on port 5173 using npm run dev.
• Backend uses ASGI server Daphne on port 8000 to support HTTP + WebSocket.
• Development workflow: Django migrations, pip requirements, conditional CSRF handling, CORS_ALLOW_ORIGINS.
• Key flows: room creation via REST, WebSocket connections per client (consumers.py) and per–room broadcast logic (game_room.py).