Quickstart
Get Soku running locally in about 15 minutes. This guide covers installing dependencies, configuring environment variables, and starting the development server.
Prerequisites
| Tool | Version | Notes |
|---|---|---|
| Node.js | 22 | Enforced in root package.json via engines |
| pnpm | 9.12.2+ | Specified in packageManager field |
| Firebase CLI | Latest | For Functions emulators and deployment |
| gcloud CLI | Latest | For Cloud Tasks queue creation |
1. Clone and install
git clone https://github.com/chasegarsee/sokuho.git
cd sokuho
pnpm install
This installs dependencies for all workspace packages: apps/web, apps/functions, apps/docs, apps/cypress, packages/schema, and packages/shared.
2. Configure environment variables
Web app (apps/web/.env.local)
Create this file with your Firebase and Stripe credentials:
# Firebase (client-side — NEXT_PUBLIC_ prefix exposes to browser)
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
# Firebase Admin (server-side only)
FIREBASE_SERVICE_ACCOUNT_BASE64=...
# Stripe
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_STARTER_PRICE_ID=price_...
STRIPE_PRO_PRICE_ID=price_...
FIREBASE_SERVICE_ACCOUNT_BASE64is the base64-encoded service account JSON downloaded from Firebase Console. Generate it with:base64 -i service-account.json
Functions backend
Cloud Functions read credentials from their runtime environment. For local emulator development, set these in apps/functions/.env or via firebase functions:config:set. See Environment & Tooling for the full list of social platform credentials.
3. Set up Firebase
- Create a Firebase project (or use an existing one)
- Enable Authentication (Google provider + Email link)
- Create a Firestore database in Native mode
- Create a Cloud Storage bucket
- Install and authenticate the Firebase CLI:
npm install -g firebase-tools
firebase login
firebase use --add # Select your project
See Firebase Setup for detailed instructions including security rules and CORS configuration.
4. Create Cloud Tasks queues
Cloud Tasks queues are required for the publish orchestration system. Create them once per project:
REGION=us-central1
# Orchestrator queue (dispatches per-platform publish tasks)
gcloud tasks queues create orchestrate-posts --location="$REGION"
# Platform publish queues (create only the ones you need)
gcloud tasks queues create publish-facebook --location="$REGION"
gcloud tasks queues create publish-instagram --location="$REGION"
gcloud tasks queues create publish-threads --location="$REGION"
gcloud tasks queues create publish-x --location="$REGION"
gcloud tasks queues create publish-tiktok --location="$REGION"
gcloud tasks queues create publish-youtube --location="$REGION"
gcloud tasks queues create publish-linkedin --location="$REGION"
Add more platform queues as you onboard providers. See Cloud Tasks Topology for tuning options.
5. Start development
pnpm dev
This uses Turborepo to run the web app and functions emulator in parallel:
| Service | URL |
|---|---|
| Web app | http://localhost:3000 |
| Functions emulator | http://localhost:5001 |
| Firestore emulator | http://localhost:8080 |
| Storage emulator | http://localhost:9199 |
You can also start services independently:
pnpm dev:web # Next.js only (port 3000)
pnpm dev:functions # Firebase emulators only
6. Verify the setup
- Open http://localhost:3000
- Sign up using the pricing page (use Stripe test card
4242 4242 4242 4242) - After checkout, you should land on the dashboard with an active trial
- Navigate to Settings to connect a social integration
- Try creating a post from the Create page
Common scripts
| Script | Description |
|---|---|
pnpm dev | Run web + functions in parallel |
pnpm dev:web | Run web app only |
pnpm dev:functions | Run Functions emulator only |
pnpm build | Build all apps |
pnpm test | Run all tests with coverage |
pnpm lint | Run ESLint across monorepo |
pnpm typecheck | TypeScript type checking |
pnpm check | Run lint + typecheck + test |
pnpm deploy:functions | Deploy functions to Firebase |
pnpm sync:schema | Build and sync @soku/schema to functions |
Next steps
- Environment & Tooling — Full environment variable reference
- Firebase Setup — Security rules, storage, and Cloud Tasks details
- Stripe Setup — Products, prices, webhooks, and credits
- Local Development — Tips for day-to-day development
- Architecture Overview — Understand the monorepo structure