For the complete documentation index, see llms-docs.txt or the site index llms.txt. Full docs corpus: llms-full-docs.txt. Prefer the markdown version of this page at /docs/setup/backend/contacts.md. Product capabilities: skill.md. Docs MCP: /docs/mcp. Site MCP: /mcp.

Contacts

Set up, configure, and run the Reloop contacts microservice locally.

Subscriber profiles, groups, channels, custom properties, and suppression lists.

Overview

PropertyValue
Directoryapps/backend/contacts
Port8014
Local URLhttps://local.reloop.sh/api/contacts
Swagger UIhttps://local.reloop.sh/api/contacts/openapi
StackElysiaJS · PostgreSQL · Redis · NATS

Quick start

bun be:contacts:dev

Or bun backend:dev / bun dev.

Environment

apps/backend/contacts/.env — from bun setup / bun env:setup.

PG_URL=postgresql://reloop:reloop123@localhost:5432/reloop
REDIS_URL=redis://:reloop123@localhost:6379
PORT=8014
BASE_URL="https://local.reloop.sh"
NATS_URL=nats://localhost:4222
PREFERENCES_SECRET="reloop-preferences-secret-key-change-in-prod"
NODE_ENV=development

PREFERENCES_SECRET signs preference-center tokens for Links. The service refuses to start in production if left at the default.

VariableRequiredDefault
PG_URLYESpostgresql://...
REDIS_URLYESredis://...
PORTYES8014
BASE_URLYEShttps://local.reloop.sh
NATS_URLYESnats://localhost:4222
PREFERENCES_SECRETProd onlyDev default in .env.dev

Commands

CommandDescription
bun be:contacts:devStart dev server with hot reloading
bun run --filter=be-contacts buildCompile production bundle
bun run --filter=be-contacts startRun compiled production build
bun run --filter=be-contacts check-typesTypeScript type-check

Architecture

LayerDetail
AudienceContacts, groups, channels, and custom properties per organization
PreferencesPowers the Links preference center
EventsLifecycle events published to NATS under contacts.*
Schemacontact, channel, group in packages/db/src/schema/

Next

Was this page helpful?

Edit this page