A CRM built for working musicians — bookings, contacts, repertoire, invoicing and a branded client portal, in one place designed for the phone in your pocket.
GigLoop treats every booking as a small project. It tracks the gig from first enquiry to post-event wrap-up, surfaces the next thing that needs doing, and handles the paperwork — quotes, contracts, invoices and set lists — so the musician can spend less time on admin and more time playing.
- Manage every booking as a project. A booking moves through a clear lifecycle — Enquiry → Provisional → Confirmed → Ready → Complete — with a smart checklist that surfaces the right action at the right moment instead of leaving you to remember it.
- A branded client portal. Share one link and your client can review the details, e-sign the contract, and complete the pre-gig music form — all under your own logo and colours.
- Contracts, invoices & PDFs. Generate deposit and balance invoices, issue and send them, and produce polished PDFs — created server-side and streamed straight to the client.
- Repertoire & set lists. Keep your song library and build the running order (the Itinerary) for each event, grouped into packages and shared cleanly on the portal.
- Communication templates. Reusable, rich-text email templates with variable substitution, so the quote, contract note and thank-you go out consistently every time.
- A dashboard that nudges. Upcoming gigs, outstanding actions and reminders are surfaced automatically — GigLoop tells you what needs attention rather than making you go looking.
| Area | Stack |
|---|---|
Web (apps/web) |
React 18, Vite, React Router v7, TanStack Query & Table, Tailwind CSS, Radix UI, Tiptap (rich text), Clerk, Storybook |
API (apps/api) |
NestJS 11, Prisma 6 + Neon (serverless Postgres), Clerk, Cloudflare R2 (S3 SDK), Resend, pdfmake, Swagger |
| Tooling | npm workspaces, Playwright (e2e), Vitest / Jest, ESLint, GitHub Actions |
| Path | Contents |
|---|---|
apps/web |
React + Vite frontend (the musician-facing app and client portal) |
apps/api |
NestJS backend — REST API, Prisma data layer, PDF & email pipelines |
e2e |
Playwright end-to-end suite (real-stack, per ADR-0048) |
docs/ |
Architecture Decision Records (adr/), the north-star.md roadmap, and agent guides |
scripts/ |
Repo tooling (e.g. the pre-commit shortcut detector) |
.githooks/ |
Committed git hooks (lint on commit, test + build on push) |
- Node 24 (see
.nvmrc—nvm usepicks it up) - Node.js 24 (the version in
.nvmrc;nvm usepicks it up) and the npm that ships with it. npm is the only package manager (ADR-0087) - Docker (Desktop or Engine) — the local database runs in a container
git clone <repo-url> gigloop
cd gigloop
npm install
# Configure the API environment (see "Environment variables" below)
cp apps/api/.env.example apps/api/.env
# …then fill in the values from each service console. DATABASE_URL and
# DIRECT_URL come from docker-compose.yml, not a console — see below.
# Start the local Postgres container, apply migrations, load seed data
npm run db:up
npm run db:migrate
npm run seed
# Start both apps (API + web) together
npm run devnpm run dev runs the API and the web app concurrently. The web app is served at http://localhost:5173 by default.
Local development runs Postgres 18 in Docker — never a branch of a Neon project. What that database is and where it sits in the wider model is described in docs/environments.md; the reasoning is ADR-0075 §1.
The container is defined in docker-compose.yml, which also explains why it is published on port 5433 rather than the usual 5432.
| Command | Does |
|---|---|
npm run db:up |
Start the container and wait until it accepts connections |
npm run db:migrate |
Apply any migrations the container hasn't got yet |
npm run db:reset |
Wipe it and start over — drop, re-apply every migration, reseed. Refuses unless DATABASE_URL is loopback |
npm run seed |
Reseed without touching the schema |
npm run db:down |
Stop the container (the data volume survives) |
npm run db:destroy |
Stop it and delete the volume — everything goes |
Both DATABASE_URL and DIRECT_URL are the same plain string — there is no pooler in front of the container — built from docker-compose.yml: its POSTGRES_USER, POSTGRES_PASSWORD and POSTGRES_DB, on the port it publishes. No working connection string is committed anywhere in this repo, including this one (CLAUDE.md → Hard Rules).
Upgrading an existing checkout? If your
apps/api/.envpredates this change it still holds a Neon connection string — replace itsDATABASE_URLandDIRECT_URLwith the container's, as above. Until you do, the API talks to Neon rather than the container, andnpm run db:resetrefuses to run at all rather than drop a database that isn't yours to drop.
To author a new migration after editing schema.prisma, use Prisma directly: cd apps/api && npx prisma migrate dev --name <description>.
One quirk worth knowing: if the container isn't running, the API's boot-time retry loop logs "likely a Neon cold start" five times before giving up. That message predates the move to Docker — the real cause is almost always
npm run db:up.
The API is configured entirely through apps/api/.env. apps/api/.env.example is the canonical, commented list — copy it and fill in the values. Every variable below is described by name only; get the actual values from the relevant service console.
⚠️ Never commit.env, and never paste live values (connection strings, API keys, tokens) anywhere. A database connection string embeds a password and is a secret. Local dev uses its own dev-scoped credentials and buckets — never the production ones.
| Variable | Where to get it |
|---|---|
DATABASE_URL |
Already correct in .env.example — the local Docker container (localhost:5433). Deployed environments use the Neon pooled -pooler host |
DIRECT_URL |
Same as DATABASE_URL locally (no pooler in front of the container). Deployed environments use the Neon direct, non-pooled host for migrations |
CLERK_SECRET_KEY |
Clerk dashboard → API Keys |
R2_ACCOUNT_ID |
Cloudflare R2 dashboard → account ID |
R2_ACCESS_KEY_ID |
Cloudflare R2 dashboard → Manage R2 API tokens |
R2_SECRET_ACCESS_KEY |
Cloudflare R2 dashboard → Manage R2 API tokens |
R2_BUCKET_NAME |
Public assets bucket (logos/photos) — e.g. gigloop-dev-public |
R2_PUBLIC_URL |
Public URL for the assets bucket (custom domain or the r2.dev subdomain) |
R2_DOCUMENTS_BUCKET_NAME |
Private documents bucket (contracts, invoices) — e.g. gigloop-dev-documents |
ENCRYPTION_KEY |
AES-256-GCM key (exactly 64 hex chars) for encrypting bank details at rest — generate locally |
RESEND_API_KEY |
Resend dashboard → API Keys |
RESEND_FROM |
Bare from-address for outbound email — no display name ([email protected] for dev; bookings@<domain> in production, never noreply@) |
APP_BASE_URL |
Frontend base URL, used to build portal links (http://localhost:5173 in dev) |
CORS_ORIGIN |
Allowed CORS origin for the API (the frontend URL) |
GOOGLE_MAPS_API_KEY |
Google Cloud console → Distance Matrix API key (for travel-time calc) |
FEATURE_EXAMPLE |
Feature-flag example — default-off; unset/false/0 = off |
E2E_TEST_MODE |
Set only by the Playwright harness (fakes outbound adapters) — leave off everywhere else |
SEED_USER_ID |
Clerk-dev user id used by npm run seed |
Run from the repo root:
| Command | Does |
|---|---|
npm run dev |
Start API + web in dev mode (concurrently) |
npm run build |
Build all workspaces |
npm run lint |
Lint all workspaces |
npm run test |
Run all unit tests |
npm run test:e2e |
Run the Playwright end-to-end suite |
npm run db:up / db:down |
Start / stop the local Postgres container |
npm run db:reset |
Wipe the local database and reseed it from scratch |
npm run seed |
Reseed the local database |
npm test -w @gigloop/api -- --testPathPattern=<file> |
Run a single API test file |
Deterministic checks are automated via git hooks (lint on commit; test + build on push) and re-run in CI — you don't need to run them by hand. Hooks require a one-time opt-in: git config core.hooksPath .githooks.
Checks run in layers, so problems surface early and main stays releasable (see CLAUDE.md and ADR-0044 for the full rationale):
- Git hooks (local, opt-in): lint on commit, test + build on push.
- CI on every PR to
main(.github/workflows/ci.yml): Lint, Test and Build are required and must pass to merge. Integration and E2E (Playwright) also run — each spins up an ephemeral Neon branch — but are informational, not merge-blocking.
Merging is squash-only, and deployment is promotion-based rather than tied to the merge: a commit landing on main deploys to preprod (prod-shaped, synthetic data), and production ships only when a human runs the "Promote to prod" workflow — a merge to main never reaches real users on its own.
The environments, databases, deploy paths, migration mechanisms and feature flags are described in one place: docs/environments.md. The reasoning behind the model is ADR-0075; ADR-0044 covers why prod and preprod are split, migration rehearsal, expand/contract and rollback.
The deep documentation lives alongside the code and is the living source of truth:
CLAUDE.md— hard rules, conventions, commands and the workflow modelCONTEXT.md— the domain model: booking lifecycle, entities and design principlesdocs/environments.md— the single description of environments, deploys, migrations and flagsdocs/adr/— Architecture Decision Records (the reasoning behind key choices)docs/north-star.md— the directional roadmap for the next wave of featuresSPEC.md— historical pre-MVP reference (partly stale;CLAUDE.mdandCONTEXT.mdwin where they disagree)
GigLoop is a greenfield, actively-developed project. Development follows a feature-branch → PR → squash-merge to main model; merging to main deploys to preprod, and production ships only when a human runs the "Promote to prod" workflow. The full workflow, branching rules and code-quality gates are documented in CLAUDE.md.
Private project — all rights reserved.