Skip to content

Local development

A Linux (or WSL2/Ubuntu) environment matching production — PHP, PostgreSQL, optionally Redis — is strongly recommended.

Requirements

  • PHP 8.4 with mbstring, bcmath, intl, zip, gd, pdo_pgsql, pgsql
  • Node 22+ and npm · Composer 2
  • PostgreSQL 18 (Imaginook uses citext, uuid, jsonb, pg_trgm)
  • Redis 8 — optional; the defaults are all database-backed

Install (fresh clone → ready)

bash
composer install && npm ci
cp .env.example .env && php artisan key:generate

# create the database + role, then point .env DB_* at it:
#   CREATE ROLE imaginook LOGIN PASSWORD 'imaginook_dev';
#   CREATE DATABASE imaginook OWNER imaginook;
#   \c imaginook
#   CREATE SCHEMA IF NOT EXISTS imaginook_test AUTHORIZATION imaginook;

php artisan migrate --seed
npm run build

Tests run against a dedicated imaginook_test schema in the same database (selected via DB_SEARCH_PATH in phpunit.xml, which expects DB_PASSWORD=imaginook_dev).

Run

bash
composer run dev     # app :8000 + Vite HMR :5173 + queue worker + log tailer
# …or separately:
php artisan serve
npm run dev

Seeded dev logins

php artisan db:seed creates verified accounts (password password):

AccountRole2FA
nooki@imaginook.appusernone — the simplest to test
admin@imaginook.appadminenforced (recovery code NOOKI-RECOV-0108)
mod@imaginook.appmoderatorenforced

Invite-only signup test code: NOOK-INTO-THE-BETA.

Quality gates

bash
./vendor/bin/pint --test               # formatting (the only static gate)
npm run build                          # asset build
npm run test:js                        # Vitest
php artisan test --testsuite=Unit,Feature
php artisan test --testsuite=Security  # a separate required gate
npm run e2e                            # Playwright (needs: npx playwright install chromium + the E2eSeeder)

See the Contributing guide for the branching model and PR rules.

AGPL-3.0 · built in the open.