Getting started with Auto Repair

Install Openfront Auto Repair, configure it, and load the sample shop group.

Requirements

  • Node.js 20 or later
  • PostgreSQL
  • S3-compatible storage for inspection photos
  • A Stripe key if you want card payments (optional)

Clone and install

git clone https://github.com/openshiporg/openfront-auto-repair.git
cd openfront-auto-repair
npm install

Configure .env

DATABASE_URL=postgres://user:password@localhost:5432/openfront_auto_repair
SESSION_SECRET=
AUTO_SECRET_KEY=   # 64 hex characters
VariableNotes
DATABASE_URLPostgreSQL connection string. Required.
SESSION_SECRETSigns staff sessions. Required.
AUTO_SECRET_KEYKeys the contact hashes and seals provider credentials in SecretBox. 64 hex characters. Required.
PUBLIC_TOKEN_SECRETDerives customer link tokens. Falls back to SESSION_SECRET.
PUBLIC_BASE_URLBase URL used in customer links.
STRIPE_SECRET_KEYCard payments. Accepts sk_ or rk_ keys, and the key decides test or live.
S3_BUCKET_NAME, S3_REGION, S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEYStorage for inspection photos and media.
OPENROUTER_API_KEY, OPENROUTER_MODEL, OPENROUTER_MAX_TOKENSDefault model for assistants. A provider can also be saved under Assistants.
SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_FROMMail for staff password resets.
AR_TX_TIMEOUT_MS, DATABASE_CONNECTION_LIMITTransaction timeout and connection pool size.
PUBLIC_SIGNUPS_ALLOWEDAllows staff self-signup when set.

Apply migrations and start

npm install
npm run dev    # builds Keystone, applies migrations, starts Next.js

Create the first user

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

Load the sample shop group

The onboarding card Load Northgate Auto Group runs Organisation, shops and people (loadNorthgateSetup). It loads Northgate Auto Group LLC with two California shops: Northgate Auto Care (NGA, Sacramento, 8 bays including a heavy lift and alignment) and Northgate Tire & Lube (NGT, Roseville, with tire, alignment and quick-lube bays). It also loads jurisdiction rules, shop policies, booking rules, the service catalog, customers, fleets, appointments, a complete repair order, parts and stock, technicians and communications.

The same steps run from the command line, and running them again changes nothing:

DATABASE_URL=postgres://… npm run seed

Seeded staff (for example priya.shah@northgateautocare.com) cannot sign in until an owner sets their password.

Tests

npm run verify

Database tests run when AR_TEST_DATABASE_URL points at a disposable Postgres schema named vitest.

On this page