Back

System Design

NICK AI Architecture

A layered breakdown of how NICK AI is structured — from the React frontend to backend functions, automations, data model, and third-party integrations.

Core Lead Flow

The end-to-end journey a prospect takes through the system:

1

Lead Discovery

AI Search or Hulk Mode finds prospects via LLM + internet search → creates TradingCardShop records

2

Enrichment

Website scrape extracts email, phone, AI summary, lead score → updates shop record

3

Outreach

Mass email or campaign sends personalized email via Resend with tracking pixels injected

4

Tracking

Open/click pixel fires → trackEmail function → updates shop engagement metrics

5

Follow-Up

Scheduler checks ScheduledFollowUp records daily → sends follow-up emails automatically

6

Inbox

Replies captured in Conversation entity → AI suggests response → rep takes action

7

Convert

Status updated to "client" → deal value set → shows in MRR/ARR dashboard metrics

Tech Stack at a Glance

Frontend

React 18 + Vite + Tailwind CSS

Routing

React Router v6 (/:tenantSlug/*)

State / Data

TanStack Query + React Context

Backend

Deno Deploy (serverless functions)

Database

Base44 Entity Store (NoSQL)

Email

Resend (send + webhooks)

AI

Base44 InvokeLLM (OpenAI / Anthropic / Google)

Voicemail

VoiceDrop.ai (RVM)

SMS

Twilio

Lead Data

Snov.io + Hunter.io

Auth

Base44 built-in (JWT sessions)

Hosting

Base44 Platform

Architecture Layers

Click each layer to expand its components and details.

Design Principles

Tenant Isolation

Every query filters by tenant_id. No cross-tenant data leakage possible at the application layer.

Snapshot on Open

Modals that perform multi-step operations (mass email) snapshot their data at open time — background refetches cannot interrupt in-flight operations.

Optimistic Updates

ShopDetailModal patches the React Query cache immediately on save, then reconciles with server truth via invalidation.

Serverless Functions

Each backend function is a self-contained Deno handler. No shared imports — deployable independently.

AI-First Personalization

Every outreach email, proposal, and voicemail script is generated fresh using the shop's AI summary + tenant business intelligence.

Automation Layers

NICK Mode = single-tenant manual trigger. Hulk Mode = all-tenant scheduled automation. Both share the same 5-step pipeline logic.

Email Health Guardrails

EmailHealth entity tracks bounce/spam/unsubscribe rates. Daily send limits enforced to protect sender reputation.

Progressive Enrichment

Shops start with basic info and accumulate data over time: web scrape → LinkedIn → Google Business → email opens/clicks → call notes.

NICK AI Architecture · Last updated April 2026