How acbayanbaja-spec/agrimarket works
AgriMarket is a multi-role agricultural marketplace with a web client, a native mobile client, and a shared Express REST backend backed by MySQL; the README also documents Socket.IO real-time functionality. The main buyer journey is product discovery, cart, checkout, and order tracking, alongside seller, delivery, admin, messaging, trade, and price-monitoring capabilities. The web route map and mobile store logic are excerpted; most backend and additional page implementations are not, so their internal links are limited to documented relationships.
Main entry points: App.tsx Web application · routes REST API · app Android application · StoreContext.tsx Mobile store state
Components 19
Client applications
- Web application
web/src/App.tsx - Android application
mobile/app
Marketplace workflows
- Commerce pages
web/src/pages - Mobile commerce
mobile/app - Web store state
web/src/context/StoreContext.tsx - Mobile store state
mobile/src/context/StoreContext.tsx - Mobile catalog
mobile/src/data/catalog.ts
Platform operations
- Seller management
web/src/pages/SellerDashboardPage.tsx - Admin oversight
web/src/pages/AdminDashboardPage.tsx - Delivery operations
web/src/pages/DeliveryDashboardPage.tsx - Social and trades
web/src/pages - Analytics and prices
web/src/pages
Backend services
- REST API
backend/src/routes - Authentication
backend/src/services/authService.ts - Real-time messaging
backend/src/sockets/index.ts
Persistence
- MySQL connection
backend/src/config/database.ts - MySQL database
- Mobile local storage
Other components
- Marketplace users
Connections 19
- Marketplace users → Web application: uses
- Marketplace users → Android application: uses
- Web application → Commerce pages: routes to
web/src/App.tsx - Web application → Seller management: routes to
web/src/App.tsx - Web application → Admin oversight: routes to
web/src/App.tsx - Web application → Delivery operations: routes to
web/src/App.tsx - Web application → Social and trades: routes to
web/src/App.tsx - Web application → Analytics and prices: routes to
web/src/App.tsx - Commerce pages → Web store state: uses state
- Android application → Mobile commerce: routes to
- Mobile commerce → Mobile store state: uses state
- Mobile store state → Mobile catalog: loads products
mobile/src/context/StoreContext.tsx - Web application → REST API: REST requests
- Android application → REST API: REST requests
- REST API → MySQL connection: queries
- MySQL connection → MySQL database: connects
backend/src/config/database.ts - REST API → Authentication: authenticates
- REST API → Real-time messaging: real-time events
- Mobile store state → Mobile local storage: reads and writes
mobile/src/context/StoreContext.tsx