A comprehensive Backend REST API engineered for Customer Relationship Management (CRM) and Task Tracking. Built with Node.js & Express following a strict MVC Architecture.
This system is designed as a scalable CRM Backend, decoupling business logic (Controllers) from data access (Models) and routing (Routes).
- 👥 CRM Core: Management of Customers and sales Deals (
Deal.js,Customer.js). - ✅ Workflow: Assigning and tracking team Tasks (
Task.js). - 📊 Audit System: Logging system events and user Activities (
Activity.js). - 🔐 Security: JWT Authentication (
verifyToken.js) and protected routes. - ☁️ Media Handling: Image upload pipeline using Cloudinary (
photoUpload.js,cloudinary.js).
| Component | Technology | Description |
|---|---|---|
| Runtime | Node.js | Non-blocking I/O environment |
| Framework | Express.js | RESTful routing and middleware |
| Database | MongoDB | NoSQL Schema-based modeling (Mongoose) |
| Auth | JWT | Stateless authentication & Role-based security |
| Storage | Cloudinary | Cloud-based image optimization & storage |
The system exposes a rich set of endpoints organized by domain:
POST /api/auth/register- Register new admin/staffPOST /api/auth/login- Secure login & token generation
GET /api/customers- Retrieve customer databasePOST /api/deals- Create new sales opportunities
POST /api/tasks- Assign tasks to usersGET /api/activity- Monitor system logs
npm install
# Create a .env file in the root directory:
PORT=8000
MONGO_URI=your_database_connection_string
JWT_SECRET=your_secret_key
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Development Mode
npm run dev
# Production Start
npm start