Skip to main content
New to the layout? Read Architecture first. Every environment variable is collected in Configuration.

Prerequisites

  • Node 24.16+ and npm (every part refuses to install on an older Node).
  • Docker (for local PostgreSQL + Redis) — or your own Postgres 17 / Redis 7.
  • Native builds only: Xcode 26+ (iOS), Android SDK 36 + JDK 21 (Android), Rust stable (desktop). Not needed to run the web app.

1. Backend (shipwide_api) — start here

1

Install and configure

2

Start Postgres + Redis

3

Migrate, seed, serve

Check it: curl http://localhost:3001/v1/health. Interactive API reference: http://localhost:3001/docs. The minimum env is DATABASE_URL, REDIS_URL, JWT_SECRET (≥32 chars) — env.dev sets them.
Email in dev: EMAIL_DEV_MODE=true prints one-time sign-in codes to the API console instead of emailing them, so the passwordless flow works with no SMTP.

2. App (shipwide_app)

Sign in: enter any email → read the 6-digit code from the API console → you’re in (an unknown address is created on the spot). Native: npm run build (it ends with cap sync), then open the ios/ / android/ project — see App.

3. Admin panel (shipwide_admin)

Sign in with the ADMIN_LOGIN / ADMIN_PASSWORD you set in the API’s env, or an emailed staff code (printed to the API console). The first admin is bootstrapped from ADMIN_EMAILS. The API allows this origin automatically via ADMIN_URL — keep ADMIN_URL and the port in agreement.

4. Website (shipwide_website)

It’s all placeholder content — see Website and Customization to make it yours.

Ports

Each part has its own fixed port — API 3001, app 8100, admin 5176, website 4334, Postgres 5433, Redis 6380 — so the kit runs next to whatever else you have locally. The admin and the website use strictPort: a taken port stops them with an error. The app’s ionic serve instead moves to the next free port, so if it comes up elsewhere, something is already on 8100. To change a port, edit the part’s vite.config.ts / astro.config.mjs (for the app also the --port in its serve script; for the API PORT in its env) together with the env values that point at it (VITE_BACKEND_URL, VITE_API_URL, CORS_ORIGINS, ADMIN_URL).

Code quality (all four parts)

npm install also activates the git hooks (husky):
  • pre-commit — a guard rejects accidental files (stray names from a mistyped shell command, new empty files without an extension, files over 2 MB unless listed in .husky/large-files.txt, unresolved conflict markers), then eslint --fix and Prettier run on the staged files.
  • commit-msg — headers follow Conventional Commits: type(scope): subject (feat, fix, chore, docs, refactor, test, …).
In every part, npm run build is the quality gate: it starts with prettier --check . and eslint ., then type-checks, runs the tests (app, admin panel, API and website — each with a coverage gate: 80% overall, 90% for the logic folders, and 80% for every single file, so new code without tests fails the build) and builds. ESLint also rejects a test left as .only, .skip or .todo. npm run fix applies the automatic fixes (Prettier, then eslint --fix) — run it after writing code, review the diff, then build. ESLint is type-aware (typescript-eslint): a promise you deliberately don’t wait for is written void doSomething(). VS Code picks up the shared .vscode/ settings (format and ESLint fixes on save).

Next

Configuration

Every environment variable, per part.

HTTPS in dev

Serve the dev servers over HTTPS when you need a secure context.

Customization

Rebrand the app, admin and site.

Billing

Turn on subscriptions and in-app purchases.

Push & VoIP

Turn on push notifications.

Deployment

Ship each part to production.