Inbox

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

Complete Base Setup First

Ensure you've finished the Setup — before proceeding.

Service Overview

Agent Inbox API — mailboxes, threads, and messages from inbound email via NATS.

PropertyValue
Directoryapps/backend/inbox
Port8021
Local URLhttps://local.reloop.sh/api/inbox
Swagger UIhttps://local.reloop.sh/api/inbox/openapi
StackElysiaJS PostgreSQL Redis NATS MinIO

Quick Start

Run from the monorepo root (requires inbound via Docker):

bun be:inbox:dev

The service starts with hot reloading on port 8021.

Environment Configuration

Variables live in apps/backend/inbox/.env. Running bun env:setup from the root auto-populates this file.

PG_URL=postgresql://reloop:reloop123@localhost:5432/reloop
REDIS_URL=redis://:reloop123@localhost:6379
PORT=8021
BASE_URL="https://local.reloop.sh"
NATS_URL=nats://localhost:4222
S3_ENDPOINT=http://localhost:9010
S3_ACCESS_KEY=reloop
S3_SECRET_KEY=reloop123
S3_BUCKET=reloop-attachments
S3_REGION=us-east-1
S3_FORCE_PATH_STYLE=true
NODE_ENV=development

Reference Table

VariableRequiredDefault
PG_URLYESpostgresql://...
REDIS_URLYESredis://...
PORTYES8021
NATS_URLYESnats://localhost:4222
S3_ENDPOINTYEShttp://localhost:9010

Development Commands

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

Architecture

LayerDetail
Inbound flowinbound MTA → NATS → inbox persistence.
AttachmentsStored in MinIO via S3-compatible endpoint.
Dashboard APIMailboxes, threads, and messages at /api/inbox.

Was this page helpful?

Edit this page