Skip to main content

PSAPLink Cloud — Setup

PSAPLink Cloud is the hub. Handles notification routing, company dashboards, and the superadmin console.

Prerequisites

  • PHP 8.2+ / Composer 2.x
  • PostgreSQL 15+
  • Node.js 20+ (React frontend)
  • Docker & Docker Compose (recommended)

Quick Start

cd cloud
cp .env.example .env.local
./dev-up.sh --fresh

--fresh drops the DB, re-migrates, and loads seed fixtures. Omit on subsequent starts.

Key Environment Variables

VariableDescription
DATABASE_URLPostgreSQL connection string
JWT_SECRET_KEY / JWT_PUBLIC_KEYPaths to RSA key pair
JWT_PASSPHRASEPrivate key passphrase
MERCURE_JWT_SECRETShared Mercure SSE secret
LIBSODIUM_ENCRYPTION_KEY32-byte hex key (field-level encryption)
LIBSODIUM_ENCRYPTION_KEY_VERSIONv1 default

Generate JWT Keys

php bin/console lexik:jwt:generate-keypair

Generate Encryption Key

openssl rand -hex 32

Store the output in .env.local as LIBSODIUM_ENCRYPTION_KEY.

Start the Messenger Worker

Notifications are dispatched asynchronously — the worker must be running:

php bin/console messenger:consume async --time-limit=3600

In production this runs as a Docker service with auto-restart.

Dev Seed Credentials

RoleEmailPassword
superadminsuperadmin@psaplink.localpassword
psap_adminpsap@example.localpassword
company_admincompany@example.localpassword
warning

Dev credentials only — never use in production.