This project is a backend service for processing store visit images. The service handles job submission, downloads images, calculates their perimeter, and stores the results in a MongoDB database. The job's status can be queried via API endpoints.
- The
store_master.csvfile containsStoreID,StoreName, andAreaCode. - Images are publicly accessible via the provided URLs.
- The system handles multiple concurrent jobs efficiently.
- Node.js
- MongoDB
- Clone the repository:
git clone https://github.com/your-repo/retail-pulse-backend.git cd retail-pulse-backend - Install dependencies:
npm install
- Set up environment variables by creating a
.envfile:PORT=5000 MONGO_URI=mongodb://localhost:27017/retail_pulse - Start the server in development mode:
npm run dev
- Use Postman or cURL to test the API endpoints:
- Submit a Job:
POST http://localhost:5000/api/submit/
- Get Job Status:
GET http://localhost:5000/api/status?jobid=123
- Submit a Job:
- IDE: VS Code
- Libraries used: Node.js, Express.js, Mongoose, Multer, csv-parser
- we can add authentication and authorization.
- we can Optimize image processing using worker threads.
- we can deploy the service using Docker and Kubernetes.