English
Architecture
Tech Stack

Tech Stack

A comprehensive overview of the technologies used in ReliaPulse.

Frontend

Next.js 16

The application uses Next.js 16 with the App Router:

  • Server Components - Default rendering mode for better performance
  • Client Components - Used where interactivity is required (marked with "use client")
  • Route Handlers - API endpoints at /api/v1/*
  • Middleware - Rate limiting, request ID tracking
  • Streaming - Progressive rendering with Suspense boundaries

React 19

  • Server Components for data fetching
  • Client Components for interactivity
  • Hooks for state management (useState, useEffect, useCallback, useMemo)
  • Context for global state (Auth, Theme, Socket)

TypeScript

Strict TypeScript configuration with:

  • Full type safety across the codebase
  • Zod for runtime validation
  • Prisma for type-safe database queries

TailwindCSS 4

  • Utility-first CSS framework
  • Custom color variables for theming
  • Dark mode support via class strategy
  • Responsive design patterns

Radix UI

Accessible, unstyled component primitives:

  • Dialog, Dropdown, Tabs, Select
  • Accordion, Collapsible, Tooltip
  • Command palette (cmdk)

Additional Frontend Libraries

LibraryPurpose
@dnd-kitDrag-and-drop for status page builder
rechartsChart visualizations
date-fnsDate formatting and manipulation
lucide-reactIcon library
next-themesDark mode management
sonnerToast notifications

Backend

Prisma 7

ORM for PostgreSQL with:

  • Type-safe database client
  • Migrations for schema changes
  • Connection pooling
  • JSON field support
// Example query
const components = await prisma.component.findMany({
  where: { organizationId },
  include: { subComponents: true }
});

PostgreSQL

Primary database storing:

  • All application data
  • User sessions (optional)
  • Audit logs

Features used:

  • JSONB columns for flexible config
  • Full-text search (planned)
  • Triggers for cascading deletes

Redis

In-memory data store for:

  • BullMQ job queues
  • Rate limiting counters
  • Session cache (optional)

BullMQ

Job queue library for background processing:

  • Retry logic with exponential backoff
  • Job prioritization
  • Delayed jobs (scheduled tasks)
  • Job events and progress tracking

Authentication

NextAuth.js v5

Authentication framework supporting:

  • Credentials - Email/password with bcrypt
  • OAuth - Google, GitHub (optional)
  • SSO/SAML - Enterprise SSO via SAML Jackson
  • 2FA - TOTP with backup codes

Security Libraries

LibraryPurpose
bcryptjsPassword hashing
otplibTOTP 2FA generation
@boxyhq/saml-jacksonSAML SSO
cryptoAPI key hashing, encryption

Monitoring & Integrations

Integration Adapters

Pattern-based adapter system for external services:

// Base adapter interface
interface BaseIntegrationAdapter {
  validateConfig(config: unknown): Promise<boolean>;
  testConnection(): Promise<boolean>;
  fetchMetrics(query: string): Promise<MetricResult>;
}

Supported integrations:

  • Prometheus (PromQL)
  • Datadog (DQL)
  • New Relic (NRQL)
  • Grafana (various datasources)
  • Pingdom (check status)

Health Check System

Custom HTTP checker with:

  • Multiple condition types
  • JSON path evaluation (jsonpath-plus)
  • Header and body validation
  • Response time thresholds

Logging & Observability

Pino

Structured JSON logging:

{
  "level": "info",
  "time": "2026-01-24T12:00:00.000Z",
  "service": "status-page",
  "msg": "Health check completed"
}

Features:

  • Request context (IP, user agent, request ID)
  • Worker-specific loggers
  • Configurable log levels

Notifications

Delivery Channels

ChannelLibrary/Method
EmailResend API
SMSTwilio API
SlackWebhook API
DiscordWebhook API
TeamsAdaptive Cards
WebhookCustom HTTP
PushWeb Push API

Development Tools

Build & Development

  • Turbopack - Fast development server
  • Docker Compose - Local development environment
  • Prisma Studio - Database GUI

Testing

ToolPurpose
JestUnit and API tests
PlaywrightE2E tests
Mock librariesPrisma, Auth mocking

Code Quality

  • ESLint for linting
  • Prettier for formatting (optional)
  • TypeScript for type checking

Deployment

Containerization

  • Docker - Multi-stage builds
  • Docker Compose - Development and small-scale production

Orchestration

  • Kubernetes - Production scaling
  • Helm - Package management (optional)

Platforms

Verified deployment targets:

  • Vercel (Next.js app)
  • Railway/Render
  • AWS ECS/EKS
  • Google Cloud Run/GKE
  • Self-hosted Docker

Version Requirements

TechnologyMinimum Version
Node.js20.x
PostgreSQL14.x
Redis6.x
npm/pnpm8.x