Architecture & Data Flow

System Architecture

Comprehensive overview of the EshtriAppN tech stack and system boundaries.

System Architecture (A-B)

The EshtriAppN platform is architected as a highly modular Turborepo monorepo, decoupling business logic across isolated applications to ensure maximum horizontal scalability and secure deployment boundaries.

Core Tech Stack

  1. Frontend (B2C & Admin): Next.js 14 App Router statically compiled, powered by React 18, utilizing Tailwind CSS for design primitives.
  2. Mobile Native: Expo / React Native tightly integrated with core database schemas.
  3. Backend & Auth: Supabase (PostgreSQL 15), exposing zero-trust API layers secured tightly via Row Level Security (RLS).
  4. Infrastructure: Self-hosted Hetzner Docker clusters reverse-proxied and load-balanced via Traefik.

System Boundaries

The platform logically separates execution limits:

  • The Presentation Layer (UI/UX) handles static generation and layout optimization securely from caching edge nodes.
  • The Server Proxy Layer executes API calls within Next.js API endpoints (apps/web/api), keeping database credentials hidden entirely from the browser.
  • The Data Persistence Layer (Database) explicitly executes RLS validation to instantly mathematically prove JWT token scopes on every row fetch.

High-Level Request Flow

graph TD
  A[User/Client]
  B[Traefik Edge Router]
  C[Next.js SSR Nodes]
  D[Supabase GoTrue (Auth)]
  E[PostgreSQL Data Layer]
 
  A -->|HTTPS Requests| B
  B -->|Reverse Proxy| C
  C -->|JWT Handshake| D
  C -->|Data Fetch| E
  D -->|Validation| E

Resilience and Edge Caching

To maintain enterprise-level uptimes, the infrastructure heavily utilizes aggressive CDN caching over unchanging product catalogues while completely bypassing the cache for active authentication queries via force-dynamic React nodes.

On this page