Generate a video: You are an expert backend developer specializing in the MERN stack. Create the complete backend code for a simple Customer Relationship Management (CRM) API for a local Indian ‘Kirana’ (grocery) store. This project is perfect for students and aspiring freelancers looking to build a portfolio with real-world Indian use cases. **Project Goal:** Build a RESTful API using Node.js and Express that allows a shopkeeper to manage their customers’ credit (`udhaar`) system. **Tech Stack:** – Backend Runtime: Node.js – Framework: Express.js – Database: MongoDB with Mongoose ODM – Environment Variables: `dotenv` **Instructions for the AI:** 1. **API Endpoints (CRUD):** The API must have the following routes: – `POST /api/customers`: Add a new customer (fields: `name`, `phone`, `address`, `outstandingBalance`). – `GET /api/customers`: Get a list of all customers. – `GET /api/customers/:id`: Get a single customer by their ID. – `PUT /api/customers/:id`: Update a customer’s details, especially their `outstandingBalance`. – `DELETE /api/customers/:id`: Delete a customer record. 2. **File Structure:** Break down the code into logical files for a clean project structure. Provide code for each of these files: – `server.js`: The main entry point. Sets up the Express server, connects to MongoDB, and defines the middleware. – `models/customer.model.js`: The Mongoose schema and model for the ‘Customer’ collection. The `phone` number should be unique. – `routes/customer.routes.js`: Defines all the API routes using `express.Router()`. – `controllers/customer.controller.js`: Contains the logic for each route (create, find, update, delete). – `.env`: An example environment file with `MONGO_URI` and `PORT` variables. 3. **Code Output Format:** – Start with the necessary installation commands: `npm install express mongoose dotenv cors`. – For each file (`server.js`, `customer.model.js`, etc.), use a clear heading and provide its complete code in a separate block. – Include comments explaining the purpose of each file and key functions, especially the controller logic. This structure makes it easy to create a multi-part Reel series or a detailed YouTube short.