Skip to main content

Try the live demo!

Search

Developer Setup

Set up your development environment for libredesk

libredesk is a monorepo with a Go backend and two Vue.js frontend apps: the main agent dashboard and the live chat widget. Both use Shadcn for UI components.

Prerequisites

  • Go 1.25 or later
  • Node.js 20 or later and pnpm (if working on frontend)
  • Redis
  • PostgreSQL (≥13)

First-time setup

Clone the repository

git clone https://github.com/abhinavxd/libredesk.git
cd libredesk

Configure libredesk

Copy config.sample.toml as config.toml and add your configuration:

cp config.sample.toml config.toml

For local Postgres and Redis, set db.host to localhost and redis.address to localhost:6379.

Build and install

Build the libredesk binary, run the DB setup and set the System user password:

make
./libredesk --install
./libredesk --set-system-user-password

Log in as System with the password you set.

Running the dev environment

Full stack

Run the backend and both frontend apps in development mode:

Start backend server

make run-backend

This starts the libredesk backend dev server on :9000

Start the main app

make run-frontend-main

This starts the agent dashboard in dev mode using pnpm on :8000

Requests are proxied to the backend running on :9000 (check vite.config.js for proxy config)

Start the widget app

make run-frontend-widget

This starts the live chat widget in dev mode on :8001, also proxied to the backend on :9000

Only needed if you are working on the widget.

Backend only

make run-backend

Access the backend API at http://localhost:9000

Frontend only

make run-frontend-main

Access the main app at http://localhost:8000

make run-frontend-widget

Access the widget at http://localhost:8001

Production build

To build a production-ready binary:

make

This builds the Go binary and both frontend apps, embeds the static assets, and produces a single self-contained binary: libredesk.

To build just one app: make frontend-build-main or make frontend-build-widget.

Running tests

make test

Go integration tests need Postgres. Start a test database on 127.0.0.1:5433 with:

make test-db

Remove it with make test-db-down.

Was this article helpful?