Skip to main content

Architecture

Pulsarr is a modern full-stack TypeScript application built for reliability and performance in self-hosted media environments.

Backend​

TechnologyPurpose
BunJavaScript/TypeScript runtime
FastifyHigh-performance HTTP server with plugin ecosystem
TypeScriptFull type safety across server and client
Knex.jsQuery builder and migrations for SQLite/PostgreSQL
Toad SchedulerBackground job processing

Core Services​

ServicePurpose
Content RouterPredicate-based routing to Sonarr/Radarr instances
Webhook ProcessorReal-time import detection and notification triggers
Queue ManagerAsync processing for notifications and batch operations
Session MonitorPlex playback tracking for auto-search

Frontend​

TechnologyPurpose
React 19Single-page application
TypeScriptShared types with server
TanStack QueryServer state management and caching
ZustandClient-side state management
Tailwind CSS v4Utility-first styling
Radix UIAccessible component primitives
ViteBuild tooling and dev server

Database​

FeatureDescription
SQLiteDefault lightweight file-based storage
PostgreSQLEnterprise support for high-scale deployments
MigrationsVersion-controlled schema with cross-database compatibility
Data MigrationBuilt-in SQLite-to-PostgreSQL transfer utility

Data Models​

ModelPurpose
UsersPlex user management, permissions, quotas
WatchlistsContent tracking with status and metadata
InstancesSonarr/Radarr configuration and sync relationships
ApprovalsRequest workflow with expiration handling
NotificationsDelivery tracking and user preferences

Integrations​

Media Stack​

IntegrationPurpose
Plex APIWatchlist monitoring (RSS, GraphQL, REST)
Sonarr/Radarr APIsContent management across instances
TMDB APIMetadata and artwork

Notifications​

ChannelPurpose
Native WebhooksDirect HTTP callbacks to external services
Discord BotInteractive commands, approvals, user DMs
Discord WebhooksChannel notifications and announcements
Plex MobileNative Plex mobile app push notifications
Apprise80+ services (Telegram, Slack, email, etc.)

API​

FeatureDescription
OpenAPI SpecAuto-generated documentation
Scalar DocsInteractive API explorer at /api/docs
Typed RoutesEnd-to-end type safety
Rate LimitingConfigurable request throttling
SSELive UI updates for progress and status

Authentication​

ModeDescription
RequiredCookie-based session authentication
Local BypassSkip auth for private network requests
DisabledNo authentication required

Data Flow​

Content Processing​

  1. Watchlist detection (RSS or polling)
  2. User permission and quota validation
  3. Content router rule evaluation
  4. Instance selection and approval workflow
  5. Sonarr/Radarr API calls
  6. Webhook-based import detection
  7. User notification delivery

Notification Flow​

  1. Webhook received from Sonarr/Radarr
  2. Content matched to requesting users
  3. Smart batching (episode grouping, spam prevention)
  4. Multi-channel parallel delivery
  5. Delivery tracking and retry logic

Deployment​

FeatureDescription
DockerOfficial multi-arch images (amd64, arm64)
Docker ComposeSample configurations included
Reverse ProxyNginx, Traefik, and other proxies
Webhook EndpointsExternal accessibility for Arr callbacks

Scaling​

ConsiderationSolution
High-scalePostgreSQL with connection pooling
ConcurrencyConfigurable limits for API calls
LoggingStructured JSON output with rotation

Performance​

FeatureDescription
CachingMetadata caching to reduce API calls
Batch OperationsGrouped API calls for multi-instance sync
Background ProcessingAsync queues for non-blocking operations
Health ChecksEndpoints for container orchestration