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

# Encore.ts API (api-events)

> Historical notes — Go API migration complete; api-events is the system of record

The Soundcheck REST API migration from Go to Encore.ts is **complete**. api-events (`api-events/`, port **4000**) is the sole runtime for public HTTP, owns PostgreSQL DDL, and serves web, mobile, e2e, and MCP clients.

Use the current backend docs instead of this page for day-to-day work:

| Topic | Doc |
| - | - |
| Overview & quick start | [API Overview](https://docs.soundchecklive.io/engineering/backend/overview.md) |
| Architecture | [API Architecture](https://docs.soundchecklive.io/engineering/backend/architecture.md) |
| Local setup | [API Setup](https://docs.soundchecklive.io/engineering/backend/setup.md) |
| Infra profiles | [Development Profiles](https://docs.soundchecklive.io/engineering/backend/profiles.md) |
| Notifications & Pub/Sub | [api-events](https://docs.soundchecklive.io/engineering/backend/api-events.md) |
| Secrets / env inventory | [api-events operations](https://docs.soundchecklive.io/engineering/backend/api-events-operations.md) |
| Canonical source | [`api-events/README.md`](https://github.com/soundchecklive/soundcheck-mobile-app/blob/main/api-events/README.md) |

## What changed

* **Before:** Go API (`api/`, `:8080`) was system of record; api-events was notification fan-out only; dual schema parity (`schema:parity`) kept Go and TS Prisma mirrors aligned.
* **Now:** api-events owns `src/db/schema.prisma`, migrations, all REST endpoints, and direct Pub/Sub publication. A shared transactional outbox is not implemented; see the [target workflow contract](../backend/async-durability-patterns). The Go API tree is removed. No differential oracle or schema parity gate.

## Local development (current)

```bash theme={null}
npm run dev:infra
cd api-events && npm run db:migrate && npm run db:seed:demo-full
docker compose -p api -f dev/docker-compose.yml restart clerk-emulator
cd api-events && npm run dev:emulator
cd web && npm run dev:emulator
```

| Port | Service |
| - | - |
| 4000 | Encore api-events |
| 5433 | Shared Postgres |
| 4711 | Clerk emulator |
| 4092 | Cleo Pay emulator |
| 10000 | Azurite |

## Client base URLs

| Client | Setting |
| - | - |
| Web dev | `BACKEND_API_URL=http://localhost:4000` (via `npm run dev:emulator`) |
| Mobile | `EXPO_PUBLIC_API_URL=http://localhost:4000` |
| MCP | `API_BASE_URL=http://localhost:4000` |
| E2E | `E2E_API_URL=http://localhost:4000` |

## Contract gates (current)

| Gate | Command |
| - | - |
| Unit + coverage | `cd api-events && npm run checks` |
| OpenAPI | `npm run openapi:parity` |
| E2E regression | `npm run test:e2e` with `E2E_ENFORCE_COVERAGE=1` in CI |

Route inventory: the Encore endpoint declarations, with domains in `api-events/routes.json`

Agent conventions for new endpoints: `.agents/skills/encore-port/SKILL.md`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.