A full-stack lead capture application built with the MERN stack. Supports lead management, webhook automation, backend validation, and a responsive UI.
Frontend: React + Tailwind CSS Backend: Node.js + Express Database: MongoDB Validation: Zod HTTP Client: Axios
The backend follows a layered architecture:
Controller → Service → Repository → Database
This separation improves scalability, maintainability, and testing.
- Create leads
- View all leads
- Delete leads
- Search leads (client-side filtering)
- Webhook triggered on lead creation
- Webhook failure handled without blocking lead creation
- Backend validation using Zod
- Responsive dark UI
POST /api/leads GET /api/leads GET /api/leads/:id DELETE /api/leads/:id
When a lead is created:
- Backend validates the request using Zod
- Lead is saved to MongoDB
- A POST request is sent to
WEBHOOK_URL - If the webhook succeeds → status
"success"is returned - If the webhook fails → the lead is still saved, and the frontend displays a warning
This ensures webhook failures do not affect core application functionality.
git clone https://github.com/adhil5108/leadflow.git
cd server npm install npm run dev
Create a .env file inside /server:
PORT=5000 MONGO_URI=your_mongodb_connection WEBHOOK_URL=your_webhook_url
cd client npm install npm run dev
- Non-blocking webhook to improve reliability
- Layered backend architecture
- Schema validation before database operations
- Clean and minimal UI focused on usability