Technical Document
Living reference for every page, feature, setup step, and configuration in LeadGen.ai. Update this page whenever a feature is added or changed.
1. Pages & routes
All user-facing and API endpoints currently in the app.
Public / marketing
| Route | Purpose |
|---|---|
/ | Landing page (logged-in users redirect to Dashboard) |
/Features | Marketing feature list |
/HowItWorks | 4-step workflow pitch |
/Solutions | Agency / freelancer / sales solutions |
/WhiteLabel | White-label / rebrand offer |
/ApiDocs | Public API docs (POST /api/leads) |
/TechnicalDocument | This technical reference |
/Contact | Contact form → admin inbox |
/Privacy | Privacy policy |
Account
| Route | Purpose |
|---|---|
/Account/Register, /Login | Sign up / sign in (email must be verified) |
/Account/ConfirmEmail, /ResendConfirmation | Email verification |
/Account/ForgotPassword | Temp password emailed to user |
/Account/EditProfile, /ChangePassword | Profile & password |
App (authenticated)
| Nav area | Route | Purpose |
|---|---|---|
| Dashboard | /Dashboard | KPIs, contact-today queue, weekly usage, onboarding checklist |
| Leads | /Leads/Search | Google Places search + saved searches |
| Leads | /Leads | Lead list with filters + CSV export |
| Leads | /Leads/Pipeline | Kanban by status |
| Leads | /Leads/NoWebsite | Businesses with no website |
| Leads | /Leads/Create, /Edit, /Import | Manual add, edit, Excel import |
| Leads | /Leads/Details/{id} | Full lead: score, audit, script, call/email/WhatsApp, notes, tags, follow-ups |
| Outreach | /Campaigns | Bulk email / WhatsApp campaigns (list, add, edit, send batch) |
| Outreach | /EmailTemplates | Reusable email templates (Quill) |
| Outreach | /EmailAccounts | User SMTP accounts + test email |
| Workspace | /Templates | Demo Framer template library |
| Workspace | /Team | Seats, invites, branding, client reports (Business) |
| Workspace | /Billing | Plans, Stripe checkout, credits |
| Admin | /Admin/Users | Plans, verify, disable users |
| Admin | /Admin/ContactSubmissions | Contact form inbox |
APIs & webhooks
| Route | Purpose |
|---|---|
POST /api/leads | Create lead via API key or session |
GET /api/email/open/{token}.gif | Campaign open-tracking pixel |
GET /email/unsubscribe/{token} | One-click unsubscribe |
/api/voice/twilio/*, /api/voice/acs/* | AI call media / status / inbound |
POST /api/sms/twilio/inbound | Inbound SMS forward |
2. Core flows
A. New user → first lead
- Register → confirmation email (needs system
EmailSMTP in appsettings). - Confirm email → login → Dashboard onboarding checklist.
- Find Leads → search niche + location (needs
GooglePlaces:ApiKey, charges credits). - Open lead → enrichment/audit/score run from website data.
- Generate script → call / WhatsApp / email from Details.
B. Bulk email campaign
- Outreach → Manage Emails → add SMTP → Send test email.
- (Optional) Email Templates → add/edit rich-text template.
- Campaigns → Add → pick SMTP, template, caps, lead filters → Create.
- Open campaign → Send batch now (hourly/daily caps + random delay).
- Opens tracked via pixel; recipients can unsubscribe.
C. AI voice call
- Configure Twilio and/or Azure Communication + Azure OpenAI Realtime.
- Set
LeadGen:DefaultTelephonyProviderand publicCallbackBaseUrl. - Lead Details → generate script → Initiate call (2–3 credits).
- Webhooks stream audio; transcript saved on Call History.
D. Team / white-label (Business)
- Upgrade to Business plan (Stripe or Admin override).
- Team → invite members (seats), assign leads.
- Update branding (company name + colors) → applied in layout.
- Send / preview client HTML report by email.
3. Feature catalog
What exists, where to use it, and what must be configured.
| Feature | Where | Required configuration | Notes |
|---|---|---|---|
| Smart lead search | /Leads/Search |
GooglePlaces, credits |
1 credit per search (default) |
| Opportunity scoring | Lead details / lists | None (rules engine) | Uses reviews, website gaps, presence |
| Website audits | Lead details | Outbound HTTP | Load / outdated / basics checks |
| Contact enrichment | Create/Edit/search | Outbound HTTP | Email + social URLs from site |
| No-website finder | /Leads/NoWebsite |
— | Filter of leads without website |
| Excel import / CSV export | /Leads/Import, ExportCsv |
— | Import ≤5MB xlsx; export ≤5k rows |
| Saved search alerts | Search page | System Email; Pro/Business |
Background service emails new matches |
| Notes, tags, follow-ups | Lead details | Starter+ for notes/tags | Statuses: New→Closed pipeline |
| Pipeline board | /Leads/Pipeline |
— | Kanban by status |
| Demo website templates | /Templates, lead details |
— | Niche-matched Framer demos |
| AI cold-call scripts | Lead details | Azure OpenAI gpt-4o |
Shared for call / WA / email |
| AI voice calls | Lead details | Twilio and/or ACS + Realtime OpenAI | Transcripts in Call History |
| Inbound AI / forward | Twilio webhooks | Twilio + EnableInboundAi |
Known lead → AI; unknown → forward |
| WhatsApp click-send | Lead details / campaigns | — | Opens wa.me; logs history |
| One-off script email | Lead details | System Email SMTP |
Logged in Email History |
| Bulk campaigns | /Campaigns |
User SMTP for email channel | Hourly/daily caps, open track, unsub |
| Email templates | /EmailTemplates |
— | System + user templates; Quill |
| Manage Emails (SMTP) | /EmailAccounts |
Valid SMTP / App Password | Test email before campaigns |
| Team & assignment | /Team |
Business plan; system Email | Owner / Agent / Viewer seats |
| White-label branding | Team → branding | Business plan | Name + primary/accent colors |
| Client report email | Team | System Email |
HTML report to any recipient |
| Billing / Stripe | /Billing |
Stripe keys + price IDs |
Graceful if not configured |
| Public leads API | /api/leads, ApiDocs |
LeadGen:ApiKey + user email |
Auth via X-Api-Key |
| Admin users / contacts | /Admin/* |
Admin role (seeded) | Plan, verify, disable; contact inbox |
4. Configuration (appsettings.json)
Store secrets in User Secrets / environment variables in production.
| Section | Used for | Must configure? |
|---|---|---|
ConnectionStrings:DefaultConnection | SQL Server / EF | Yes |
GooglePlaces | Lead search | Yes for search |
Azure (OpenAI + Blob) | Scripts, storage | Yes for AI scripts |
AzureOpenAiRealtime | Live AI voice | Yes for AI calls |
Twilio | Outbound/inbound voice & SMS | If using Twilio |
AzureCommunication | Alternate telephony | If using ACS |
Email | Verify, reset, invites, alerts, reports, one-off emails | Yes for auth emails |
Stripe | Paid plans | Optional |
LeadGen | Credits, telephony default, API key, public URL | Yes |
AdminSeed | First admin user | Yes on first run |
Email is for platform mail.
Campaign sends use each user’s accounts under Outreach → Manage Emails
(Gmail: App Password, host smtp.gmail.com, port 587, SSL on).
5. Plans & credits
- Free — 5 credits/day
- Starter — 25/day (~$29) — notes/tags
- Pro — 75/day (~$79) — saved search alerts
- Business — 200/day/seat (~$199, 5 seats) — team, branding, reports
Typical costs: search 1 credit; ACS AI call 2; Twilio AI call 3 (see LeadGen settings).
Failed calls refund credits. Admin can override any user’s plan.
6. Gaps previously missing on /Features
These product capabilities existed in the app but were not listed on the marketing Features page. They have now been added there (items 13–20). Keep both pages in sync when shipping new work.
- Bulk email & WhatsApp campaigns (caps, tracking, unsubscribe)
- Email templates + per-user SMTP (“Manage Emails”)
- Excel import & CSV export
- Saved search email alerts
- Notes, tags & follow-up reminders
- Team collaboration, lead assignment, white-label branding, client reports
- Plans, daily credits & Stripe billing
- Public leads API
- Inbound AI answering / SMS forwarding (ops feature — document here; optional on Features)
7. Checklist when adding a feature
- Implement controller/service + nav link if users need to find it.
- Document route + flow + config in this Technical Document.
- If it is customer-facing, add a card on /Features.
- Note any new
appsettingskeys and plan/credit gates. - Add test steps (happy path + missing-config failure message).