Small neighborhood grocery stores (kiranas) constitute the backbone of food retail in developing economies yet depend on fragmented, manual supply chains that generate high procurement costs, frequent stockouts, and chronic inefficiencies. FreshCart is a scalable B2B web platform that digitizes bulk ordering for kirana stores by directly connecting them with local wholesalers and distributors through an API-driven architecture. The platform provides role-based dashboards for distributors and shopowners, a unit-sensitive inventory engine supporting diverse purchase units with automatic base-unit conversion, real-time stock visibility, and seamless bulk order management. The backend is implemented in Python Flask with a MySQL relational database and a RESTful API layer, while Razorpay is integrated for secure digital payment processing. Functional testing across 14 test cases demonstrated complete correctness of all core workflows including authentication, inventory deduction, and payment processing. Load testing on a modest cloud instance achieved 80 requests per second with P95 latency below 200 ms. A simulated user acceptance test with five participants yielded an average usability satisfaction score of 4.2 out of 5. FreshCart offers a practical, open-source, and deployable solution for modernizing local retail supply chains in emerging markets.
Introduction
This paper presents FreshCart, a full-stack B2B web platform designed to digitize procurement for India's kirana (small grocery) stores, which account for nearly 80% of the country's grocery distribution. Traditional kirana procurement relies heavily on phone calls, handwritten records, and messaging apps, leading to fragmented ordering, inventory inefficiencies, delivery delays, and high operating costs. FreshCart aims to solve these challenges by connecting retailers directly with distributors and wholesalers through a digital platform.
The platform is motivated by evidence that digital B2B supply chain networks improve retailer efficiency, reduce procurement costs, and strengthen coordination between buyers and suppliers. It also aligns with initiatives such as the Open Network for Digital Commerce (ONDC), which promotes digital inclusion of small merchants.
Problem Addressed
FreshCart targets five major issues in traditional kirana procurement:
Fragmented ordering from multiple suppliers through manual communication channels.
Inventory opacity, with no real-time visibility of stock levels and prices.
Unit and packaging confusion, requiring manual conversions between packs, cartons, and individual units.
Informal payment systems based on cash transactions and credit arrangements.
Lack of analytics, preventing demand forecasting and informed restocking decisions.
These inefficiencies increase operational costs and reduce competitiveness against organized retail and quick-commerce platforms.
System Architecture
FreshCart adopts a three-tier architecture:
Presentation Layer: A responsive web interface built with HTML5, CSS3, and JavaScript. Separate dashboards are provided for distributors and shopowners, supporting catalog browsing, inventory monitoring, order management, and tracking.
Application Layer: Built using Python Flask and organized into modules for authentication, product management, inventory, orders, and payments. JWT-based authentication and role-based access control ensure security.
Data Layer: Uses MySQL with a normalized database structure and SQLAlchemy ORM for secure database interactions. Payment processing is integrated through the official website of Razorpay.
Key Features
A distinguishing feature is the unit-sensitive inventory engine, which automatically converts product quantities between different units (e.g., packs, cartons, pieces) and validates stock availability before processing orders. Atomic database transactions ensure inventory consistency even during concurrent ordering.
The payment system follows a webhook-driven model where payment confirmation automatically updates order status and inventory records while preventing inconsistencies caused by failed transactions.
Evaluation Results
The system underwent comprehensive testing:
Functional Testing: All 14 test cases passed, covering authentication, inventory management, order processing, payment workflows, and security constraints.
Performance Testing: The platform handled approximately 80 requests per second on modest hardware while maintaining API response times below 200 milliseconds.
Security Testing: No SQL injection vulnerabilities were detected due to ORM-based query handling.
User Acceptance Testing: Five simulated kirana users successfully completed the ordering workflow. Average satisfaction ratings ranged from 3.8 to 4.4 out of 5, with users particularly valuing real-time stock visibility and automatic bulk discount calculations.
Benefits and Impact
FreshCart provides several advantages over traditional procurement methods:
Centralized digital ordering and record-keeping.
Real-time inventory and pricing visibility.
Reduced order errors through automated unit conversions.
Integrated digital payments.
Improved procurement efficiency through bulk-order consolidation.
Lower deployment costs through an open-source technology stack.
Scalability through a stateless API-driven architecture that can integrate with mobile applications and external commerce networks.
Conclusion
This paper presented FreshCart, a scalable B2B web platform for digitizing kirana supply chains in emerging markets. The system addresses fragmented procurement, unit confusion, inventory opacity, and informal payment through a modular Flask-MySQL architecture with role-based access control, a unit-sensitive inventory engine, and Razorpay payment integration. Functional testing confirmed correctness across all 14 test cases. Performance testing validated 80 RPS throughput with sub-200 ms P95 latency. User acceptance testing yielded a 4.2/5 satisfaction score from simulated kirana operators.
Future work will extend FreshCart with AI-based demand forecasting using time-series models trained on historical order data, complete UPI AutoPay integration for recurring orders, cloud deployment via Docker and Kubernetes for production-grade scalability, and ONDC protocol integration to expand the accessible supplier and retailer network. FreshCart establishes a practical, deployable foundation for modernizing the last mile of India\'s grocery supply chain.
References
[1] R. Kaur and G. Khanna, \"Reimagining Digital Commerce: Strategic Integration of FMCG Supply Chains with ONDC in India,\" Advances in Consumer Research, vol. 2, no. 2, pp. 1137–1145, Mar. 2025.
[2] A. I. Saragih and S. T. Ahmed, \"E-B2B Distribution Strategies for Fragmented Retail Environments: Saving India\'s Mom-and-Pop Stores,\" Supply Chain Management Review, May 2022.
[3] S. Iseal and W. Rahom, \"The Role of Digital Platforms in Supporting Small Business Growth,\" Int. J. Entrepreneurship Innovation, Feb. 2025.
[4] F. Jia, J. Guo, and L. Chen, \"Platformization in Operations and Supply Chain Management,\" Technovation, vol. 125, pp. 102–115, 2025.
[5] G. F. Massari, R. Nacchiero, and I. Giannoccaro, \"Transformative Supply Chains: The Enabling Role of Digital Technologies,\" Int. J. Prod. Econ., vol. 285, pp. 104–120, 2025.
[6] S. C. Dillibatcha, \"Microservices Architecture for E-Commerce Platforms: Enhancing Performance, Scalability, and Predictive Accuracy,\" Int. J. Creative Research Thoughts, vol. 13, no. 4, Apr. 2025.
[7] S. Kumar and D. Kumari, \"KIRANA 4.0: Measuring the Impact of Phygital Transformation of Small Retailers on BOP Consumer Behaviour,\" Int. J. Res. Mark. Manag. Sales, vol. 8, no. 1, pp. 114–119, 2026.