> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synclair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# System map

> What the codebase is made of beyond the UI — areas, the API surface, the data model, jobs, and integrations — so anyone can orient without reading source.

`/synclair/system` answers the question the component library can't: *"what is this
whole system made of?"* Not the buttons — the **backend and architecture**. It's the
digest a new engineer (or agent) reads to get oriented in a codebase without opening a
single source file.

## What it is

A structured map of everything the codebase consists of below the UI:

<CardGroup cols={2}>
  <Card title="Areas" icon="diagram-project">
    The functional modules the system is organized into, and what each is responsible for.
  </Card>

  <Card title="API surface" icon="plug">
    The endpoints/routes the system exposes — the shape of how it's called.
  </Card>

  <Card title="Data model" icon="database">
    The core entities and how they relate — the nouns of the system.
  </Card>

  <Card title="Jobs & integrations" icon="gears">
    Background jobs, scheduled work, and the external services it talks to.
  </Card>
</CardGroup>

## What's in it

The map lives in `data/system-map.json` (schema: `lib/system/system-map.ts`) and renders
at `/synclair/system`. It's a **digest**, not a live introspection — a curated,
readable summary produced by reading the code, so it stays scannable instead of drowning
you in detail.

## How it works

The map is generated by the `codebase-map` skill, driven by the `system-mapper` digger —
an agent that reads the repo (this one, or the **host** repo in existing-app mode) in its
own context and returns the structured digest. Because it's a snapshot, it carries the
commit it was generated from, so you can see when it's drifted far from the current code.

<Note>
  It works on **either** repo: your own (new-project mode) or the host app you're
  documenting (existing-app mode). Same map, same shape.
</Note>

## How to act on it

<AccordionGroup>
  <Accordion title="Generate or refresh it" icon="arrows-rotate">
    Run the `codebase-map` skill ("map the codebase"). It reads the code and writes
    `data/system-map.json`. Re-run it when the map's snapshot commit has drifted behind.
  </Accordion>

  <Accordion title="Onboard onto the backend" icon="user-plus">
    Point a new engineer or agent at `/synclair/system` — it's the fastest way to
    understand the architecture without spelunking through folders.
  </Accordion>

  <Accordion title="Scope a change" icon="crosshairs">
    Use the areas + data model to see what a change touches before you start.
  </Accordion>
</AccordionGroup>

<Card title="Related: App sitemap" icon="map" href="/sitemap">
  The System Map covers the backend/architecture; the sitemap covers the *views* the app
  serves. Two halves of "what is this app."
</Card>
