Backend d'analyse nutritionnelle · Architecture microservices FastAPIDémarrage : docker-compose up --build
| Service | Port direct | Gateway | Swagger |
|---|---|---|---|
| Gateway | — | localhost:8000 |
/docs |
| Auth | localhost:8004 |
localhost:8000/auth/... |
/docs |
| Meal | localhost:8003 |
localhost:8000/meal/... |
/docs |
| Kcal | localhost:8001 |
localhost:8000/kcal/... |
/docs |
| ETL | localhost:8002 |
— | — |
| Adminer | localhost:8080 |
— | — |
/auth/loginAuthentifier un utilisateur et obtenir un token JWT.
Requête
POST <http://localhost:8000/auth/login>
Content-Type: application/json
{
"email": "[email protected]",
"password": "secret123"
}
Paramètres body
| Champ | Type | Statut | Description |
|---|---|---|---|
email |
string | requis | Adresse email de l'utilisateur |
password |
string | requis | Mot de passe en clair |
Réponse
{
"access_token": "eyJhbGci...",
"token_type": "bearer"
}
/meal/usersCréer un nouvel utilisateur.