Skip to content

Running it locally

Try Tradehall on your own computer before you put it on a server. The quickest way needs only Docker.

Terminal window
git clone https://github.com/Hudsonville-Digital-Foundry/Tradehall.git && cd Tradehall && docker compose up

The first build takes a couple of minutes. Then open http://localhost:8000 and sign in with a demo login below.

Compose runs PostgreSQL, the app, a queue worker, and the scheduler. The first start generates an app key, runs migrations, and seeds demo data. The key and the database live in Docker volumes, so later starts keep them.

  • Put optional settings such as ANTHROPIC_API_KEY or STRIPE_SECRET in a .env file or your shell before docker compose up.
  • Set APP_PORT to use a port other than 8000.
  • docker compose down -v deletes everything for a fresh start.

You need Go 1.27 or later, Node.js 22 or later, and PostgreSQL, or SQLite with nothing to install: set DATABASE_URL=sqlite:storage/database.sqlite in .env (see sqlite.md). bin/setup checks those, creates .env, installs dependencies, generates a key, migrates, seeds an empty database, builds assets, and starts the server with a queue worker. bin/setup --no-run stops before starting. It’s safe to run again.

The steps it runs, if you’d rather do them by hand:

Terminal window
cp .env.example .env
npm install
go run . key:generate
go run . migrate # add --force to create the database
go run . db:seed # demo data
npm run build # or `npm run dev` for the server, a queue worker, and Vite, reloading on changes
go run . # http://127.0.0.1:8000

The password is password for all of them.

Email Who
owner@tradehall.test Owner, every permission
tech@tradehall.test Technician: tickets, time, projects, chat, read-only invoices
client@tradehall.test Portal contact at Lakeshore Insurance Agency

Email goes through a queue, so run a worker (go run . queue:work) to send it. The default log mailer writes each email to the log instead of sending it. Recurring invoices are issued by invoicing:recur, which the scheduler runs daily at 06:00 UTC. In production, add a cron entry that runs schedule:run every minute, or use one of the deploy options, which run all three for you.

With SEED_DEMO_DATA=false (Docker) or an unseeded database, the first visit opens /setup to create the owner account. It asks for a one-time setup token that the server writes to its log.