Hype Engine supports a containerized development environment with PostgreSQL, the web application, and the background job server.
- Docker with Compose v2, or
- Node.js 24 and PostgreSQL 16 for a native setup.
The supported Node.js range is declared in package.json; .nvmrc pins the
version used by the container.
-
Create your private environment file:
cp .env.example .env
-
Replace
DBPASSandJWT_SECRETwith strong random values. KeepSITEURL=http://localhost:3000for local development. -
Build and start the stack:
docker compose up --build
-
Open the services:
- Web application: http://localhost:3000
- Web health check: http://localhost:3000/health
- Job health check: http://localhost:3001/health
The PostgreSQL data, application logs, and uploaded media live in named Docker volumes. They survive container restarts and are not written into the source tree.
To stop the stack:
docker compose downdocker compose down -v also deletes local database, log, and upload volumes.
Use that command only when you intentionally want a clean local environment.
- Install the Node version from
.nvmrc. - Install PostgreSQL 16 and create the database and user named in
.env. - Copy
.env.exampleto.envand replace all placeholder secrets. - Install dependencies with
npm ci. - Start the web server with
npm run dev. - In a second terminal, start background jobs with
npm run job.
The web server defaults to port 3000 and the job server uses the PORT value
provided to its process. For example:
PORT=3001 npm run jobRun migrations before starting a native installation:
npm run migrateThe web, job, and seed entry points also run pending migrations before doing
work. Applied files are recorded in schema_migrations, and a PostgreSQL
advisory lock prevents the web and job processes from racing during startup.
Add future schema changes as ordered files under migrations/; do not call
sequelize.sync() from application startup code.
Back up an existing database before the first upgrade to this migration system. The runner adopts a non-empty legacy schema as the initial baseline, then applies the explicit legacy upgrade migrations that follow it.
SEQUELIZE_AUTO_SYNC defaults to false. Setting it to true runs
sequelize.sync() after all versioned migrations. This is an opt-in
development or legacy compatibility tool; keep it disabled in production and
represent durable schema changes with migration files.
npm test
npm audit --omit=dev
find bin config controllers middlewares models routes services utils job-runner seeder migrations \
-name '*.js' -print0 | xargs -0 -n1 node --check
docker compose config --quietStartup fails with the variable name. Compare your .env with .env.example;
do not add fallback secrets to source code.
The default Compose stack intentionally keeps PostgreSQL on its private
container network. Use docker compose exec database psql for local database
inspection instead of publishing the database port.
Set SITEURL to the externally reachable origin for the environment. It must
be an absolute HTTP or HTTPS URL and should not end with a path.