Skip to main content

Prerequisites

Before starting, verify that your machine has the following tools installed:

Step 1: Clone the Repository

Open your terminal (PowerShell on Windows, or Terminal on macOS/Linux) and clone the repository:

Step 2: Install Monorepo Dependencies

Instance uses pnpm workspaces to coordinate dependencies across apps and shared packages. Run:
This installs all packages for the Web dashboard, API server, background workers, AI and email connectors, and shared database packages.

Step 3: Prepare Environment Configuration

Create your local .env configuration file from the template:
(On Windows PowerShell, run Copy-Item .env.example .env)

Step 4: Rapid Bootstrapping Setup (2 Minutes to Run)

To get the application running locally and sign into the dashboard immediately, configure these core connections in your .env file:

1. PostgreSQL Database

  • Cloud Option (Recommended and Fastest): Sign up at neon.tech, create a new project named instance, and copy the pooled and direct connection strings into your .env:
  • Local Option: If you have PostgreSQL running locally:

2. Redis Cache and Queue

  • Cloud Option (Fastest): Create a free Redis instance on upstash.com and copy your connection URL:
  • Local Option: If you have local Redis running (redis-server):

3. Application URLs and NextAuth Secret

Set your local URLs so the web dashboard and API server can communicate:
Instance uses NextAuth to secure user sessions and encrypt JWT tokens. You need a random 32-character secret, which you can generate in either of two ways:
  • Terminal: Run openssl rand -hex 32 in your command line.
  • Online Generator: Visit generate-secret.vercel.app/32 to generate a random 32-character hex secret instantly.
Paste the generated string into your .env:

4. Configure Google OAuth Login (Optional)

If you want team members to sign in with Google in addition to email and password:
  1. Open Google Cloud Console.
  2. Create a project and navigate to APIs & Services -> Credentials.
  3. Click Create Credentials -> OAuth client ID (Application type: Web application).
  4. Set Authorized JavaScript origins: http://localhost:3000.
  5. Set Authorized redirect URIs: http://localhost:3000/api/auth/callback/google.
  6. Copy the credentials into your .env:

Step 5: Initialize the Database Schema

Generate the Prisma Client types and synchronize all tables with your PostgreSQL database:

Step 6: Start the Development Stack

Launch all services concurrently (Web Dashboard, API Server, and Background Workers):
Or run each service in its own terminal window:
  • Web Dashboard (port 3000): pnpm dev:web
  • API Server (port 4000): pnpm dev:api
  • Background Workers: pnpm dev:workers
Open http://localhost:3000 in your browser to create your workspace and enter the setup wizard.

Step 7: Core Feature Integrations

Add these variables to .env when you are ready to connect Instagram, upload media, or send transactional emails:
  • Instagram and Meta Graph API: Required to connect Instagram accounts and receive webhooks. See Instagram Setup for step-by-step instructions.
  • Cloudflare R2 Storage: Required for uploading images, voice notes, PDFs, Bio Link avatars, and scheduled posts.
  • Default Groq AI Key (Optional): Useful as a fallback if you have not configured AI providers inside Dashboard -> Settings -> AI Connectors.
  • Transactional Email (SMTP): Used for sending team member invitations and password reset emails.
  • Cron Protection: Secures internal scheduled maintenance routes.
  • Meta Instagram Rate Limits and Pacing Controls (Pre-tuned in .env.example): Built-in token-bucket limits and thread pacing matching official Meta Graph API rules. Leave the defaults as-is unless your Meta app tier increases (see Safety & Anti-Ban):

Common Troubleshooting

  • Prisma connection error on db:push: Make sure PostgreSQL is running and DIRECT_URL points directly to port 5432 without connection pooler parameters.
  • Background workers not sending DMs: Verify REDIS_URL is reachable and pnpm dev:workers is running alongside pnpm dev:api.
  • Instagram OAuth redirect mismatch: Make sure INSTAGRAM_REDIRECT_URI in .env matches the exact Redirect URI saved in your Meta Developer App settings.