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:Step 3: Prepare Environment Configuration
Create your local.env configuration file from the template:
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:- Terminal: Run
openssl rand -hex 32in your command line. - Online Generator: Visit generate-secret.vercel.app/32 to generate a random 32-character hex secret instantly.
.env:
4. Configure Google OAuth Login (Optional)
If you want team members to sign in with Google in addition to email and password:- Open Google Cloud Console.
- Create a project and navigate to APIs & Services -> Credentials.
- Click Create Credentials -> OAuth client ID (Application type: Web application).
- Set Authorized JavaScript origins:
http://localhost:3000. - Set Authorized redirect URIs:
http://localhost:3000/api/auth/callback/google. - 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):- Web Dashboard (port
3000):pnpm dev:web - API Server (port
4000):pnpm dev:api - Background Workers:
pnpm dev:workers
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 andDIRECT_URLpoints directly to port5432without connection pooler parameters. - Background workers not sending DMs: Verify
REDIS_URLis reachable andpnpm dev:workersis running alongsidepnpm dev:api. - Instagram OAuth redirect mismatch: Make sure
INSTAGRAM_REDIRECT_URIin.envmatches the exact Redirect URI saved in your Meta Developer App settings.
