Skip to content

Getting Started

Daniel J. Saldaña edited this page Oct 29, 2026 · 1 revision

Getting Started

🇪🇸 Español

This guide runs Goliat locally with the built-in demo login and a fictional inventory. You do not need an Azure account.

Requirements

  • Node.js 24 (minimum 22.12) and npm.
  • An empty PostgreSQL database whose user can create tables. A local PostgreSQL 17 works well.

Install dependencies on the operating system where Next.js will run: Tailwind uses native binaries that differ between Windows and Linux.

1. Install and configure

git clone https://github.com/danieljsaldana/goliat-cloud-inventory.git
cd goliat-cloud-inventory
npm ci
cp .env.example .env

Edit .env:

DB_HOST=127.0.0.1
DB_NAME=cloud_inventory
DB_USER=cloud_inventory
DB_PASSWORD=<your password>
DB_SSL=false               # local server without TLS

DASHBOARD_AUTH_MODE=demo
DASHBOARD_USERNAME=<choose a user>
DASHBOARD_PASSWORD=<choose a password>
AUTH_SECRET=<at least 32 random bytes>

Generate a secret with, for example, openssl rand -base64 32. .env is ignored by Git and must never be committed.

2. Create the schema and load sample data

npm run db:init   # creates the schema from server/schema/initial.sql; safe to repeat
npm run db:seed   # optional: 5 subscriptions and 214 fictional resources

db:seed refuses to run with NODE_ENV=production and needs no cloud credentials.

3. Start the dashboard

npm run dev

Open http://127.0.0.1:4000 and sign in with the demo credentials. PORT in .env drives both dev and start; if you change it, also update AUTH_URL and SITE_URL.

Next steps

Useful scripts

Command Purpose
npm run dev / npm start Development / production server (loads .env first).
npm run build Production build (standalone output).
npm run db:init Create the schema in an empty database; safe to repeat.
npm run db:seed Load the demo inventory.
npm run db:migrate / db:status / db:check Apply, list and verify migrations.
npm run collect:azure Import azure/latest.json from Blob Storage into PostgreSQL.
npm test Unit tests; PostgreSQL integration tests with RUN_DB_TESTS=1.
npm run test:e2e Playwright browser tests.

Clone this wiki locally