Skip to content

Setup Guide ​

Local development setup for Brand Portal Frontend — the Nuxt 4 public-facing portal.

Repository: github.com/Collage-Inc/brand-portal


Prerequisites ​

ToolRequired version
Node.jsLTS (18+ recommended)
pnpmLatest stable

Install pnpm via:

bash
npm install -g pnpm

Clone Repository ​

bash
git clone https://github.com/Collage-Inc/brand-portal.git
cd brand-portal

Install Dependencies ​

bash
pnpm install

postinstall runs nuxt prepare and scripts/setup-pdfjs.cjs automatically.


Environment Variables ​

No .env.example is committed. Create .env manually with the variables below.

Minimum required variables to run locally:

VariableDescription
APP_NAMEApp display name (e.g. Collage)
APP_ENVEnvironment (development, staging, production)
BASE_URLFrontend base URL (e.g. http://localhost:3000)
API_BASE_URLBackend API base URL (e.g. http://localhost:8000/api)
BACKEND_URLBackend root URL
ADMIN_FRONTEND_URLAdmin (collage-admin) URL
AUTH_SECRETRandom secret for HTTP-only session cookie signing
PUSHER_KEYPusher app key (real-time)
PUSHER_CLUSTERPusher cluster (e.g. mt1)
PUSHER_AUTH_ENDPOINTPusher auth endpoint
TYPESENSE_HOSTTypesense server host
TYPESENSE_PORTTypesense port (default 8108)
TYPESENSE_PROTOCOLhttp or https
TYPESENSE_API_KEYTypesense search-only API key
AWS_ACCESS_KEY_IDAWS key for S3
AWS_SECRET_ACCESS_KEYAWS secret for S3
AWS_BUCKETS3 bucket name
AWS_DEFAULT_REGIONAWS region (e.g. us-east-1)
AMPLITUDE_API_KEYAmplitude project key (leave empty to disable)

Optional:

VariableDefaultDescription
SECURE_AUTH_COOKIEfalseSet true in production (HTTPS only)
NUXT_PUBLIC_QUERY_STALE_TIME300000TanStack Query stale time in ms
SEARCH_KEY—Shared key for encrypting search state in URL
GOOGLE_AUTH_URL—Google OAuth redirect URL
TYPESENSE_CONNECTION_TIMEOUT—Typesense client timeout (ms)
ZIP_DOWNLOAD_URL—Zip download service URL

Start Dev Server ​

bash
pnpm dev

Opens at http://localhost:3000 by default.


Other Commands ​

CommandDescription
pnpm buildProduction build
pnpm previewPreview the production build locally
pnpm typecheckType-check all .ts and .vue files
pnpm lintRun ESLint
pnpm lint:fixAuto-fix ESLint issues
pnpm testRun Vitest unit tests
pnpm test:coverageRun tests with coverage report

Troubleshooting ​

Auth cookie not being set

Ensure AUTH_SECRET is set and SECURE_AUTH_COOKIE=false for local HTTP. The auth plugin load order is strict: Pinia → API client → Vue Query → Auth init — a missing secret breaks the chain silently.

Types missing after install

bash
pnpm run postinstall

Regenerates .nuxt/ types and sets up PDF.js worker.

Real-time events not firing

Check PUSHER_KEY, PUSHER_CLUSTER, and PUSHER_AUTH_ENDPOINT. The auth endpoint must be reachable from the browser.