Getting started with Vape

Clone the source, configure PostgreSQL, sessions, and S3 storage, apply migrations, create the first operator, run onboarding, and deploy.

Requirements

  • Node.js matching package.json engines (>=20.9.0); the README recommends Node.js 22 for Next.js 16.
  • npm (the repository ships a package-lock.json).
  • A PostgreSQL database you are allowed to migrate.
  • S3-compatible object storage for product and claim images in production.

Install

git clone https://github.com/openshiporg/openfront-vape.git
cd openfront-vape
npm ci
cp .env.example .env

Environment

features/keystone/index.ts refuses to start without DATABASE_URL and SESSION_SECRET, and rejects a session secret shorter than 32 characters. The S3 values fall back to development placeholders outside production and are required when NODE_ENV=production.

DATABASE_URL=postgresql://user:password@127.0.0.1:5432/openfront_vape
SESSION_SECRET=replace-with-at-least-32-random-characters   # openssl rand -hex 32

S3_BUCKET_NAME=your-bucket
S3_REGION=your-region
S3_ACCESS_KEY_ID=your-access-key-id
S3_SECRET_ACCESS_KEY=your-secret-access-key
S3_ENDPOINT=https://your-s3-compatible-endpoint

Optional settings read by the code:

VariableUsed for
SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_FROM, SMTP_STORE_LINKTransactional email and links in emails
NEXT_PUBLIC_STRIPE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRETStripe payment adapter
NEXT_PUBLIC_PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_WEBHOOK_ID, NEXT_PUBLIC_PAYPAL_SANDBOXPayPal payment adapter
AUTHORIZENET_API_LOGIN_ID, AUTHORIZENET_TRANSACTION_KEY, AUTHORIZENET_SIGNATURE_KEY, AUTHORIZENET_ENV, NEXT_PUBLIC_AUTHORIZENET_CLIENT_KEYAuthorize.net payment adapter (AUTHORIZENET_ENV=production for live)
OPENROUTER_API_KEY, OPENROUTER_MODEL, OPENROUTER_MAX_TOKENSDashboard AI chat (/api/completion)
NEXT_PUBLIC_DEFAULT_REGIONDefault storefront country code
HIDE_OPENFRONT_BRANDINGHide Openfront branding in the storefront
TRUSTED_PROXY_IPSComma-separated proxies whose x-forwarded-for is trusted for client IP
CUSTOMER_TOKEN_MAX_AGE_DAYSCustomer token lifetime (default 90)
CREDENTIAL_PEPPERPepper for hashed credentials (falls back to SESSION_SECRET)

Keep .env out of source control.

Migrations and local run

npm run dev

npm run dev runs keystone build --no-ui, applies checked-in migrations with prisma migrate deploy, and starts Next.js. To change the schema, run npm run migrate:gen against a disposable database; it rebuilds the schema, regenerates the dashboard view order, and runs keystone prisma migrate dev. Commit model changes and their migrations together.

npm run dev applies migrations to whatever DATABASE_URL points at.

Once running:

  • Storefront: /[countryCode] (for example /us)
  • Operator dashboard: /dashboard
  • GraphQL API: /api/graphql

First operator and onboarding

  1. Visit /dashboard/init on an empty database to create the first administrator, then sign in.
  2. Open the onboarding dialog from the dashboard. Setup seeds a store, a us region (tax rate 0), currency, country, three shipping options, four categories, three collections, ten draft products, Manual and Authorize.net payment providers, a manual fulfillment provider, and, if your role has canManageCompliance, a draft RegulatedMerchantProfile with the kill switch on.
  3. Fill in store business details and the five required policies (shipping, returns, age verification, privacy, terms) at /dashboard/platform/store.
  4. Work through the blockers listed on /dashboard/platform/overview and /dashboard/platform/compliance: activate a merchant profile, add launch jurisdictions and an active signed rule set, classify and authorize variants, and record provider approvals.

Onboarding leaves the kill switch on, so sales stay closed until you finish the checklist in Go live. Storefront checkout refuses the Manual payment provider.

Next steps

On this page