Architecture: How should multi-tenant architecture map to Gitea?
Documentation for Sessions
🏗️ Architecture: How should multi-tenant architecture map to Gitea?
Date: 2026-01-16
Time: 23:12:54 UTC
Session: editor2-49.9
Agent: angular
Confidence: 90%
Status: ✅ Documented
📋 Decision Context
Question:
How should multi-tenant architecture map to Gitea?
Task: Map multi-tenant architecture to Gitea
🎯 Decision Made
Chosen:
Tenant → Gitea Organization, Universe → Repository, Team members → Org members with mapped RBAC roles (owner→Owner, admin→Admin, editor→Write, viewer→Read)
Options Considered:
- Flat repos with tenant prefix
- Organizations per tenant
- Single org with repo naming convention
💭 Reasoning
- Existing multi-tenant uses tenantId on all documents with TenantAwareService. 2. Gitea organizations provide natural tenant isolation. 3. One repo per universe keeps code organized. 4. RBAC roles map cleanly to Gitea permission levels. 5. Webhooks can include tenant context for build pipeline. 6. Organization-level settings can enforce tenant policies.
📁 Files Involved
libs/libs-foundational/core-models/src/lib/types/
🔗 Related
- Decision ID:
dev_1768605173976_n3wibl0 - Session: 49
- Workspace: editor2
Auto-generated by MCP Smart Consolidation