Skip to content

Latest commit

 

History

History
76 lines (61 loc) · 2.85 KB

File metadata and controls

76 lines (61 loc) · 2.85 KB

Mustache Bash — Monorepo Root

Overview

This is the development environment root for the Mustache Bash event ticketing platform. It orchestrates three git submodules via Docker Compose with a shared nginx HTTPS reverse proxy.

Repository Structure

mustache-bash/
├── api/                  # Submodule: Koa/Node.js REST API (port 4000)
├── admin/                # Submodule: React admin SPA (port 8080)
├── mustachebash.com/     # Submodule: Astro public website (port 4321)
├── schema/               # PostgreSQL schema + migration scripts
├── scripts/              # Dev bootstrap tooling
├── workers/              # Standalone batch/utility scripts
├── secrets/              # Gitignored env/certs (see below)
├── docker-compose.yml    # Full dev environment orchestration
└── nginx-dev.conf        # HTTPS reverse proxy config

Submodules

Each subdirectory is an independent git repo. Always cd into the submodule before committing to it. Update submodule pointers from the root after pushing submodule changes.

# Update all submodules to latest tip
git submodule update --remote

# After changing a submodule, commit the pointer update in the root
git add api  # (or admin / mustachebash.com)
git commit -m "update api submodule pointer"

Dev Environment

First-time setup

./scripts/bootstrap.sh   # installs mkcert and generates HTTPS certs into secrets/

Starting everything

docker compose up        # starts postgres, nginx, api, admin, web

Installer services (api-installer, web-installer, admin-installer) run npm ci and clean build artifacts before the app containers start — this is intentional.

Local HTTPS URLs

Service Dev URL
API https://api-mustachebash.local.mrstache.io
Website https://mustachebash.local.mrstache.io
Admin https://admin-mustachebash.local.mrstache.io

Also accessible via *.mustachebash.localhost.

Secrets (secrets/)

Gitignored. Required files:

  • secrets/.env — env vars consumed by the API container (Mailgun, Mailchimp, Braintree keys)
  • secrets/localhost-cert.pem / secrets/localhost-key.pem — generated by bootstrap script

Database

  • PostgreSQL 15.5 running in Docker, exposed on localhost:5432
  • Credentials: postgres/postgres, database: mustachebash
  • Schema initialized from schema/v1schema.sql on first container start
  • postgres-data/ holds persistent data (gitignored)

Schema / Migrations

  • schema/v1schema.sql — authoritative DDL
  • schema/migrate-v1postgres.mjs — migration runner
  • schema/package.json — run via node directly in the schema directory

Workers

Standalone batch scripts (not containerized):

  • workers/batch-refunds.js
  • workers/batch-voids.js
  • workers/email-import.js
  • workers/refunded-email-tag.js