How sanya1202/flipkart-grid-frontend works
Project type and purpose
• This is a full-stack, image-processing web application (“Smart Vision Quality Control System”) that uses a React/Tailwind front end, a Node.js/Express API gateway, a Python-based ML service (Flask or FastAPI), and MongoDB for persistence. It supports OCR, object classification, freshness assessment, barcode decoding, nutrition/ingredient extraction, and history tracking.
File structure
• Top-level:
• .env, .gitignore, package.json / package-lock.json → Node/Express configuration
• Backend/app.js → main Express server, defines REST endpoints
• model/ → Python microservice modules (app.py, BarCode.py, nutrition.py) handling ML pipelines (Gemini LLM, YOLO, pyzbar)
• public/ → static assets & HTML template for React
• src/ → React source code, organized into components (login, dashboard, scan, history, nutrition, barcode, charts, etc.)
• tailwind.config.js → Tailwind CSS setup
• The presence of both Backend/app.js and model/app.py implies a microservices pattern: Express routes delegate heavy lifting to a separate Python service.
README for additional insights
• Front end deployed on Netlify; calls back-end via Axios POST to endpoints like /predict, /decode, /add-product, /products-history, etc.
• Back end uses a fine-tuned Gemini LLM (via Google GenAI) and a YOLO-v8 model for barcode detection, plus OCR/pyzbar.
• Two MongoDB collections: products and fruits/vegetables, each with its own Mongoose schema.
• System workflow: user uploads image → Express server → Python ML service → returns JSON → Node persists to MongoDB → UI updates and can query history.
Elements
• Clear labels: e.g., “React UI (Netlify)”, “Express API (/predict, /decode, /history)”, “ML Service (Flask/FastAPI)”, “MongoDB Atlas”
• Blue rectangles for front-end
• Green for back-end services
• Orange for ML service
• Notes on important internal modules (e.g., YOLO-v8, OCR, LLM pipeline)