Page Title

UA
Architecture & Infrastructure

Technology Stack Matrix

Comprehensive architectural overview of the frameworks, runtimes, database engines, and design system tooling powering the Doxt ecosystem.

Frontend & Application Framework

Ultra-fast, modular React 19 architecture with React Router v7 and Vite 6

v19.2.4
Core Framework
React
Core UI Engine

Latest React 19 release powering reactive UI components, concurrent rendering, and fast transitions.

Key Capabilities
  • Modern Hooks & Concurrent Features
  • Server Components & SSR Compatible
  • Strict Mode Strict ESM
v7.6.0
App Framework
React Router
Routing & Data Framework

Full-stack web framework handling client-side navigation, loaders, actions, and server-side rendering.

Key Capabilities
  • Unified Data Loading & Actions
  • Nested Layout Routing
  • Seamless SSR & Hydration
v6.4.3
Build Tooling
Vite
Build Tool & Dev Server

Lightning-fast HMR and ESM-native build tooling optimized for modern frontend development.

Key Capabilities
  • Instant Hot Module Replacement
  • Rollup Production Bundling
  • Custom Cloudflare Vite Plugins
v5.x
Language
TypeScript
Static Typing

End-to-end type safety spanning shared UI primitives, API contracts, and application routes.

Key Capabilities
  • Strict Type Checking
  • Shared Monorepo Path Aliases
  • Zero Implicit Any

Styling & Design System Core

Tailwind CSS v4 with dual-theme HSL semantic variables and zero-latency typography

v4.3.3
CSS Engine
Tailwind CSS
Utility-First Styling

Next-gen Tailwind engine configured with @source scanning across monorepo packages.

Key Capabilities
  • CSS-First Configuration
  • Instant Compilation & JIT
  • Monorepo Package Source Scanning
v2.0.0
Design Tokens
Semantic Design Tokens
Theming & Palette

Dual-theme HSL color system (Canvas, Panel, Elevated, Borders, and Charcoal CTA tokens).

Key Capabilities
  • Dual Theme (Light & Dark)
  • CSS Custom Properties (--*)
  • Contrast Ratio AA/AAA Verified
v1.0.0
Typography
Typography System
Font Hierarchy

Dual-font family system: TASA Orbiter for brand display/headings and General Sans for UI/body text.

Key Capabilities
  • TASA Orbiter (Headings)
  • General Sans (Body & UI)
  • Zero-Latency Variable Loading
v2.x / v1.x
Iconography
Phosphor & Lucide Icons
Vector Icon System

Crisp, semantically coherent SVG icon libraries mapped to functional and navigational actions.

Key Capabilities
  • Scalable Vector Graphics
  • Dynamic Stroke & Active Weights
  • Accessibility Labels

Edge Compute & Cloudflare Infrastructure

Globally distributed edge compute delivering sub-50ms TTFB and serverless execution

V8 Runtime
Edge Runtime
Cloudflare Workers & Pages
Edge Serverless Hosting

High-performance edge compute running close to end-users with instant cold starts.

Key Capabilities
  • Global Anycast Network
  • Near-Zero Cold Starts (<5ms)
  • Custom Worker Middleware
v4.112.0
DevOps
Cloudflare Wrangler CLI
Deployment & Environment

Command-line suite for automated builds, local preview environments, and production deployments.

Key Capabilities
  • Non-interactive CI Deployments
  • Custom Environment Bindings
  • Fast Local Preview
Cloudflare CDN
CDN
Edge Static Assets
Asset Distribution

Direct edge caching and distribution of immutable CSS, JS chunks, and self-hosted fonts.

Key Capabilities
  • Brotli & Gzip Compression
  • Immutable Caching Headers
  • DDoS & SSL Protection

Backend, Database & Security

PostgreSQL with strict Row-Level Security, Supabase Auth, and serverless Edge Functions

OAuth 2.0 / PKCE
Social Auth
Google OAuth 2.0 & Social Auth
Consumer & Workspace Identity

Frictionless Google authentication with PKCE authorization code exchange, account selector enforcement, and automated profile provisioning.

Key Capabilities
  • Google Cloud Identity Services
  • PKCE Authorization Code Flow
  • Auto Profile Sync (Avatar, Name, Email)
  • JWT Session & Refresh Tokens
OAuth 2.0 / OIDC
Enterprise Auth
Microsoft Entra ID (Azure AD)
Enterprise & Microsoft Identity

Enterprise single sign-on supporting Microsoft 365, Outlook, and Azure Active Directory work/school accounts.

Key Capabilities
  • Microsoft Entra ID (Azure AD)
  • Multi-Tenant & Single-Tenant Support
  • Office 365 / Outlook Account Sync
  • Corporate Domain Auto-Mapping
PKCE Flow
Authentication
Supabase Auth
Authentication & Sessions

Multi-factor authentication supporting OAuth 2.0 (Google, Microsoft/Azure), Magic Links, and Passwordless sessions.

