Overview
Postiz is a comprehensive social media scheduling platform built as a modern monorepo application. It enables users to schedule posts across 28+ social media channels, manage their content calendar, track analytics, and collaborate with teams.Core Capabilities
- Post Scheduling: Schedule posts to multiple social media platforms
- Calendar Management: Visual calendar view for managing scheduled content
- Analytics Dashboard: Track performance across all connected channels
- Team Management: Collaborate with team members and manage permissions
- Media Library: Centralized media storage and management
- OAuth Integrations: Connect to 28+ social media platforms
- Background Jobs: Temporal-based workflow orchestration
High-Level Architecture
Postiz follows a distributed architecture pattern with clear separation of concerns between the API layer, orchestration layer, and presentation layer.
Application Layers
Key Components
Frontend Layer
Built with Vite and React using Next.js App Router for routing. Uses SWR for data fetching and Tailwind CSS for styling. All UI components are custom-built without external component libraries.
Backend API Layer
NestJS-based REST API following a strict Controller → Service → Repository pattern. Handles all business logic, authentication, and integration management.
Orchestrator Layer
Temporal-based workflow engine for background job processing. Manages post scheduling, token refresh, email sending, and other asynchronous tasks.
Design Principles
Separation of Concerns
The architecture strictly separates:- Presentation logic (Frontend)
- Business logic (Backend Services)
- Data access (Repositories)
- Background processing (Orchestrator)
Shared Libraries
Common functionality is extracted into shared libraries:libraries/nestjs-libraries- Backend services, integrations, database accesslibraries/react-shared-libraries- Frontend components and utilitieslibraries/helpers- Cross-platform utilities and helpers
Shared libraries enable code reuse across backend, orchestrator, and frontend applications while maintaining clear boundaries.
Integration Architecture
Social media integrations follow an abstract provider pattern:- OAuth authentication flow
- Post publishing logic
- Analytics retrieval
- Token refresh mechanisms
Data Flow
Post Scheduling Flow
Authentication Flow
- User Registration/Login: JWT-based authentication with cookie storage
- OAuth Integration: OAuth 2.0 flow for connecting social media accounts
- Token Management: Automatic token refresh via Temporal workflows
- Permission Management: CASL-based authorization with role-based access control
Scalability Considerations
Horizontal Scaling
- Frontend: Static asset serving via CDN
- Backend: Stateless API servers behind load balancer
- Orchestrator: Multiple Temporal workers for parallel job processing
- Database: Read replicas and connection pooling
Performance Optimizations
- Redis caching for frequently accessed data
- SWR for optimistic UI updates and client-side caching
- Rate limiting via Redis-backed throttler
- Concurrent job processing with configurable limits per provider
Technology Stack Summary
| Layer | Technologies |
|---|---|
| Frontend | Vite, React 18, Next.js 14, SWR, Tailwind CSS 3 |
| Backend | NestJS 10, Node.js 22, Express |
| Orchestrator | Temporal, NestJS 10 |
| Database | PostgreSQL, Prisma 6.5, Redis |
| Storage | AWS S3, Transloadit |
| Auth | JWT, OAuth 2.0, CASL |
| Monitoring | Sentry |
Next Steps
Monorepo Structure
Learn about the monorepo organization and workspace structure
Tech Stack
Deep dive into the technologies used in Postiz