A full-stack Lead Management System built for the Digital Heroes Full Stack Developer Assignment.
- Frontend: https://lead-desk-mini-bice.vercel.app/
- Backend API: https://leaddesk-mini-lrw4.onrender.com
- Landing Page
- Loading States
- Lead Submission Form
- Client-side Validation
- Server-side Validation
- Success & Error Toasts
- Responsive UI
- Secure Admin Login
- JWT Authentication
- Protected Routes
- Lead Dashboard
- Search Leads
- Lead Status Management
- Logout
- React
- Vite
- Tailwind CSS
- Axios
- React Router
- React Hot Toast
- Node.js
- Express.js
- MongoDB
- Mongoose
- MongoDB Atlas
- JWT
- bcrypt
{
name,
email,
budget,
message,
status,
createdAt
}- New
- Contacted
- Closed
{
name,
email,
password
}Passwords are securely hashed using bcrypt before storing in MongoDB.
The admin panel is protected using JSON Web Tokens (JWT).
Authentication flow:
- Admin logs in.
- Backend validates credentials.
- JWT token is generated.
- Token is stored in Local Storage.
- Protected routes verify token before allowing access.
- Logout removes the token.
Protected API requests include the JWT as a Bearer Token in the Authorization header.
- Minimum 2 characters
- Maximum 50 characters
- Only letters and spaces allowed
- Valid email format
- Minimum 10 characters
- Maximum 500 characters
- Required
Server validates all incoming requests before saving data to MongoDB, ensuring invalid or malformed inputs are rejected.
LeadDesk-Mini
│
├── client
│ ├── src
│ ├── pages
│ ├── components
│ └── services
│
├── server
│ ├── controllers
│ ├── routes
│ ├── middleware
│ ├── models
│ └── config
│
├── screenshots
│ ├── home.png
│ ├── lead-form.png
│ ├── login.png
│ └── dashboard.png
│
└── README.md
Frontend deployed on Vercel
Backend deployed on Render
Database hosted on MongoDB Atlas
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
VITE_API_URL=https://leaddesk-mini-lrw4.onrender.com/api
Clone the repository
git clone https://github.com/royalknight71/LeadDesk-Mini.gitcd server
npm install
npm run devcd client
npm install
npm run devadmin@digitalheroes.com
Password
Admin@123
- Public Landing Page
- Lead Form
- MongoDB Storage
- Admin Dashboard
- JWT Authentication
- Protected Routes
- Search Leads
- Status Toggle
- Deployment on Render
- Deployment on Vercel
- Responsive Design
- Client & Server Validation



