How prakash7474/b2p works
B2POnline is a vendor-network platform for shop profiles, products, inventory, sales, demand and restocking, with a mobile vendor portal and a manufacturer-facing web portal. The vendor workflow is account access, then shop operations such as inventory and demand requests, with forecasting and risk views supporting decisions; the documented backend exposes API endpoints and uses MongoDB. The README documents only a small subset of the API. Several portal and backend modules are unsampled, so their internal connections are omitted or marked unverified.
Main entry points: api.ts API client · main.py FastAPI service · (auth) Sign in / Sign up · auth.tsx Auth session
Components 16
Vendor mobile
- Sign in / Sign up
App/src/app/(auth) - Auth session
App/src/lib/auth.tsx - Shop dashboard
App/src/app/(vendor)/index.tsx - Inventory
App/src/app/(vendor)/inventory.tsx - Demand requests
App/src/app/(vendor)/demands.tsx - Demand forecast
App/src/app/(vendor)/forecast.tsx - Risk view
App/src/app/(vendor)/risk.tsx - Shop profile
App/src/app/(vendor)/profile.tsx - API client
App/src/lib/api.ts
Manufacturer web
- Manufacturer portal
admin-web/src/App.jsx
Backend services
- FastAPI service
backend/main.py - MongoDB collections
Forecast modeling
- Demand model training
model_code_and_data/train_demand_model.py - Spoilage model training
model_code_and_data/train_spoilage_model.py
Other components
- Vendor
- Manufacturer staff
Connections 15
- Vendor → Sign in / Sign up: opens account
- Sign in / Sign up → Auth session: authenticates
- Auth session → API client: calls API
App/src/lib/auth.tsx - Vendor → Shop dashboard: uses portal
- Shop dashboard → API client: loads dashboard data
App/src/app/(vendor)/index.tsx - Vendor → Inventory: manages stock
- Vendor → Demand requests: requests restock
- Vendor → Demand forecast: reviews forecast
- Vendor → Risk view: reviews risk
- Vendor → Shop profile: manages profile
- API client → FastAPI service: sends requests
- Manufacturer staff → Manufacturer portal: uses portal
- Manufacturer portal → FastAPI service: requests platform data
- FastAPI service → MongoDB collections: reads and writes
README.md - Demand model training → Demand forecast: may supply predictions