Architecture Overview
Flo is a multi-tenant platform composed of a .NET 10 API, an Angular 21 frontend, and a Node.js CLI. Customer instances are isolated; infrastructure can run with Docker Compose (single-tenant) or with the Flo CLI and Traefik (multi-tenant).
Repository layout
Flo/
├── Flo.BE/ # ASP.NET Core API, services, and bounded contexts
├── Flo.BE.Tests/ # Backend NUnit tests
├── Flo.FE/ # Angular application and Jest/Playwright tests
├── Flo.SchemaGen/ # Roslyn C# generators for dynamic entities
├── Flo.STRAPI/ # Legacy Strapi CMS and management tools
├── cli/ # TypeScript CLI for instances and infrastructure
├── shared/ # Schemas and resources shared by FE and BE
├── compose.yaml # Single-tenant stack
├── Dockerfile # API + frontend image build
├── nginx.conf.template # Single-tenant reverse proxy
└── deploy.sh # Single-tenant build and update
The backend contains controllers, services, EF Core models, migrations, and bounded contexts such as Immobili, Catalogo, EInvoicing, and Blogs. The frontend groups surfaces by feature and uses stores and generated API clients. The multi-tenant CLI lives in cli/src/commands/.
Components and technologies
| Area | Technology | Role |
|---|---|---|
| Backend | .NET 10, ASP.NET Core, Entity Framework Core | API and application logic |
| Database | PostgreSQL 17 | Tenant data; one database per instance |
| Identity | OpenIddict, HttpOnly cookies | Sessions and OIDC/OAuth flows |
| Code generation | Roslyn Source Generator | CRUD/schema code for configurable entities |
| Frontend | Angular 21, PrimeNG 21 | Web application and admin panel |
| API clients | NSwag | TypeScript client generation from the OpenAPI specification |
| Runtime | Docker | Application and database images |
| Single-tenant | Docker Compose + Nginx | Proxy and stack for one instance |
| Multi-tenant | Flo CLI + Traefik | Provisioning and blue-green instance deployments |
These versions describe the current repository. Before updating production images, check Flo.BE/Flo.BE.csproj, the package.json files, and Dockerfile.
Request flow
Browser → Nginx (single-tenant) / Traefik (multi-tenant)
→ ASP.NET Core API → services and bounded contexts
→ Entity Framework Core → PostgreSQL
In single-tenant deployments, the Angular frontend is served alongside the API; in multi-tenant setups it can be deployed separately to Cloudflare Pages. External integrations (email, payments, storage, and analytics) are enabled and configured per instance.
Architectural principles
- Bounded contexts — larger domain areas keep models, services, and controllers close to the feature.
- Configurable entities —
Flo.SchemaGengenerates code at compile time from JSON schemas; it is not a CRUD engine interpreted on every request. - Layered authorization — role, feature flag, and organization access policy determine which operations are available.
- Cookie sessions — application sign-in flows issue cookies; the frontend does not store an application bearer token.
- Separate localization layers — Transloco localizes the UI; backend localization settings govern content languages.
- Multi-tenant blue-green deployment — the CLI updates the inactive slot, checks health, then switches traffic. The single-tenant procedure is separate.