GBCM Server API

Contrats d'API et DTOs pour la plateforme GBCM (Global Business Consulting and Management).

Description

Ce module contient les définitions d'interfaces, DTOs (Data Transfer Objects), énumérations et exceptions partagées entre le client et le serveur GBCM.

Technologies

  • Java 17 - Langage de programmation
  • Jakarta Validation 3.0 - Validation des données
  • Jakarta REST 3.1 - Annotations REST
  • Jackson - Sérialisation JSON
  • Swagger/OpenAPI 3 - Documentation API
  • Maven - Gestion des dépendances

Structure du projet

src/main/java/com/gbcm/server/api/
├── dto/                    # Data Transfer Objects
│   ├── auth/              # DTOs authentification
│   ├── user/              # DTOs utilisateurs
│   ├── coaching/          # DTOs coaching
│   ├── workshop/          # DTOs ateliers
│   ├── billing/           # DTOs facturation
│   └── common/            # DTOs communs
├── interfaces/            # Interfaces de service
│   ├── AuthService.java
│   ├── UserService.java
│   ├── CoachingService.java
│   └── WorkshopService.java
├── enums/                 # Énumérations
│   ├── UserRole.java
│   ├── ServiceType.java
│   └── PaymentStatus.java
└── exceptions/            # Exceptions métier
    ├── GBCMException.java
    ├── AuthenticationException.java
    └── ValidationException.java

Installation

git clone https://git.lions.dev/gbcm/gbcm-server-api.git
cd gbcm-server-api
mvn clean install

Utilisation

Ce module est une dépendance partagée utilisée par :

  • gbcm-client-impl-quarkus - Interface web
  • gbcm-server-impl-quarkus - Implémentation serveur
  • gbcm-mobile-app - Application mobile (via REST)

Ajout de la dépendance

<dependency>
    <groupId>com.gbcm</groupId>
    <artifactId>gbcm-server-api</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>

DTOs Principaux

Authentification

  • LoginRequestDTO - Requête de connexion
  • LoginResponseDTO - Réponse de connexion
  • UserDTO - Informations utilisateur

Services

  • WorkshopDTO - Informations atelier
  • CoachingSessionDTO - Session de coaching
  • InvoiceDTO - Facturation

Interfaces de Service

AuthService

  • login() - Authentification
  • logout() - Déconnexion
  • refreshToken() - Rafraîchissement token
  • validateToken() - Validation token

UserService

  • createUser() - Création utilisateur
  • updateUser() - Mise à jour
  • getUserById() - Récupération par ID

Énumérations

UserRole

  • ADMIN - Administrateur
  • COACH - Coach/Consultant
  • CLIENT - Client
  • PROSPECT - Prospect
  • MANAGER - Manager

Validation

Toutes les DTOs incluent des annotations de validation Jakarta :

  • @NotNull, @NotBlank - Champs obligatoires
  • @Email - Format email
  • @Size - Taille des chaînes
  • @Valid - Validation en cascade

Documentation OpenAPI

La documentation API est générée automatiquement via les annotations Swagger :

  • Descriptions des endpoints
  • Schémas des DTOs
  • Exemples de requêtes/réponses

Tests

mvn test

Build

# Build standard
mvn clean package

# Installation locale
mvn clean install

# Déploiement (si configuré)
mvn deploy

Versioning

Ce module suit le versioning sémantique :

  • MAJOR.MINOR.PATCH
  • Changements breaking = MAJOR
  • Nouvelles fonctionnalités = MINOR
  • Corrections de bugs = PATCH

Support

Licence

Propriétaire - GBCM LLC © 2024

Description
No description provided
Readme 105 KiB
Languages
Java 100%