Deployed Link - https://leadms-nestjs.vercel.app/
The Leads Management System project consists of:
- Frontend: Modern User interface built using tailwind css, Shadcn and Next js hosted on vercel.
- Backend: API services built using NodeJs's Nest JS, Postgres hosted on AWS EC2 and RDS.
- For using, Basic system(laptop/pc/mobile/tab) with browser and internet connection
- For Development, 8GB RAM with intel i3 + is recommended
This project is built using NestJS for the backend and uses pnpm for package management. Follow the steps below to set up the project locally.
- Ensure you have Node.js installed (version 18 or higher recommended).
- Install pnpm package manager globally:
npm install -g pnpm
- Clone the backend repository from GitHub:
git clone https://github.com/iuashrafi/leadms-nestjs cd leadms-nestjs
- To install the packages run:
pnpm install
Add a .env file to apps/backend folder
# incase you have local pg admin
DB_NAME='leadmsDb'
DB_HOST='localhost'
DB_USERNAME='postgres'
DB_PASSWORD='qwerty'
DB_PORT=5432
# or else Database url link
DATABASE_URL='postgresql://<username>:<password>@<host>:5432/leadmsDb'
- Start the development server using the following command:
cd apps/backend pnpm run start:dev
The frontend is built using NextJs, Tailwindcss and shadcn library and It is hosted on vercel. Follow the steps below to set up the project locally.
- Ensure you have Node.js installed (version 18 or higher recommended).
- Install pnpm globally:
npm install -g pnpm
Add a .env.local file to apps/frontend folder
ENV=dev
NEXT_PUBLIC_BACKEND_URL=/apiAdd a .env.production file to apps/frontend folder
ENV=prod
NEXT_PUBLIC_BACKEND_URL=/api- Start the development server using the following command:
cd apps/frontend pnpm run dev
We have divided our backend into 3 modules. Each having its own controller, service and entities.
- getDashboardData API
- api endpoint to fetch all the data which are displayed in our dashboard like total leads, staffs, interactions count
- data also includes 5 recent leads, todays pending calls, recent interactions
- createLead API
- to add leads in our RestaurantLead table
- updateLead API
- to update the lead given its data and leadId
- getAllLeads API
- to get all leads with infinite scroll pagination
- and basic leads filter by lead status - New, Active, Inactive
- basic search text
- getLeadById API
- to get a information about a particular lead by its id
- also returns the list of staffs in that list
- also returns count of orders interaction and the rank of that lead
- rank is decided based on the no of orders, the more the orders placed, high is rank and hence, we can say that the lead has performed well
- deleteLead API
- delete a lead along with its staffs and interactions made(cascade delete)
- createRestaurantStaff API
- api end point to add a staff to given lead(restaurant)
- body will the contain the staff details
- getAllStaffs API
- api endpoint to get all staffs
- basic search text along with filter by role
- pagination with table format
- updateStaff API
- api endpoint to update a staff given its staff id and details
- deleteStaff API
- api endpoint to delete a staff with all the interactions made with that staff (cascading delete)
- createInteraction API
- api endpoint to interact with a staff, body containing interactionDate, type(call, visit, order), notes, followUp
- updateInteraction API
- api endpoint to update the above interaction
- deleteInteraction API
- api endpoint to delete an interaction
- getAllInteractions API
- api endpoint to get all interactions with pagination
- basic search text and filter interactions by type
- get interactions of a staff id(passed in query string)
- get interactions of a lead id
Please check screenshots folder or directly the github link (incase the screenshots doesn't loads locally)
Dashboard - Metrics, Recent Leads, Interactions, Today's Pending calls

Restaurant Leads - Search, Filter by Lead status, Infinite Pagination Scroll

Single Lead Page - Rank(performance) of Lead, Total Orders, Lead Details, Add staffs to a lead, interact with staff, Edit etc

Staffs Table - Search staffs, Filter by role, Dropdown option to edit, interact with staff

Interactions Table - search, filter, edit interaction, add new interaction, filter interactions by leadId or staffId
