๐Ÿ“‹ Lead Collection & Management System

A full-stack lead collection and management platform for marketing campaigns (for example Facebook Ads). It captures high-quality leads and reduces data loss by saving user input in real time, even when the form is never submitted.

  • ๐Ÿ”ง Tech Stack: React (Vite), Django, Django REST Framework, PostgreSQL (production) / SQLite (development)
  • ๐ŸŒ Live โ€” Lead Form: lead-production-0b8b.up.railway.app
  • ๐Ÿ“Š Live โ€” Admin Dashboard: Dashboard on Railway
  • ๐Ÿš€ Deployment: Railway (separate frontend and backend services)

๐ŸŽฏ Problem Statement

Typical lead flows lose incomplete submissions, discard users who abandon the form, and struggle with inconsistent data quality. This system addresses that with real-time draft saving, flexible validation (phone or email), and an admin experience built for non-technical operatorsโ€”not only the default Django admin.

โœจ Core Features

  • Real-time draft auto-save โ€” Persists input while typing without requiring submit, reducing drop-off loss.
  • Smart submission rules โ€” A lead counts as valid when phone or email is present.
  • Admin dashboard โ€” Browse leads with filters for submission status (Draft / Submitted), contact type (Phone / Email), and activity date.
  • Soft delete & trash โ€” deleted_at-style workflow: restore or permanently delete (password-protected).
  • CSV export โ€” Filtered export as Excel-friendly UTF-8 with BOM; preserves values such as leading zeros in phone numbers.
  • Custom admin UI โ€” Improved login and dedicated dashboards beyond stock Django admin.

๐Ÿ—๏ธ System Architecture

Frontend โ€” React with Vite: lead form with auto-save; routes include / (form), /login, and /dashboard for admin flows.

Backend โ€” Django + DRF exposing REST endpoints such as POST /api/save-draft/, POST /api/submit/, GET /api/leads/dashboard/, and GET /api/health/.

Lead lifecycle โ€” Draft captures partial progress; Submitted applies validation. Activity tracking uses a last-activity timestamp for filtering and analytics. Active lists exclude soft-deleted rows; trash shows only deleted entries.

API security uses environment-based configuration with appropriate CORS and CSRF settings for cross-origin communication between Railway-hosted services.

๐Ÿ› ๏ธ Technologies Used

Frontend
  • React
  • Vite
Backend
  • Django
  • Django REST Framework
Database
  • PostgreSQL (production)
  • SQLite (development)

๐Ÿ“Œ Use Cases & Outcomes

Suited for paid social landing pages, sales teams that need clean contact data, and any business that wants fewer โ€œinvisibleโ€ leads. Outcomes include higher effective capture rate, less permanent loss from partial forms, and clearer operational decisions from structured filters and exports.

๐Ÿ”ฎ Future Improvements

  • Lead scoring
  • Email / SMS integration
  • CRM integration
  • Real-time analytics dashboard
  • AI-assisted lead quality prediction

This project shows how a simple lead form can evolve into a practical lead-intelligence layer by combining behavioral capture (drafts), validation, recovery (trash/restore), and operator-friendly reporting.