Перейти к содержанию

Admin Panel — Deployment

Prerequisites

  • Node.js 20+
  • npm
  • PostgreSQL (Serverpod database — read access)
  • Garage / S3-compatible storage (KYC document presigned URLs)
  • Access to Serverpod internal URL (for approve/reject/block operations)

Install Dependencies

npm install

Development

npm run dev

Starts the Vite dev server. Hot module replacement is enabled.

TypeScript check (separate terminal):

npm run check

Production Build

npm run build

Output goes to .svelte-kit/output/. The project uses @sveltejs/adapter-node, so the build produces a self-contained Node.js server.

Preview the production build locally:

npm run preview

Environment Variables

Copy .env.example to .env and fill in the values:

cp .env.example .env
Variable Description Example
DATABASE_URL PostgreSQL connection string (Serverpod DB, read-only for panel) postgresql://user:pass@localhost:5432/onewallet
SERVERPOD_INTERNAL_URL Serverpod internal HTTP URL (for write operations) http://localhost:8080
S3_ENDPOINT Garage/S3 endpoint for KYC document access https://s3.example.com
S3_REGION S3 region identifier garage
S3_ACCESS_KEY S3 access key
S3_SECRET_KEY S3 secret key
S3_BUCKET Bucket name for KYC documents kyc-data

Note: The .env.example also contains BLNK_API_URL and BLNK_API_KEY — these are legacy references from an earlier ledger integration. They are not used in the current TigerBeetle-based architecture.

Running in Production

After building:

node build/index.js

Or with a process manager:

PORT=3000 node build/index.js

The adapter-node server respects PORT, HOST, and ORIGIN environment variables.

Docker

A Dockerfile is not present in the current project root. If containerising:

  1. Build: npm run build
  2. Copy build/, package.json, package-lock.json to image
  3. Run npm ci --omit=dev in image
  4. Entrypoint: node build/index.js

Blog module

The blog CMS module requires the following additional environment variables:

Variable Description
BLOG_DB_SCHEMA Postgres schema for blog tables (default: blog)
BLOG_S3_BUCKET S3 bucket for blog media
BLOG_S3_REGION S3 region (default us-east-1)
BLOG_S3_ENDPOINT S3 endpoint (Garage), optional for AWS
BLOG_S3_ACCESS_KEY S3 access key id
BLOG_S3_SECRET_KEY S3 secret access key
BLOG_S3_PUBLIC_BASE Public base URL serving the bucket (e.g. https://blog-media.web.1-wallet.app)