Links
Set up and run the Reloop links app locally.
Complete Base Setup First
Ensure you've finished the Setup — before proceeding.
Service Overview
Contact preference center and tracked link redirects for outbound email.
| Property | Value |
|---|---|
| Directory | apps/frontend/links |
| Port | 3005 |
| Local URL (preferences) | https://local.reloop.sh/preferences |
| Local URL (redirect) | https://local.reloop.sh/redirect |
| Stack | Next.js React 19 Tailwind CSS |
Quick Start
Run from the monorepo root:
bun fe:links:dev
The app starts with Turbopack hot reloading on port 3005.
Environment Configuration
Variables in apps/frontend/links/.env (committed with local defaults — no bun env:setup step needed):
NEXT_PUBLIC_URL=https://local.reloop.sh
# Server-side contacts API (preferences page)
INTERNAL_API_URL=http://localhost:8014/api/contacts
# Rybbit analytics (optional)
NEXT_PUBLIC_RYBBIT_HOST=https://app.rybbit.io
NEXT_PUBLIC_RYBBIT_SITE_ID=reloop-web
The preferences page calls the contacts service server-side via INTERNAL_API_URL. In production, point this at your internal contacts API endpoint.
Reference Table
| Variable | Required | Default |
|---|---|---|
NEXT_PUBLIC_URL | No | https://link.reloop.sh — base URL for redirect and preference links |
INTERNAL_API_URL | No | http://localhost:8014/api/contacts — server-side contacts API |
NEXT_PUBLIC_RYBBIT_HOST | No | Rybbit analytics host |
NEXT_PUBLIC_RYBBIT_SITE_ID | No | Rybbit site identifier |
Routes
| Route | Purpose |
|---|---|
/preferences/[token] | Manage subscription topics and unsubscribe |
/redirect/[token] | Track clicks and redirect to destination URL |
Development Commands
| Command | Description |
|---|---|
bun fe:links:dev | Start dev server with Turbopack |
bun run --filter=links build | Compile production bundle |
bun run --filter=links start | Run production build |
bun run --filter=links lint | Run ESLint checks |
Architecture
Was this page helpful?