Full Stack Topology

Backend Architecture Map

ECODrIx is a multi-tenant API-first automation engine. Two database tiers, one centralized job queue, and Express with Socket.IO for real-time delivery.

0
API Endpoints
47+ across 5 domains
0
Core Services
CRM · WA · AI · Mail · Meet
0
DB Tiers
Postgres + MongoDB Atlas
0
Worker Types
crmWorker · emailMarketing…
Max Tenants
Mongo per client
CLIENT LAYER SECURITY + ROUTING SERVICE LAYER STORAGE + QUEUE Client Websites POST /trigger SaaS Dashboard Admin Console Meta Webhooks WhatsApp Cloud LAIE Engine Playwright/Crawlee Admin Panel verifyCoreToken Express + Socket.IO Helmet CSP · CORS Dynamic · RateLimit validateClientKey x-api-key lookup verifyCoreToken Admin JWT triggerLimiter 60 req/min withSDK(io) req.sdk inject quotaMiddleware feature gates CRM Engine leads · pipelines · auto WA Gateway Meta Cloud API AI Chat Claude · Vertex Email SES AWS SES v2 Invoicing Razorpay · PDF Google Meet Calendar API LAIE Scraper Playwright · CF ErixJobs Queue + crmWorker WAL-backed · no Redis · retry + backoff · persistent PostgreSQL (Drizzle ORM) ecodrix_orgs · ecodrix_secrets · plans MongoDB (Tenant-Isolated) Lead · Conversation · Template ErixStore Sidecar Postgres WAL + snapshots Cloudflare R2 media · invoice PDFs
🔐
Tenant Isolation
Every Mongo query carries clientCode as a hard filter. Secrets AES-256-CBC encrypted with IV-prefix. API keys compared in constant-time. Zero cross-tenant data leakage.
ErixJobs — No Redis
Sidecar job queue backed by Postgres WAL. Survives server restarts. Built-in exponential backoff retry. All 6 job types routed through one crmWorker.ts — single observability surface.
🤖
Automation Engine
Event-driven rule matching: trigger + isActive + condition. 5 action types. Sequence drip enrollment. Variable resolver with 3 context layers: lead, event, resolved.
🕷
LAIE Browser Platform
Session-isolated Playwright actors with per-fingerprint Chromium instances. CF Worker proxy relay for anti-detection. Vertex AI structured parse → bulk CRM upsert on completion. 4000 scrape quota per org.
Interactive Console

API Explorer

Browse 15 key endpoints, inspect contracts, edit payloads, and simulate response envelopes with live typing animation.

Workflows Trigger
POST/workflows/trigger
CRM Leads 8 routes
GET/leads
POST/leads
POST/leads/upsert
PATCH/leads/:id/move
PATCH/leads/:id/tags
POST/leads/import
PATCH/leads/bulk-archive
POST/leads/:id/convert
WhatsApp 3 routes
POST/chat/send
POST/chat/templates/sync
POST/marketing/whatsapp/send-template
AI Agent 4 routes
POST/ai/chat
GET/ai/metrics
POST/ai/suggestion/:id/send
POST/ai/suggestion/:id/dismiss
Invoices 6 routes
POST/invoices
GET/invoices/:id/pdf
POST/invoices/:id/payment-link
POST/invoices/:id/send-whatsapp
Marketing
POST/marketing/emails/campaign
GET/marketing/emails/campaigns
LAIE
POST/laie/session/jobs
POST /v1/api/product/erix/events/trigger
Fire workflow trigger with lead + meet scheduling
Request Body
Response Envelope
Select a route and press Execute…
Service Ecosystem

Core Service Registry

8 domain-bounded modules. Each service handles one responsibility, injected via SDK middleware, never instantiated per-handler.

Hybrid Storage Architecture

Database Schema Explorer

Platform state lives exclusively in PostgreSQL (Drizzle ORM). Per-tenant CRM data lives in isolated MongoDB databases. Two tiers, never a shared connection.

PostgreSQL — Platform Layer
Drizzle ORM · ecodrix_* tables · 16 tables total
MongoDB — Tenant-Isolated CRM
Mongoose · One DB per client · Dynamic provisioning
Request Pipeline Simulator

Live Flow Visualizer

Watch a real request travel through every layer of the stack — from HTTP ingestion through auth, SDK resolution, DB writes, job enqueueing, and final delivery.

ecodrix.stdout — pipeline trace idle
[boot] SYSTEM Simulator ready. Select a scenario and press Run.
Infrastructure

Live Infrastructure

Real-time health, containers, Cloud Run services, and relay network status across the ECODrIx platform.

🌐
store.ecodrix.com
erix-store sidecar
Checking...
api.ecodrix.com
Cloud Run · ecodrix-api
Checking...
GCE VM
e2-medium
4
Containers
Docker Compose
2
Cloud Run
Scale-to-zero
22
Proxy Relays
CF + Lambda + GCP
9
Workers
Queue processors
🐳 VPS Containers ecodrix-infra · 34.9.49.1
caddy
Reverse proxy + TLS
● healthy
erix-store
Queue + Cache engine
● healthy
ecodrix-jobs
Workers + Cron
● healthy
cloudsql-proxy
PostgreSQL tunnel
● running
☁️ Cloud Run Services us-central1
ecodrix-api
LIVE
revision ecodrix-api-00063-jgg max-scale 3 instances url ecodrix-api-hvbgrefqcq-uc.a.run.app
scraper-proxy
LIVE
revision scraper-proxy-00002-6dp max-scale 2 instances url scraper-proxy-hvbgrefqcq-uc.a.run.app
🛡️ ProxyKit Relay Network 22 relays · 3 providers
Cloudflare Workers 5 relays
laie-proxy-relay-{1..5}.workers.dev
AWS Lambda 10 relays
us-east-1, us-west-2, eu-west-1, ap-south-1...
GCP Cloud Functions 5 relays
us-central1, us-east1, us-west1, europe-west1...
🏗️ Architecture
API Cloud Run (scale-to-zero, 3 max) Workers GCE VM (always-on, Docker Compose) Queue erix-store (in-memory, WAL-backed) DB Cloud SQL PostgreSQL + MongoDB Atlas Proxy Caddy (auto HTTPS, reverse proxy) DNS store.ecodrix.com → Caddy → erix-store:6399
📊 Worker Queues
crm50 concurrency
crm.email_marketing12 concurrency
automation-events2 concurrency
workflow-executions1 concurrency
ai-respond5 concurrency
laie-scrapers5+2 concurrency
laie-research5 concurrency
laie-enrich5 concurrency
erix-store uptime
--:--:--
fetching...