Architecture Overview
Fataplus uses a sophisticated multi-tenant architecture that isolates client data while enabling seamless collaboration. Each project operates as a logical tenant with dedicated resources and access controls.Unlike traditional SaaS multi-tenancy where each customer is a tenant, Fataplus uses project-based tenancy where each client project becomes its own isolated workspace.
How Multi-Tenancy Works
Project-Based Isolation
Each project receives:- Unique project ID (e.g.,
FP-2025-X7K9M3P1A) - Isolated data storage in PostgreSQL with row-level security
- Dedicated subdomain access (
[project-id].fata.plus) - Project-specific permissions and roles
- Separate document storage namespace
Data Isolation
Complete separation of project data at the database level
Access Control
Role-based permissions unique to each project
Subdomain Routing
Custom URLs for direct project access
Resource Allocation
Independent storage and compute resources
Subdomain Routing
Dynamic Subdomain System
Fataplus implements intelligent subdomain routing for seamless access.- Main Domains
- Tenant Subdomains
Primary Access PointsInfrastructure
- Hosted on Cloudflare Pages (frontend)
- Cloudflare Workers (backend API)
- Astro + React frontend framework
- Hono backend framework
Routing Configuration
The system uses Cloudflare’s edge routing for performance.Data Separation
Database Architecture
Fataplus uses shared database with logical separation for optimal performance and cost.Schema Design
Schema Design
Tenant IdentificationEvery table includes tenant context:All queries are automatically scoped by
project_id to ensure isolation.Row-Level Security
Row-Level Security
PostgreSQL RLS PoliciesEnforce data access at the database level:
File Storage Isolation
File Storage Isolation
Cloudflare R2 / AWS S3 StructureAccess Control
- Presigned URLs for secure downloads
- Time-limited access tokens
- IP-based restrictions (optional)
- Encryption at rest
Tenant Provisioning
Automated Project Creation
When a client submits the intake form, the system automatically provisions a new tenant.Resource Allocation
- Create database entries with project_id
- Initialize file storage bucket
- Set up access control policies
- Configure subdomain routing
Access Control and Permissions
Role-Based Access Control (RBAC)
Each project has three primary roles with distinct permissions.- Client Role
- Project Manager Role
- Admin Role
Permissions
- ✅ View project details and status
- ✅ Download client-facing documents
- ✅ Send messages to project manager
- ✅ Upload requested files
- ❌ Edit project details
- ❌ View internal documents
- ❌ Manage team members
Permission Implementation
Security Measures
Authentication
- OAuth2 with Cloudflare Access
- JWT token-based sessions
- Password strength requirements
- Multi-factor authentication (optional)
Authorization
- Role-based access control
- Resource-level permissions
- Database row-level security
- API endpoint protection
Data Protection
- Encryption at rest and in transit
- HTTPS enforcement (TLS 1.3)
- Regular security audits
- GDPR compliance measures
Network Security
- Cloudflare WAF protection
- DDoS mitigation
- Rate limiting on APIs
- Zero Trust architecture
Performance Optimization
Caching Strategy
Edge Caching- Static assets cached on Cloudflare CDN
- Project data cached for 1 hour (configurable)
- Invalidation on updates
Monitoring and Observability
Tenant Metrics
Tenant Metrics
Per-Project Tracking
- Storage usage
- API call volume
- Active user count
- Document access frequency
- Message volume
System Health
System Health
Platform-Wide Monitoring
- Total active tenants
- Database connection pool usage
- API response times
- Error rates by tenant
- Resource utilization
Next Steps
CRM Overview
Explore the full CRM system capabilities
Smart Forms
Learn about automated project intake
Collaboration
Discover agency partner workflows
AI Features
See how AI enhances the platform