A production-minded, multi-tenant content operations platform that turns a brand brief into reviewed, scheduled, and published social content. The first release defaults to mock publishing and strict AI budgets so it is safe and inexpensive to run.
- Monorepo with Next.js web, NestJS API, Prisma/PostgreSQL, Redis/BullMQ-ready infrastructure, and shared packages.
- Brand profile → structured AI variants → edit/review → schedule → idempotent mock publish → analytics placeholder.
- Eight connector adapters: Facebook, Instagram, LinkedIn, TikTok, YouTube, X, Threads, Pinterest.
- Tenant-scoped data model, Supabase-compatible JWT verification, RBAC schema, encrypted OAuth token vault, rate limiting, audit model, health checks, retries/idempotency primitives.
- AI request hashing, caching contract, structured outputs, usage metering, workspace budget cap, output cap, and inexpensive model routing.
- Copy missing values from
.env.exampleinto the private.env. Never commit.env. - Start infrastructure:
docker compose up -d postgres redis - Install:
pnpm install - Generate Prisma:
pnpm db:generate - Apply the development schema:
pnpm db:push - Run:
pnpm dev - Open
http://localhost:3000; API health is athttp://localhost:3001/v1/health.
Optional n8n: docker compose --profile automation up -d n8n.
Run pnpm check. End-to-end: pnpm --filter @sma/web exec playwright install chromium, then pnpm --filter @sma/web test:e2e.
- Social publishing is
mockunlessSOCIAL_CONNECTOR_MODE=live. - Production requires valid Supabase JWTs and an
x-workspace-id. - OAuth tokens use AES-256-GCM; use a secret manager for
TOKEN_ENCRYPTION_KEY. - Duplicate AI prompts resolve through the request hash cache contract.
- The default workspace AI cap is USD 10/month and each response is capped.
See docs/ for architecture, integrations, security, deployment, costs, and operations. Project links and decisions are maintained in WIKI.md.