Skip to content

shivam5643/Job_retail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retail Pulse Backend

Description

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.

Assumptions

  • The store_master.csv file contains StoreID, StoreName, and AreaCode.
  • Images are publicly accessible via the provided URLs.
  • The system handles multiple concurrent jobs efficiently.

Installation & Setup

Prerequisites

  • Node.js
  • MongoDB

Steps

  1. Clone the repository:
    git clone https://github.com/your-repo/retail-pulse-backend.git
    cd retail-pulse-backend
  2. Install dependencies:
    npm install
  3. Set up environment variables by creating a .env file:
    PORT=5000
    MONGO_URI=mongodb://localhost:27017/retail_pulse
    
  4. Start the server in development mode:
    npm run dev

Testing Instructions

  • 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

Work Environment

  • IDE: VS Code
  • Libraries used: Node.js, Express.js, Mongoose, Multer, csv-parser

Future Improvements

  • we can add authentication and authorization.
  • we can Optimize image processing using worker threads.
  • we can deploy the service using Docker and Kubernetes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published