Sign inSign up

pantelis98765/nightcap

By pantelis98765

•Updated 3 months ago

Image
0

871

pantelis98765/nightcap repository overview

Nightcap is a self-hosted club finance cockpit built for nightclub and event venue operators. It tracks revenue, expenses, partners, artists, and vendors — all in one place, running entirely in a single Docker container with an embedded SQLite database.

⁠Features

⁠Dashboard
  • Live KPI cards: net income, total revenue, expenses, open days
  • Period-over-period comparison with delta indicators (▲/▼)
  • Revenue breakdown chart (Entrance / Wardrobe / Bar / Other)
  • Fixed cost per open day calculation
⁠Events
  • Automatic event detection from register groupings (no extra setup)
  • Card grid with per-event revenue, expenses, and net income
  • Detailed per-event report modal with full register and expense breakdown
⁠Registers
  • Card and table view toggle (preference saved per browser)
  • New register via modal: type pills, event name autocomplete, cash + POS fields
  • Inline expense entry right after saving a new register
  • Expense autocomplete from past entries
⁠Expenses
  • Grouped by register, card or list view
  • Inline add without page reload
  • Search and filter by type
⁠Fixed Costs
  • Monthly recurring costs (rent, utilities, etc.)
  • Divided across open days to show cost-per-open-day
⁠Partners
  • Partner earnings tracking with monthly settlement view
  • Earned / paid / balance per partner with trend indicators
⁠Artists
  • Artist booking and cost tracking
  • Linked to specific events/registers
⁠Vendors
  • Invoice tracking with aging analysis
  • Overdue flags (>30 days) and amber warnings (0–30 days)
  • Unpaid invoice summary strip
⁠Sponsorships
  • Sponsorship deal tracking linked to events
⁠Reports
  • Professional PDF export with cover page, KPI summary, grouped register table, fixed costs, partner earnings
  • Greek/Unicode font support (DejaVuSans)
  • CSV export
⁠Security
  • JWT authentication (8h expiry, configurable secret)
  • Rate limiting: login (20/15 min), API (300/min)
  • CORS restriction via ALLOWED_ORIGINS env var
  • Audit log for all key actions
⁠Data & Backups
  • SQLite database — zero external dependencies
  • Automatic daily backups (keeps last 7)
  • Manual backup download from Settings
  • Hot backup via better-sqlite3 (no downtime)

⁠Quick Start

services:
  app:
    image: pantelis98765/nightcap:latest
    container_name: nightcap
    restart: unless-stopped
    ports:
      - "5000:5000"
    environment:
      DATABASE_PATH: /data/nightcap.db
      JWT_SECRET: change-this-to-a-random-secret-key
    volumes:
      - nightcap_data:/data

volumes:
  nightcap_data:
docker compose up -d

Open http://localhost:5000⁠ — first login: admin / admin123 (change immediately in Settings).

⁠Environment Variables

VariableRequiredDefaultDescription
JWT_SECRETYes (prod)dev-only valueSecret for signing JWTs. Use openssl rand -hex 32.
DATABASE_PATHNo/data/nightcap.dbPath to the SQLite database file
ALLOWED_ORIGINSNo(allow all)Comma-separated allowed CORS origins

⁠Backup

docker run --rm -v nightcap_data:/data -v $(pwd):/out alpine \
  cp /data/nightcap.db /out/nightcap-backup.db

⁠Architecture

Multi-arch image: linux/amd64 + linux/arm64 (Raspberry Pi / Apple Silicon servers).

Tag summary

Content type

Image

Digest

sha256:cf5645c5f…

Size

409.7 MB

Last updated

3 months ago

docker pull pantelis98765/nightcap