LeadStream AI is a state-of-the-art, high-fidelity CRM and automated outreach terminal built with a premium cyberpunk dark-mode aesthetic and a clean emerald-cream light-mode switch. Powered by the bespoke Stitch AI Lumina Nexus design guidelines, the dashboard delivers tactile micro-interactions, smooth bezier vector charts, live SVG sparklines, and a cognitive AI copy critique optimizer.
| Component | Production Endpoint | Status |
|---|---|---|
| π Interactive Frontend Client | gigflow-web-oj7s.onrender.com | |
| β‘ Backend API Gateway | smart-leads-api-50yq.onrender.com | |
| π©Ί API Server Health Check | /health Diagnostic Check |
Tip
π Zero-Config Client-Side API Override: If the frontend has trouble communicating with the API due to cold-starts on Render's free tier, click the Settings Gear (βοΈ) in the top right of the Login page and verify the API endpoint is set to https://smart-leads-api-50yq.onrender.com/api!
The system implements a rigorous role-based routing architecture on both the backend database layers (Mongoose schemas + custom Express middlewares) and client layouts.
| Feature / Permission | π Admin Login | πΌ Sales User Login | Implementation Layer |
|---|---|---|---|
| Outbox Scope | Global (All Sales Users) | Assigned Leads Only | Mongoose Filter Query Injection |
| Lead Creation | β Yes | β Yes | Controller standard entity save |
| Lead Upgrades & Edit | β Yes | β Yes (Own leads only) | Ownership validation middleware |
| Lead Deletion | β Yes | β Access Denied | adminOnly Route protection |
| CSV Intel Export | β Yes | β Access Denied | adminOnly Route protection |
| Dashboard Analytics | β Global Enterprise Stats | Pipeline aggregation filters | |
| Campaigns Console | β Fully Interactive | β Fully Interactive | State management pipeline |
Authentication and authorization are verified using stateless JSON Web Tokens (JWT):
- JWT Payload Structure: Includes the user's Mongoose
userIdand explicitrolevalues (AdminorSales User). - Access Control Stack:
protectMiddleware: Decodes the JWT, validates the active session, retrieves public user fields, and attaches them toreq.user.authorize(...roles)Middleware: Standard role filter returning403 Forbiddenif the authenticated user's role does not match permissions.adminOnlyMiddleware: Shorthand wrapper restricting operations exclusively toAdmin(UserRole.ADMIN).
// Route Configuration Example (/server/src/routes/leads.ts)
router.use(protect); // Enforce Authentication globally
router.get('/export/csv', adminOnly, exportLeadsCSV); // Restricted to Admins
router.delete('/:id', adminOnly, deleteLead); // Restricted to Admins
router.get('/:id', getLeadById); // Custom ownership check inside controller- Frontend Engine: React 18 + TypeScript + Vite + TailwindCSS + Framer Motion
- Vector Graphics Core: Native SVG paths (bezier coordinate lines, live campaign sparklines, dynamic acquisition arcs)
- Backend Framework: Node.js + Express + TypeScript + Mongoose (MongoDB ODM)
- Authentication: Stateless JWT + bcrypt password salting (12 rounds)
- Environment Systems: Multi-tier Docker Compose containerization
π¦ GigFlow-repo
βββ π client # React SPA Frontend Client
β βββ π src
β β βββ π components # Reusable UI Components (Leads, Campaigns, Charts, UI)
β β βββ π context # Auth and Navigation State Providers
β β βββ π pages # Cyberpunk Page Terminals (Dashboard, Campaigns, Analytics)
β β βββ π services # Dynamically Configured Axios Core API Client
β β βββ π main.tsx # Single Page App Bootloader
β βββ π Dockerfile # Nginx-based Multi-stage compilation config
β βββ π package.json # Frontend dependencies & scripts
β
βββ π server # Express TypeScript REST API Gateway
β βββ π src
β β βββ π controllers # Business Logic handlers (Leads, Auth, Exports)
β β βββ π middleware # CORS filters, JWT verification, and RBAC rules
β β βββ π models # Mongoose Schemas (Users, Leads, Campaigns)
β β βββ π routes # Express routing endpoints
β β βββ π app.ts # Express Application Setup (with CORS matching)
β β βββ π seed.ts # Automated evaluator and demo seeder setup
β βββ π package.json # Server node dependencies & build configurations
β
βββ π docker-compose.yml # Multi-tier containerization orchestrator
βββ π LICENSE # Open-Source MIT License
βββ π README.md # Live gateway portal and developer specification
Start the entire infrastructure (Frontend, Backend, and MongoDB Database) with a single command:
docker-compose up --build- Frontend Portal:
http://localhost:5173 - API Service Gateway:
http://localhost:5000 - Local Mongo Cluster:
localhost:27017
- Navigate into
/server:cd server - Replicate the environment config:
cp .env.example .env
- Run the dependency installation and developer seed loop:
npm install npm run dev
- Navigate into
/client:cd client - Configure host settings:
cp .env.example .env
- Install nodes and boot the Vite server:
npm install npm run dev
To bypass manual database configuration, the system seeds dedicated test credentials for review:
- π Enterprise Administrator:
- Email:
admin@smartleads.com - Password:
Password123
- Email:
- πΌ Local Sales Rep:
- Email:
sales@smartleads.com - Password:
Password123
- Email:
This project is licensed under the MIT License β see the LICENSE file for complete details.
Copyright (c) 2026 SmartLeads CRM Systems.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.