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

# Repo structure

> Where major parts of the HQ codebase live.

```text theme={null}
yourhq/
  apps/ui/              Next.js dashboard (App Router, Tailwind, shadcn)
  apps/migrate/         Database migration runner CLI (yourhq-migrate)
  apps/worker/          Hosted-mode worker service (Stripe, E2B, Resend) — behind `hosted` profile
  gateway/              Gateway image, files API, daemons, lifecycle scripts
  gateway/connectors/   Source connector plugins (one folder per provider + registry)
  gateway/plugins/      HQ plugin system (SDK, template, built-in plugins, contributor guide)
  gateway/daemons/      Python daemons (command runner, dispatcher, source sync, secrets sync, plugin runner, etc.)
  db/migrations/        Supabase SQL migrations (001–039)
  templates/            Agent template library (16 templates)
  installer/            Interactive install scripts (install.sh + install-gateway.sh)
  docs-site/            Mintlify documentation source (docs.yourhq.ai)
  scripts/              Operational and build scripts
  .github/workflows/    CI and image publishing
```

<CardGroup cols={2}>
  <Card title="UI" icon="browser" href="/development/local-development">
    `apps/ui/` — the Next.js dashboard. Server actions in `src/app/dashboard/*/actions.ts`, components in `src/components/`, hooks in `src/hooks/`.
  </Card>

  <Card title="Gateway" icon="server" href="/concepts/gateways">
    `gateway/` — Dockerfile, `entrypoint.sh`, `files_api.py`, daemons in `daemons/`, lifecycle scripts in `scripts/`.
  </Card>

  <Card title="Templates" icon="copy" href="/reference/templates">
    `templates/` — one directory per agent role. Each is a starting worktree for new agents.
  </Card>

  <Card title="Migrations" icon="database" href="/reference/migrations">
    `db/migrations/` — ordered SQL files. Schema source of truth.
  </Card>
</CardGroup>

Read [Architecture](/concepts/architecture) for how these pieces interact at runtime.
