Skip to content

Installation

Development Installation

bash
git clone https://github.com/dlampatricio/better-reports.git
cd better-reports
npm install
npm run build:binary
npm run dev

The development server starts both the backend (localhost:3000) and frontend (localhost:5173) with hot-reload.

Production Installation (Manual)

1. Build the Application

bash
npm install
npm run build:binary
npm run build:ui

2. Start the Server

bash
NODE_ENV=production \
  REPORTS_DATA_DIR=/path/to/data \
  REPORTS_USER=admin \
  REPORTS_PASS=your-password \
  node src/server.mjs

3. Configure Reverse Proxy (Optional)

The app listens on port 3000 by default. For production, use a reverse proxy:

Traefik (recommended):

yaml
# traefik/config.yml
http:
  routers:
    reports:
      rule: "Host(`reports.yourdomain.com`)"
      service: reports
      tls:
        certResolver: letsencrypt

  services:
    reports:
      loadBalancer:
        servers:
          - url: "http://host.docker.internal:3000"

Nginx:

nginx
server {
  listen 443 ssl;
  server_name reports.yourdomain.com;

  location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
  }
}

Docker Installation

See the Docker deployment guide.

PM2 Installation

See the PM2 deployment guide.

System Requirements

ComponentRequirement
Node.js>= 18
RustLatest stable (for native addon build)
RAM256 MB minimum, 1 GB recommended
Disk500 MB for base install, plus template storage
OSLinux, macOS, Windows (WSL2 recommended)

Design and Dev by David Lam