Skip to content

Monorepo Guide

This guide covers how to work with the EmProps monorepo - a pnpm workspace with turborepo for builds.

Structure

emerge-turbo/
├── apps/
│   ├── api/              # Job Queue API
│   ├── emprops-api/      # EmProps REST API
│   ├── emprops-studio/   # User-facing creative studio
│   ├── machine/          # GPU worker container
│   ├── miniapp/          # Farcaster miniapp
│   ├── monitor/          # Real-time monitoring UI
│   ├── utils/            # Utility services
│   └── worker/           # Redis-direct worker
├── packages/
│   ├── core/             # Shared types and Redis functions
│   ├── database/         # Prisma schema and client
│   └── ...
├── scripts/              # Build and deployment scripts
└── config/               # Environment configurations

Quick Start

bash
# Initial setup
pnpm install
pnpm dev:redis            # Start local Redis

# Build everything
pnpm build                # Build all packages (excludes Next.js apps)
pnpm build:all            # Build everything including Next.js apps

# Development
pnpm dev                  # Run all dev servers

Key Concepts

Turbo for Builds

We use Turborepo for fast, cached builds. Turbo understands package dependencies and only rebuilds what changed.

Environment Management

Environments are managed via config/environments/ profiles. See Environment Management for details.

Docker Images

Three main Docker images are built from this repo:

  • emprops/api - Job Queue API
  • emprops/emprops-api - EmProps REST API
  • emprops/utils - Utility services

Guides

Released under the MIT License.