Files
Projet_Pierront_Maxime_Marv…/README.md
T
2026-06-12 10:50:45 +02:00

51 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MyLibrary — backend Java
Backend métier du projet librairie (Maxime Lebreton / Marvin Aubert / Patrick Felix-Vimalaratnam).
Pendant visuel : dépôt **`2026-DEV-BUT3`** (React).
## Stack
- Java 21, Maven
- Couche domaine : livres, clients, points de fidélité
- **API REST** (branche `fusion`) : Spring Boot sur le port **8080**
## Lancer lAPI
```bash
mvn spring-boot:run
```
Vérifier : [http://localhost:8080/api/health](http://localhost:8080/api/health)
## Endpoints exposés au front
| Méthode | Route | Rôle |
|---------|-------|------|
| GET | `/api/health` | Ping |
| GET | `/api/books` | Liste des livres (format UI) |
| POST | `/api/books` | Créer un livre |
| GET | `/api/books/{isbn}` | Détail |
| DELETE | `/api/books/{isbn}` | Supprimer |
| POST | `/api/books/{isbn}/read` | Basculer lu / non lu |
| GET | `/api/users/{uuid}/loyalty-points` | Points fidélité client |
Au démarrage, deux livres démo + un client Marie Dupont (100 pts) sont chargés si le catalogue est vide.
## Brancher le front React
Dans `2026-DEV-BUT3` (branche `fusion`) :
```bash
cp .env.example .env
npm install
npm run dev
```
Le proxy Vite envoie `/api` vers `localhost:8080`. Commandes, promos, réservations, avis, abo, prêts et groupes restent côté front (local) tant que ces use cases ne sont pas exposés ici.
## Tests unitaires
```bash
mvn test
```