Collosy
Enterprise social media scheduling & analytics engine with Temporal workflows
Production-grade social media management monorepo. Uses Temporal.io durable orchestrators for resilient multi-platform post execution, a NestJS REST backend with strict DTO/Service/Repository layering, a Next.js dashboard, and a Chrome extension for web scheduling.
The Challenge
Traditional cron-based social media schedulers fail catastrophically when API rate limits hit, third-party social endpoints crash, or server instances restart during scheduled publication windows. Lost posts, duplicate publications, and desynchronized analytics erode user trust immediately.
Architecture & Solution
Architected the scheduling and publishing engine on top of Temporal.io. Every post schedule is a durable, stateful workflow. When an external API (like X/Twitter, LinkedIn, or Meta) rate-limits or fails, Temporal automatically pauses, executes exponential jitter retries, and guarantees exact-once execution across server restarts.
┌────────────────────────────────────────────────────────┐
│ Collosy Monorepo │
├───────────────────────┬────────────────────────────────┤
│ apps/frontend │ Next.js / Vite React Dashboard │
│ apps/backend │ NestJS Core REST API │
│ apps/orchestrator │ Temporal.io Durable Workers │
│ apps/extension │ Web Scheduling Browser Tool │
│ libraries/server │ Shared Prisma, DTOs & Services │
└───────────────────────┴────────────────────────────────┘
│ │
┌───────▼────────┐ ┌────────▼────────┐
│ PostgreSQL DB │ │ Social APIs │
│ (Via Prisma) │ │ (Meta/X/LI/YT) │
└────────────────┘ └─────────────────┘Engineering Decisions
- Temporal.io Durable Workflows over BullMQChose Temporal's event-sourced workflow engine over Redis-based queues because it preserves exact code execution state across weeks or months of scheduled downtime without manual database polling.
- Strict Layering PatternMandated DTO -> Controller -> Service -> Repository separation. Generic social engine files never contain provider-specific logic; all platform quirks are encapsulated behind clean provider interfaces.
- Immutable Workflow DefinitionsImplemented strict workflow versioning rules so evolving the scheduling logic never breaks in-flight production executions.
Outcomes
- Eliminated post drops and duplicate publications through durable execution
- Seamless multi-tenant publishing across all major social networks from one dashboard
- Unified shared DTOs and Prisma schemas across backend, worker, and CLI apps