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
| Technologie | Usage |
|---|---|
| Spring Boot 3 | Framework API |
| Spring Security | Authentification JWT |
| Spring Data JPA | ORM / Repositories |
| PostgreSQL | Base de données |
| SpringDoc | Documentation OpenAPI |
| MapStruct | Mapping DTO ↔ Entity |
Frontends
| Technologie | Usage |
|---|---|
| Next.js 15 | Framework React |
| TanStack Query | Gestion état serveur |
| Zustand | État global client |
| Tailwind CSS | Styling |
| shadcn/ui | Composants UI |
| Axios | Client HTTP |
| Zod | Validation |
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