Dashboard Setup
Learn how to set up, configure, and run the Reloop user dashboard locally.
The User Dashboard is the primary, premium Next.js client-facing web application of the Reloop platform. It serves as the visual command center where users configure campaigns, view rich analytical dashboards, manage subscriber segments, design dynamic email layouts, and manage API keys and custom sending domains.
Before starting the Dashboard client app, make sure you've completed the base Local Development Setup and have the required backend microservices running (especially the auth service).
Quick Start
Dependencies are handled globally at the root directory. You can start the Dashboard development server instantly:
# Start the Next.js dev server with Turbopack hot reloading
bun fe:dashboard:dev
cd apps/frontend/dashboard
bun dev
Once running, the Dashboard service will listen on port 3001 locally. You can access the interface through Caddy proxy at https://local.reloop.sh/dashboard (or directly at http://localhost:3001) 🎉
Service Information
- Directory Location:
apps/frontend/dashboard/ - Local Listening Port:
3001(configured via--port=3001in the dev script) - Unified Access Route: https://local.reloop.sh/dashboard
- Primary Tech Stack: Next.js (with Turbopack), React 19, TypeScript, Tailwind CSS, Lucide Icons, Recharts, Tiptap, Framer Motion
- Dependencies: Relies on Caddy to proxy Auth and API requests to ElysiaJS microservices.
Environment Configuration
The Dashboard environment variables are defined inside apps/frontend/dashboard/.env. If you ran bun env:setup at the root, your .env is already configured:
# Base URL for better-auth cookie domain and callback routing
NEXT_PUBLIC_APP_URL="https://local.reloop.sh"
# API Gateway Service URL routing to ElysiaJS backend microservices
NEXT_PUBLIC_API_URL="https://local.reloop.sh/api"
# Collaborative Editor Websocket Gateway Endpoint
NEXT_PUBLIC_WS_URL="wss://local.reloop.sh"
Reference Table
| Variable | Required | Default Value | Description |
|---|---|---|---|
NEXT_PUBLIC_APP_URL | YES | https://local.reloop.sh | Main base client URL (handles Better Auth OAuth redirects). |
NEXT_PUBLIC_API_URL | YES | https://local.reloop.sh/api | API proxy endpoint used by SWR and axios fetches. |
NEXT_PUBLIC_WS_URL | YES | wss://local.reloop.sh | WebSocket presence gateway for real-time collaboration. |
Development Commands
All workspace operations should be executed from the monorepo root directory using Turborepo filters:
| Command | Action | Scope |
|---|---|---|
bun fe:dashboard:dev | Start the Dashboard Next.js app in Turbopack development mode | Development |
bun run --filter=dashboard build | Compile the Dashboard for optimized static production | Production |
bun run --filter=dashboard start | Run the compiled production build locally | Production |
bun run --filter=dashboard lint | Run Next.js linting checks | Code Quality |
Troubleshooting Guide
Port 3001 Conflict
If the terminal throws a port binding conflict, identify and clear the PID using port 3001:
# Inspect process listening on port 3001
lsof -i :3001
# Terminate process manually
kill -9 <PID>
Authentication Redirect Failures
If you experience infinite redirect loops or auth errors:
- Ensure the Elysia
authmicroservice is up and listening on port8000(bun be:auth:dev). - Verify that
NEXT_PUBLIC_APP_URLis set to exactlyhttps://local.reloop.shin.env. - Check your browser developer tools to ensure cookies are being set on the correct domain context (
local.reloop.sh).