Sign inSign up

sisqueslabs/beacon-api

By sisqueslabs

•Updated 2 days ago

Image
0

10K+

sisqueslabs/beacon-api repository overview

⁠Beacon Api

Sisques Labs' base template for new NestJS services: DDD + CQRS + Hexagonal architecture, TypeORM/PostgreSQL, optional Kafka event forwarding, REST (Swagger) + GraphQL (Apollo) transports, structured logging, OpenTelemetry traces + metrics + logs, and an MCP endpoint.

This image ships with zero bounded contexts — it's the infrastructure skeleton new services are cloned from, not a ready-to-run business API.

⁠Quick start

docker run -p 3000:3000 \
  -e DATABASE_HOST=host.docker.internal \
  -e DATABASE_PORT=5432 \
  -e DATABASE_USERNAME=postgres \
  -e DATABASE_PASSWORD=secret \
  -e DATABASE_DATABASE=nestjs_template_db \
  sisqueslabs/beacon-api:latest

The container needs a reachable PostgreSQL instance — it does not bundle one.

⁠Ports

PortPurpose
3000HTTP — REST (/api/*), GraphQL (/graphql), Swagger docs, health, metrics, MCP (see routes below)

⁠Routes

PathPurpose
GET /api/health/liveLiveness probe
GET /api/health/readyReadiness probe (checks DB connectivity)
POST /api/mcpMCP (Model Context Protocol) endpoint
POST /graphqlGraphQL (Apollo)
GET /docsSwagger UI

Traces, metrics, and logs are pushed via OTLP to a collector (see OTEL_EXPORTER_OTLP_ENDPOINT below) — there is no in-process /metrics endpoint to scrape. Logs still go to stdout/file regardless.

⁠Environment variables

VariableDefaultRequiredNotes
PORT3000NoHTTP port
NODE_ENVproductionNo
DATABASE_DRIVERpostgresNoOnly postgres is supported
DATABASE_HOST—Yes
DATABASE_PORT5432No
DATABASE_USERNAME—Yes
DATABASE_PASSWORD—Yes
DATABASE_DATABASE—Yes
DATABASE_MIGRATIONS_RUNtrueNoRuns pending migrations on boot
CORS_ORIGINS—Production onlyComma-separated allowed origins
OTEL_EXPORTER_OTLP_ENDPOINT—NoOpenTelemetry traces+metrics+logs disabled when unset
KAFKA_ENABLEDfalseNoDomain event forwarding; app boots fine without a broker when disabled
KAFKA_BROKERS—If Kafka enabledComma-separated broker list
LOG_LEVELinfoNo

See the project's .env.example for the full list.

⁠Tags

  • latest — most recent stable release, promoted to prod from main via release.yml
  • x.y.z — specific stable release
  • sha-<shortsha> — continuous build for a single commit on main, published by trunk-ci-cd.yml before promotion
  • edge — most recent continuous build on main (not yet promoted to a stable release)

⁠Source

https://github.com/sisques-labs/beacon-api⁠

Tag summary

Content type

Image

Digest

sha256:101987be0…

Size

115.4 MB

Last updated

2 days ago

docker pull sisqueslabs/beacon-api:edge