Key Capabilities
  • Secure HTTP-Only Cookies
  • Role-Based Access Control (RBAC)
  • Multi-Tenant Isolation
PostgreSQL 15+
Database
Supabase / PostgreSQL
Relational Database

Enterprise-grade relational database with real-time subscriptions and complex relational modeling.

Key Capabilities
  • Row-Level Security (RLS)
  • Custom Stored RPC Functions
  • Automated SQL Migrations
Deno Runtime
Serverless
Supabase Edge Functions
Serverless Endpoints

Isolated serverless functions for PDF compilation, webhook handling, and cryptographic verification.

Key Capabilities
  • Secure Service Role Execution
  • eSign Finalization RPCs
  • CORS & Auth Gateway

Document Engine & eSignature

Client-side PDF extraction, serverless PDF sealing, and cryptographic audit trails

v4.x
Parser
PDF.js
Client-Side Extraction

High-precision PDF parsing engine extracting text coordinate matrices for table conversion.

Key Capabilities
  • Coordinate-Based Word Grouping
  • Column Separator Detection
  • Zero-Server Parsing
v1.17.1
Sealing Engine
PDF-Lib
PDF Sealing & Stamping

Serverless coordinate-based PDF manipulation for embedding signatures and audit certificates.

Key Capabilities
  • Coordinate Signature Placement
  • Tamper-Evident Stamping
  • Audit Trail Attachment
W3C Standard
Security
Web Crypto API
Cryptographic Verification

Browser and edge cryptographic verification generating SHA-256 document checksums.

Key Capabilities
  • SHA-256 Hash Verification
  • Tamper Detection
  • Zero-Latency Client Hashing

Monorepo & Build Orchestration

Turborepo pipeline with npm workspaces and zero-fork shared UI primitives

v2.4.4
Build System
Turborepo
Monorepo Build Orchestration

Intelligent build system with task caching, topological execution, and incremental builds.

Key Capabilities
  • Multi-App Pipeline Caching
  • Parallelized Task Execution
  • Cross-Package Dependency Graphs
v10.x
Workspaces
npm Workspaces
Package Management

Native workspace resolution linking apps/* and packages/* without external symlinkers.

Key Capabilities
  • Shared Dependency Hoisting
  • Isolated App Deployments
  • Zero Config Package Resolution
v2.0.0
Shared Package
@doxt/ui (@/design)
Shared UI Primitives

Centralized atomic design system consumed across all applications without code duplication.

Key Capabilities
  • Zero-Fork Component Architecture
  • Strict Atomic Hierarchy
  • Synchronized Design Tokens
Federated Identity

Social & Enterprise Identity Architecture (Google & Microsoft)

Enterprise-grade federated identity implementation using Google Cloud Identity Services, Microsoft Entra ID (Azure AD), PKCE protocol, and automatic PostgreSQL profile synchronization.

1. PKCE Client Request
Client

Browser initiates OAuth for Google or Microsoft (azure) with prompt: "select_account" and origin-aware redirectTo: "/auth/callback".

2. Provider Authorization
Google / Microsoft

Identity providers validate client ID and scopes (openid, email, profile) before returning a signed authorization code.

3. Edge Code Exchange
Supabase Auth

Callback route exchanges auth code for JWT session via PKCE verifier, storing access and refresh tokens in HTTP-only cookies.

4. Profile Provisioning
PostgreSQL Trigger

PostgreSQL trigger automatically populates public.profiles with avatar URL, verified email, and full name from provider metadata.

Session Management & Security

  • Zero-Storage JWTs: Session tokens are stored in secure, SameSite=Lax HTTP-only cookies preventing XSS exfiltration.
  • Enterprise SSO: Microsoft 365 and Azure Active Directory work accounts can be restricted to specific company tenants.
  • Account Disambiguation: Seamlessly unifies Google, Microsoft, and passwordless Magic Links on matching verified emails.

Required Environment Configurations

// Google Cloud Console

GOOGLE_CLIENT_ID="doxt-*.apps.googleusercontent.com"

GOOGLE_CLIENT_SECRET="GOCSPX-*"

// Microsoft Azure Entra ID

AZURE_CLIENT_ID="doxt-*-*-*"

AZURE_CLIENT_SECRET="*.azure_secret"

AUTH_REDIRECT_URI="https://<project>.supabase.co/auth/v1/callback"

Monorepo Topology

Workspace Packages & Applications

apps/docsPort 5173

Documentation portal and live sandbox for all atomic components, tokens, and design patterns.

apps/clientPort 5174

Core customer application for document conversion, eSign workflows, and user dashboards.

apps/adminPort 5175

Administrative management console with metrics, tenant controls, system logs, and support desks.

apps/signPort 5176

Dedicated, lightweight public signer view for reviewing and completing signature requests.

packages/ui
@doxt/ui

Canonical design system package aliased as @/design across all workspaces.

packages/core
@doxt/core

Shared utility functions, formatting helpers, crypto signing verification, and TypeScript interfaces.

import { … } from "@/design"
// source: packages/ui/index.ts