Aller au contenu principal

Architecture

Vue d'ensemble de l'architecture THE HIVE.

Vue globale

┌─────────────────────────────────────────────────────────────────┐
│ CLIENTS │
└─────────────────────────────────────────────────────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Frontend │ │ Frontend │ │ Frontend │
│ Recruteur │ │ Candidat │ │ Admin │
│ (Next.js) │ │ (Next.js) │ │ (Next.js) │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
└────────────────────┼────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│ BACKEND API │
│ (Spring Boot) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Controllers │ │ Services │ │ Repositories│ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│ PostgreSQL │
└─────────────────────────────────────────────────────────────────┘

Stack technique

Backend

TechnologieUsage
Spring Boot 3Framework API
Spring SecurityAuthentification JWT
Spring Data JPAORM / Repositories
PostgreSQLBase de données
SpringDocDocumentation OpenAPI
MapStructMapping DTO ↔ Entity

Frontends

TechnologieUsage
Next.js 15Framework React
TanStack QueryGestion état serveur
ZustandÉtat global client
Tailwind CSSStyling
shadcn/uiComposants UI
AxiosClient HTTP
ZodValidation

Authentification

┌─────────┐     POST /auth/login      ┌─────────┐
│ Client │ ──────────────────────────▶│ Backend │
└─────────┘ └─────────┘
│ │
│ { accessToken, │
│ refreshToken } │
│◀─────────────────────────────────────┘

│ GET /api/xxx
│ Authorization: Bearer {accessToken}
│─────────────────────────────────────▶
  • Access Token : JWT court (15 min)
  • Refresh Token : JWT long (7 jours)
  • Stockage : localStorage (tokens)

Structure des repos

the-hive/
├── wethehive-backend/ # API Spring Boot
├── wethehivers-frontend-recruteur/ # Next.js Recruteur
├── wethehive-frontend-public/ # Next.js Candidat
├── wethehive-frontend-admin/ # Next.js Admin
└── thehivers-docs/ # Cette documentation