Microservices platform (auth, booking, provider, ai) with Ollama-based AI agents and Docker Compose orchestration
# Tunisia Platform
A microservices platform for a Tunisia-based booking/provider marketplace, with an AI service powered by locally-hosted LLMs (Ollama) for chat, classification and recommendations.
> Backend services live in this repo. The Angular back-office admin app is published separately: tunisia-platform-back-office.
## Architecture
```
┌─────────────┐
│ Nginx │ API Gateway
│ (gateway) │
└──────┬──────┘
┌───────────────────┼───────────────────┐
│ │ │
┌───────▼──────┐ ┌────────▼───────┐ ┌────────▼───────┐
│ auth-service │ │ booking-service│ │provider-service│
│ Laravel │ │ Laravel │ │ Laravel │
└───────┬──────┘ └────────┬───────┘ └────────┬───────┘
│ │ │
│ ┌────────▼───────┐ │
└──────────► ai-service ◄────────────┘
│ Laravel │
└────────┬───────┘
│
┌────────▼───────┐
│ Ollama (LLM) │ chat / classify / recommend
│ mistral:7b │ llama3.1:8b
└────────────────┘
Shared infrastructure: PostgreSQL/PostGIS · Redis · RabbitMQ · Elasticsearch + Kibana
```
## Services
| Service | Stack | Responsibility |
|---|---|---|
| `auth-service` | Laravel + Sanctum | Authentication, token issuance, shared identity for all services |
| `booking-service` | Laravel | Booking lifecycle, scheduling |
| `provider-service` | Laravel + PostGIS | Provider/listing management, geolocation search |
| `ai-service` | Laravel | Orchestrates local LLM calls (Ollama) for chat, request classification and recommendations, calling into `provider-service` and `booking-service` for context |
| `nginx` | Nginx | API gateway, single entrypoint routing to each service |
## Why this design
- **Service-per-domain**: auth, booking and provider concerns are isolated, independently deployable Laravel apps sharing a Postgres cluster via separate databases.
- **AI as its own service**: LLM orchestration (prompting, model selection per task — chat vs. …