🗂️
Architecture

Audience-based routing architecture

0views0comments

How one NestJS codebase serves both web and CMS via @Audience.

Overview

The SITESAFF backend is a single NestJS codebase that splits web/CMS routes using an @Audience decorator.

How it works

Each controller is tagged @Audience(CMS) or @Audience(WEB); an AudienceGuard returns 404 for routes outside the running instance's audience.

Benefit

The API_AUDIENCE=both|cms|web env var lets you run one service (dev) or split into two (production) without changing code.

Tags

architecturenestjs

Docs

Back

Category

Architecture · Docs

Audience-based routing architecture | WIKI IT