How alfredyael01/gestion-esport-main works
Project type and purpose
• This is a full-stack, client–server Java application for managing an e-sport competition season.
• The “both” package holds shared domain types and network message definitions.
• The “client” module implements an MVC-style Swing GUI that communicates with the server over TCP (Netty).
• The “server” module hosts a Netty-based socket server, processes client commands, and persists data in a relational database via JDBC.
Top-level architecture components
a. Client Application
• View layer (com.esporter.client.vue + subpackages) – Swing UIs (home, calendar, ranking, stable management, error dialogs, custom components).
• Controller layer (com.esporter.client.controleur) – event handlers, input validation, orchestrates UI updates.
• Client model / networking (com.esporter.client.model.user) – NettyClient, CommunicationServer, ClientProcessingHandler encapsulate socket setup and asynchronous I/O.
b. Shared Domain (com.esporter.both)
• Data.java – core data structures.
• Command, Response, ResponseObject – message envelopes.
• Types.* – all application message payloads (login, team, tournament, match, etc.).
c. Server Application
• Network layer (com.esporter.server.main) – NettyServer bootstraps, ConnectionClient wraps channels, ProcessingHandler decodes messages, mainThread orchestrates request handling.
• Service / business logic – runs in ProcessingHandler/mainThread, applies rules (e.g. permission checks, tournament full exceptions).
• Persistence layer (com.esporter.server.model.database) – DatabaseAccess (JDBC), Query builder, QueueDatabase (threaded request queue), Result wrappers.
d. Database
• External RDBMS (MySQL/PostgreSQL) configured via JDBC in DatabaseAccess.
Relationships and data flows
• The UI emits events → Controller invokes ClientProcessingHandler to serialize a Command using shared Types.
• NettyClient sends Command → arrives at NettyServer → ProcessingHandler decodes into CommandName + payload.
• ProcessingHandler/mainThread executes business logic → queries DatabaseAccess → builds ResponseObject.
• NettyServer sends Response back over the channel → ClientProcessingHandler decodes into Response → controller updates the View.
Architectural patterns and design principles
• MVC in the client (clean separation of View, Controller, Model).
• Shared domain objects in a “both” package to ensure client & server use identical message schemas (DRY).
• Layered server architecture: Network → Service → Persistence.
• Asynchronous, event-driven I/O using Netty for high concurrency.
• Repository/DAO pattern in DatabaseAccess to isolate SQL logic.
Checklist
– Notes on key frameworks/libraries next to each component.