Getting started with Home Services

Install Openfront Home Services, configure it, and load the sample company.

Requirements

  • Node.js 20 or later
  • PostgreSQL
  • A Stripe key if you want card payments (optional)

Clone and install

git clone https://github.com/openshiporg/openfront-home-services.git
cd openfront-home-services
npm install

Configure .env

cp .env.example .env   # set DATABASE_URL and SESSION_SECRET
VariableNotes
DATABASE_URLPostgreSQL connection string. Required.
SHADOW_DATABASE_URLShadow database used by npm run migrate:gen.
SESSION_SECRETSigns staff sessions and keys the audit hash chain. Required.
SECRET_BOX_KEYSeals gate codes and integration credentials. Falls back to SESSION_SECRET in development, and is required in production.
STRIPE_SECRET_KEYCard payments on Stripe Checkout. The mode follows the key.
OPENROUTER_API_KEY, OPENROUTER_MODELThe model used by the assistant.
SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_FROMMail for staff password resets.
HS_TX_MAX_WAIT_MSTransaction lock wait in milliseconds (15000 by default).
PUBLIC_SIGNUPS_ALLOWEDAllows staff self-signup when set.

Apply migrations and start

npm ci
npm run migrate
npm run dev

Create the first user

Open /dashboard/init and create the first owner. Its role, Owner, gets every permission except break-glass.

Load the sample company

The setup cards load Summit Plumbing & Air LLC, a Texas plumbing and HVAC company with an Austin branch, in three sections:

SectionWhat it loads
Company, people and controlsThe company, branch and business units, roles, staff and approval policies.
Technicians, job types and customersTechnicians with credentials and skills, a Comfort Advisor for sales visits, weekly shifts and four weeks of on-call, job types, the next 21 days of arrival windows, and customers.
Price bookGood/better/best ladders, labour rates, a 1.5× after-hours multiplier and tiered markup, submitted for second-person approval.

Or, after creating the owner, run the seed. It loads the same company with a first working day: leads, office and AI-booked jobs, a recorded call, a hand-off to the office and the dispatcher's assignments. It is idempotent.

npm run seed

Tests

npm run verify
HS_TEST_DATABASE_URL='postgresql://…?schema=vitest' npm test   # adds the database tests

On this page