How ashwinjo/cricket-top-trumps works
Project type and purpose
• This is a full-stack web application called “Ek-Tappa-Out,” centered around cricket-themed gameplay and statistics.
• Frontend: React single-page application (SPA) managing UI components, game flow, leaderboard, stats, etc.
• Backend: Python service (likely FastAPI given typical main.py structure) exposing a RESTful API, handling CRUD operations, loading data into a SQLite database (ek_tappa_out.db).
• Supporting code for automated testing (pytest for backend, Playwright for frontend).
File structure
• Top-level:
• frontend/ — React code, tests, config files (Playwright, package.json).
• backend/ — Python code, database file, dependencies (requirements.txt, pyproject.toml), and test suite.
• Other docs: gameplay-flowchart.md, vision.md, prd.md.
• Frontend:
• /src/components — UI components (Card, Game, Header, Home, Leaderboard, Stats).
• /src/context/GameContext.js — React Context for state management.
• /src/services/api.js — HTTP client for API calls.
• Playwright setup in playwright.config.js and reports under playwright-report.
• Backend:
• /app/main.py — application entrypoint, mounts routes.
• /app/crud.py, /app/models.py, /app/schemas.py — standard MVC-like separation using ORM/Pydantic.
• /app/database.py, /app/data_loader.py — DB connection and seeding logic.
• Tests under backend/tests verifying endpoints and integration.
• Config/build:
• frontend/package.json and lockfile, .gitignore.
• backend/requirements.txt, pyproject.toml, .env, run.py, start.sh.
Key README insights
• Confirms two-part structure, minimal setup instructions stubbed.