How kairo-2081/shopniro works
ShopNiro is a multi-vendor marketplace. Customers discover products, manage carts, check out through supported payment methods, and follow orders; sellers manage products and bundles, riders handle delivery, and admins oversee marketplace operations. The frontend’s shared API client communicates with an Express API, whose domain routes use PostgreSQL for marketplace state. The README documents Gemini assistance, seller approval, payouts, support, and scheduled order/refund work. Some frontend and route wiring is unsampled, so those documented capabilities are shown without speculative internal call chains.
Main entry points: app.ts HTTP API · api.ts API client · index.ts PostgreSQL · App.tsx Web application
Components 26
Marketplace experience
- Web application
src/App.tsx - Gemini assistant
src/components/chat/GeminiChatbot.tsx
Shopping and fulfillment
- Storefront
src/components/storefront/Storefront.tsx - Checkout
src/components/storefront/CheckoutModal.tsx - Customer orders
src/components/customer/CustomerOrders.tsx
Marketplace operations
- Seller dashboard
src/components/seller/SellerDashboard.tsx - Admin dashboard
src/components/admin/AdminDashboard.tsx - Rider dashboard
src/components/rider/RiderDashboard.tsx
API and domain services
- API client
src/lib/api.ts - HTTP API
server/app.ts - Session authentication
server/middleware/auth.ts - Orders and refunds
server/routes/orders.routes.ts - Payment processing
server/routes/payment.routes.ts - Product catalog
server/routes/products.routes.ts - AI assistance
server/routes/ai.routes.ts - Rider delivery
server/routes/rider-delivery.routes.ts - Product reviews
server/routes/reviews.routes.ts - Seller payouts
server/routes/payouts.routes.ts - Support requests
server/routes/support.routes.ts
Persistence and integrations
- PostgreSQL
server/db/index.ts - SSLCOMMERZ gateway
server/services/sslcommerz.service.ts - Gemini service
Other components
- Customer
- Seller
- Rider
- Admin
Connections 32
- Customer → Web application: shops
README.md - Seller → Seller dashboard: manages store
README.md - Admin → Admin dashboard: oversees marketplace
README.md - Rider → Rider dashboard: handles delivery
README.md - Web application → Storefront: renders
src/App.tsx - Customer → Storefront: discovers products
README.md - Storefront → Checkout: starts checkout
- Checkout → API client: requests checkout
src/components/storefront/CheckoutModal.tsx - Customer orders → API client: loads orders
src/components/customer/CustomerOrders.tsx - Seller dashboard → API client: manages listings
src/components/seller/SellerDashboard.tsx - Admin dashboard → API client: loads operations
src/components/admin/AdminDashboard.tsx - Rider dashboard → API client: updates delivery
- Web application → API client: uses
src/App.tsx - API client → HTTP API: sends HTTP requests
src/lib/api.ts - HTTP API → Session authentication: authenticates sessions
server/app.ts - HTTP API → Orders and refunds: routes order requests
server/app.ts - HTTP API → Payment processing: routes payment requests
server/app.ts - HTTP API → Product catalog: routes catalog requests
server/app.ts - HTTP API → AI assistance: routes AI requests
server/app.ts - HTTP API → Rider delivery: routes delivery requests
server/app.ts - HTTP API → Product reviews: routes review requests
server/app.ts - Orders and refunds → PostgreSQL: reads and writes
server/routes/orders.routes.ts - Payment processing → PostgreSQL: updates payment state
server/routes/payment.routes.ts - Payment processing → SSLCOMMERZ gateway: starts gateway payment
server/routes/payment.routes.ts - Product catalog → PostgreSQL: reads and writes
- Product reviews → PostgreSQL: reads and writes
server/routes/reviews.routes.ts - Rider delivery → PostgreSQL: reads and writes
server/routes/rider-delivery.routes.ts - Gemini assistant → API client: requests assistance
- AI assistance → PostgreSQL: loads marketplace context
server/routes/ai.routes.ts - AI assistance → Gemini service: requests AI response
- Seller payouts → PostgreSQL: records payouts
- Support requests → PostgreSQL: stores requests