ADR-009 — Application and Repository Topology¶
Status: ACCEPTED — I1-B1 Technology Decision Gate
Accepted: 2026-09-21
Context¶
Touriffique requires distinct platform experiences and security surfaces while avoiding unnecessary repository and deployment fragmentation.
The platform needs:
- a backend API and asynchronous workers;
- Tenant Admin;
- Platform Admin;
- a Managed Site renderer;
- independently developed Custom/headless sites when contracted;
- shared frontend infrastructure without coupling privileged administration into one deployment.
Decision¶
Core repositories¶
The core platform uses three repositories:
DataKYND/
├── touriffique-bend
├── touriffique-fend
└── touriffique-docs
No separate contracts/SDK repository is required initially.
Backend repository¶
touriffique-bend contains the modular backend application, engine modules, API bootstrap/runtime(s), background-worker bootstrap/runtime(s), persistence/integration infrastructure and authoritative API contract generation.
The backend initially exposes one API runtime with logically separated surfaces:
/api/public/v1
/api/tenant/v1
/api/platform/v1
/webhooks
These are security/contract boundaries even while served by one runtime. They may become independently deployed API runtimes later without changing the engine model if evidence justifies it.
Frontend repository¶
touriffique-fend is a workspace/monorepo containing at least three independently deployable platform applications:
apps/
├── tenant-admin/
├── platform-admin/
└── managed-site/
Tenant Admin and Platform Admin are distinct independently deployable applications. They are not one application with role-switched navigation.
The frontend repository may contain shared packages for concerns such as:
packages/
├── ui/
├── design-tokens/
├── api-client/
├── auth/
├── i18n/
├── validation/
└── shared-config/
The exact workspace/build tooling is deferred to I1-B6.
Managed Site¶
Managed Site is a distinct platform frontend application, not part of Tenant Admin.
One Managed Site implementation is expected to serve/render many tenant sites by resolving authoritative site/tenant context from the incoming host/request. The exact rendering framework and deployment topology are deferred to I1-B7.
Custom/headless sites¶
Tenant-specific Custom/headless frontends do not become applications inside touriffique-fend.
When a bespoke site requires source ownership, it receives a separate repository/project and consumes Touriffique through supported public/headless contracts.
This prevents Custom contracts from becoming platform frontend forks.
API contracts and clients¶
The backend HTTP contract is authoritative.
A machine-readable API description will be used to produce/validate frontend API clients. A separate shared-contract repository is not introduced initially.
The exact API specification/generator/tooling is deferred to I1-B8.
Consequences¶
- Tenant Admin and Platform Admin can have independent deployments, release cadence and security posture;
- they can still share UI, i18n, API-client and validation packages;
- privileged Platform Admin code does not need to ship in the Tenant Admin bundle;
- Managed Site remains operationally independent from administrative applications;
- Custom client work cannot silently accumulate inside the platform frontend repository;
- backend engine modules remain modules, not separate repositories/services;
- workspace, framework and package-manager choices remain open for later gates.