Skip to main content

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​

AreaTechnologyRole
Backend.NET 10, ASP.NET Core, Entity Framework CoreAPI and application logic
DatabasePostgreSQL 17Tenant data; one database per instance
IdentityOpenIddict, HttpOnly cookiesSessions and OIDC/OAuth flows
Code generationRoslyn Source GeneratorCRUD/schema code for configurable entities
FrontendAngular 21, PrimeNG 21Web application and admin panel
API clientsNSwagTypeScript client generation from the OpenAPI specification
RuntimeDockerApplication and database images
Single-tenantDocker Compose + NginxProxy and stack for one instance
Multi-tenantFlo CLI + TraefikProvisioning 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.SchemaGen generates 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.

Further reading​