diff --git a/README.md b/README.md new file mode 100644 index 0000000..bb23564 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# JWS + +> **Note** This is a school project, therefore it probably won't interest you if you are looking for something useful. + +## Overview + +JWS stands for Java Web Services and as its name doesn't suggest at all, it's basically a web server for a a pokemon-like game. It's written in Java and built onto Quarkus and Jakarta, providing a REST API with strict server-side rules like cooldowns and cheating prevention. + +## Architecture + +> **Note** Source code is located inside the `yakamon` folder, both others are school requirements and aren't important + +Each layer is strictly separated and can only communicate via to the one directly below or above it via converters. + +### Presentation Layer (REST & DTOs) +* located at `yakamon/jws/yakamon/src/main/java/fr/epita/assistants/yakamon/presentation` +* Handled by JAX-RS (Jakarta RESTful Web Services). +* Exposes standard HTTP endpoints (`/player`, `/move`, `/yakadex`, etc.). Full API specification can be found inside `yakamon/src/main/resources/openapi.yaml` +* Implements strict **Data Transfer Objects (DTOs)** for both Requests and Responses to ensure the internal database models are never exposed directly to the client. + +### Business Logic Layer (Services) +* located at `yakamon/jws/yakamon/src/main/java/fr/epita/assistants/yakamon/domain` +* Acts as the brain of the application. +* Implements complex game rules: validating if a target tile is walkable based on the terrain type, calculating cooldowns between moves, and managing creature capture probabilities. +* **Converters** are used to translate Entities from the Data Layer into DTOs for the Presentation Layer. + +### Data Access Layer (Hibernate ORM) +* located at `yakamon/jws/yakamon/src/main/java/fr/epita/assistants/yakamon/data` +* Manages persistence using **Hibernate ORM** with the Active Record / Repository pattern. +* Defines relational entities (Player, Game, Yakamon, Item) mapped to a PostgreSQL database. +