Skip to content

Latest commit

 

History

History
91 lines (67 loc) · 3.01 KB

File metadata and controls

91 lines (67 loc) · 3.01 KB

Getting started

This guide takes you from a fresh clone to a running local Parelay stack.

Prerequisites

  • Node.js ≥ 20 (the repo is developed on Node 22).
  • pnpm 10npm install -g pnpm@10 (the repo pins a version via packageManager; Corepack will honor it automatically).
  • PostgreSQL ≥ 14, reachable locally. The server enables the citext and pgcrypto extensions on migrate, so the database role needs permission to CREATE EXTENSION.
  • ffmpeg (optional) — only needed for call-recording transcription; the app runs fine without it.

1. Install

git clone <your-fork-or-mirror>.git parelay
cd parelay
pnpm install

2. Configure environment

All packages read a single root .env.local. Copy the template and fill it in:

cp .env.example .env.local

At minimum set:

  • DATABASE_URL — e.g. postgres://user@localhost:5432/parelay
  • JWT_SECRET — any long random string
  • CREDENTIALS_ENC_KEY — 32-byte base64 key for encrypting stored provider keys at rest: openssl rand -base64 32
  • BOOTSTRAP_SUPERADMIN_EMAIL / _PASSWORD / _NAME — seeds your first admin on server startup (you rotate the password from the UI afterward).

AI provider and transcription keys are optional here — they can also be set per-site or system-wide from the admin UI. See Configuration for the full variable reference.

3. Create the database schema

createdb parelay                      # or your preferred name (match DATABASE_URL)
pnpm --filter @indianic/server db:migrate

Optionally seed demo data (a sample site + agents):

pnpm --filter @indianic/server seed:demo

4. Run the dev stack

pnpm dev

This builds the widget bundle and starts four processes concurrently:

Process URL What it is
Server http://localhost:4000 API + Socket.IO + WebRTC signaling
Agent app http://localhost:5175 Agent dashboard + admin
Demo harness http://localhost:5173 A sample site with the widget embedded
Widget dev http://localhost:5174 Widget bundle dev server

Open the demo harness to see the widget, and the agent app to answer chats. Log in with your bootstrap super-admin (or a demo agent if you seeded).

5. Handy scripts

pnpm build          # build every package
pnpm typecheck      # type-check the whole workspace
pnpm lint           # eslint
pnpm --filter @indianic/server create:superadmin   # add another super-admin
pnpm --filter @indianic/server db:studio           # Drizzle Studio (DB browser)

Migrations

Migrations are hand-written SQL under packages/server/drizzle/ with a matching entry in drizzle/meta/_journal.json. Apply them with db:migrate. Do not rely on db:generate to author them — see the notes in Architecture.