TeBiPlay Architecture
TeBiPlay is built on a modern, scalable architecture that leverages the power of Flask for the backend and Nuxt 3 for the frontend. This section provides an overview of the system architecture and the technologies used.
High-Level Architecture
Backend Architecture
The backend of TeBiPlay is built with Flask, a lightweight WSGI web application framework in Python. It provides a robust foundation for the API and business logic.
- Flask: Web framework for building the API
- SQLAlchemy: ORM for database interactions
- Flask-JWT-Extended: For handling JWT authentication
- PostgreSQL: Relational database for data storage
- Gunicorn: WSGI HTTP Server for production deployment
Frontend Architecture
The frontend is built with Nuxt 3, a powerful Vue.js framework that provides an excellent developer experience and optimal performance.
- Nuxt 3: Vue.js framework for building the user interface
- Vue 3: Progressive JavaScript framework
- Tailwind CSS: Utility-first CSS framework for styling
- Nuxt Auth: Authentication module for Nuxt.js
- Nuxt Icon: Easy icon usage in Nuxt applications
Database Schema
TeBiPlay uses a relational database schema to manage the complex relationships between users, players, teams, games, and matches.
API Architecture
The backend exposes a RESTful API that the frontend consumes. The API is organized around resources:
/auth
: Authentication endpoints/api/players
: Player management/api/teams
: Team management/api/games
: Game management/api/matches
: Match creation and result management/api/rankings
: Ranking calculations and retrieval
Each endpoint provides standard CRUD operations where applicable:
- GET: Retrieve resource(s)
- POST: Create a new resource
- PUT: Update an existing resource
- DELETE: Remove a resource
For example, the /api/players
endpoint supports:
GET /api/players # List all players
POST /api/players # Create a new player
GET /api/players/:id # Retrieve a specific player
PUT /api/players/:id # Update a specific player
DELETE /api/players/:id # Delete a specific player
Similar patterns are followed for other resources like teams, games, and matches.
Deployment Architecture
TeBiPlay is designed for easy deployment using Docker containers, ensuring consistency across different environments.