A full-stack lead management system built with NestJS, Next.js, and MongoDB. The project is fully containerized using Docker for a seamless setup and evaluation.
- Backend: NestJS (TypeScript), MongoDB (Mongoose), Swagger (API Docs)
- Frontend: Next.js (App Router), Tailwind CSS, Axios
- Infrastructure: Docker, Docker Compose
- Lead Management: Create, view, and list leads.
- Comment System: Add and retrieve comments for each lead.
- API Documentation: Interactive Swagger UI.
- Validation: Strict DTO validation on the backend.
- Dockerized: Single-command setup for the entire stack.
To run the project locally, you only need to have Docker and Docker Compose installed.
-
Clone the repository:
git clone [https://github.com/krovostcora/mini-lead-tracker](https://github.com/krovostcora/mini-lead-tracker) cd mini-lead-tracker -
Run with Docker Compose:
docker-compose up --build
-
Access the applications:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001/api
- Swagger UI (Docs): http://localhost:3001/api/docs
- Get Leads:
GET /api/leads - Create Lead:
POST /api/leads(Body:{ "firstName": "John", "lastName": "Doe", "phone": "+12345", "email": "john@example.com" }) - Add Comment:
POST /api/leads/:id/comments(Body:{ "content": "Follow up tomorrow" })
mini-lead-tracker/
├── backend/ # NestJS application
│ ├── src/ # Source code
│ ├── Dockerfile # Docker configuration for backend
│ └── ...
├── frontend/ # Next.js application
│ ├── src/ # Components and Logic
│ ├── Dockerfile # Docker configuration for frontend
│ └── ...
└── docker-compose.yml # Orchestration for App, DB, and Network
- Full Test Coverage: Implement Unit tests for Services and E2E tests for API routes.
- Caching: Integrate Redis for faster Lead listing retrieval.
- CI/CD: Setup GitHub Actions for automated linting and Docker image builds.