Skip to content

zerocalce/Demand-Dominator

Repository files navigation

⚡ Demand Dominator Kit

Full-stack B2B demand generation and lead management dashboard for AI Automation Agencies.

TypeScript Node.js Express React PostgreSQL Live Demo

Dashboard


What It Does

Demand Dominator is an end-to-end lead intelligence platform that helps AI automation agencies capture, score, and close pipeline — with minimal manual work.

  • Real-time KPI dashboard — Pipeline value, MQL volume, conversion rate, CPL, email open rate, CTR
  • 5-grade lead scoring matrix — Automatically grades leads cold → warm → hot → qualified → closed based on engagement and ICP fit
  • Lead Matrix — Searchable, filterable table of all prospects with CRM-ready data fields
  • 10 Automation Sequences — Multi-channel (email, LinkedIn, SMS, retargeting) workflow cards with completion tracking
  • Lead Detail View — Per-lead scoring, AI notes, CRM sync status, consent tracking, and re-score on demand
  • PostgreSQL persistence — All data is real, stored, and queryable — no mock data in production

Screenshots

Lead Matrix

Lead Detail

Automation Sequences


Tech Stack

Layer Technology
Monorepo pnpm workspaces
Language TypeScript 5.9
Frontend React 18 + Vite + Recharts + Framer Motion
Backend Express 5 + Node.js 24
Database PostgreSQL + Drizzle ORM
Validation Zod v4 + drizzle-zod
API OpenAPI 3.1 spec → Orval codegen → React Query hooks
Build esbuild (CJS bundle)
Forms react-hook-form + zod

Project Structure

Demand-Dominator/
├── artifacts/
│   ├── api-server/           # Express 5 API — src/routes/, src/app.ts
│   └── demand-dominator/     # React + Vite frontend — src/pages/, src/components/
├── lib/
│   ├── api-spec/             # OpenAPI 3.1 spec + Orval codegen config
│   ├── api-client-react/     # Generated React Query hooks
│   ├── api-zod/              # Generated Zod schemas from OpenAPI
│   └── db/                   # Drizzle ORM schema + DB connection
├── scripts/                  # Utility scripts (@workspace/scripts)
├── pnpm-workspace.yaml
├── tsconfig.base.json        # Shared composite TS config
├── tsconfig.json             # Root project references
└── package.json

Prerequisites

  • Node.js v24+
  • pnpm v9+ — npm install -g pnpm
  • PostgreSQL v15+ running locally or via a connection string

Getting Started

1. Clone the repository

git clone https://github.com/zerocalce/Demand-Dominator.git
cd Demand-Dominator

2. Install dependencies

pnpm install

3. Configure environment variables

cp artifacts/api-server/.env.example artifacts/api-server/.env

Edit .env and set your database connection:

DATABASE_URL=postgresql://user:password@localhost:5432/demand_dominator
PORT=3001

4. Set up the database

# Push the Drizzle schema to your PostgreSQL instance
pnpm --filter @workspace/db run db:push

# (Optional) Seed with sample data
pnpm --filter @workspace/scripts run seed

5. Run the development servers

# Start both API server and React frontend in parallel
pnpm run dev
Service URL
React Frontend http://localhost:5173
Express API http://localhost:3001

Pages

Route Description
/ Dashboard — KPI cards, 30-day pipeline chart, lead grade donut chart
/leads Lead Matrix — searchable table with inline grade badges and score bars
/leads/:id Lead detail — scoring, AI notes, CRM sync, consent status
/sequences Automation sequences — cards with completion rates and conversion stats

API Reference

All endpoints are prefixed with /api.

Method Endpoint Description
GET /api/kpis Live KPI metrics calculated from DB
GET /api/kpis/history KPI trend history (last N days)
GET /api/leads List all leads
POST /api/leads Create a new lead
GET /api/leads/:id Get a single lead
PATCH /api/leads/:id Update a lead
DELETE /api/leads/:id Delete a lead
POST /api/leads/:id/score Re-score a lead via the scoring engine
GET /api/sequences List all automation sequences
GET /api/sequences/:id/stats Sequence statistics
GET /api/health Health check

OpenAPI & Codegen

The full OpenAPI 3.1 spec lives in lib/api-spec/. To regenerate client hooks and Zod schemas after modifying the spec:

pnpm --filter @workspace/api-spec run codegen

This regenerates:

  • lib/api-client-react — React Query hooks
  • lib/api-zod — Zod request/response schemas

Database Schema

leads table

Column Type Description
id uuid Primary key
email text Lead email address
first_name text First name
last_name text Last name
company text Company name
job_title text Job title
engagement_score integer 0–100 engagement score
grade enum cold, warm, hot, qualified, closed
icp_fit boolean Matches ideal customer profile
channel enum organic, email, linkedin, referral, sms, retargeting
consent_status enum explicit, implicit, none
crm_synced boolean CRM sync status
ai_notes text AI-generated notes
last_interaction timestamp Last active timestamp
created_at timestamp Record creation time

sequences table

Column Type Description
id uuid Primary key
name text Sequence name
description text Sequence description
channels text[] Array of channels used
steps integer Number of steps
status enum running, paused, draft
completion_rate numeric Completion rate %
active_leads integer Currently active leads

Lead Scoring Logic

Leads are scored on two axes — ICP fit (boolean) and engagement score (0–100):

icp_fit = false              → COLD
icp_fit = true, score ≥ 80  → QUALIFIED
icp_fit = true, score ≥ 50  → HOT
icp_fit = true, score ≥ 20  → WARM
icp_fit = true, score < 20  → COLD

Re-scoring can be triggered manually from the Lead Detail page or via POST /api/leads/:id/score.


TypeScript Setup

This is a composite TypeScript monorepo. A few things to know:

  • Always typecheck from the root — running tsc inside a single package will fail if its dependencies haven't been built yet
  • emitDeclarationOnly is used — esbuild/Vite handle actual JS bundling, not tsc
  • When adding a new package that depends on another, add it to references in tsconfig.json
# Typecheck the entire monorepo
pnpm run typecheck

# Build all packages
pnpm run build

Deployment

Replit (current)

The app is live at demand-dominator--otamjezndewoa.replit.app. The .replit config handles process startup.

Self-hosted / Cloud

Frontend (Vercel / Netlify)

cd artifacts/demand-dominator
pnpm run build
# Deploy the dist/ folder

API Server (Railway / Render / AWS ECS)

cd artifacts/api-server
pnpm run build
node dist/index.js

Set DATABASE_URL and PORT as environment variables in your deployment platform.


Contributing

  1. Fork the repo
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Commit your changes: git commit -m 'feat: add my feature'
  4. Push to the branch: git push origin feat/my-feature
  5. Open a Pull Request

License

© 2026 zerocalce. All rights reserved. Unauthorized redistribution or resale is prohibited.

About

Full-stack B2B demand generation and lead management dashboard. React + Node.js + PostgreSQL

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages