How yasubdemissie/urbanmart-swift-deliveries works
UrbanMart is a full-stack commerce and delivery platform. Customers browse products, manage a cart, check out, and track orders; authentication and role-based dashboards support customer, admin, merchant, and delivery workflows. The React application routes users to domain pages and uses a shared API client to reach Express route modules backed by Prisma. The README documents the major product capabilities, while several frontend pages and backend route implementations were not sampled, so those documented relationships are shown without asserting unverified internal calls.
Main entry points: App.tsx React app router · index.ts Express app · api.ts API client · auth.ts Auth and user routes
Components 27
Customer storefront
- React app router
src/App.tsx - Browse catalog
src/pages/Shop.tsx - Product details
src/pages/ProductDetail.tsx - Checkout
src/pages/Checkout.tsx - Order tracking
src/pages/TrackOrder.tsx
Identity and cart
- Sign in and profile
src/pages/SignIn.tsx - Auth state
src/hooks/useAuth.ts - Cart state
src/context/cartContext.tsx
Role dashboards
- Admin workflows
src/pages/Admin.tsx - Merchant workflows
src/components/Merchant/MerchantPage.tsx - Delivery workflows
src/pages/DeliveryDashboard.tsx - Delivery organization
src/pages/DeliveryOrgDashboard.tsx
Express API
- Express app
server/src/index.ts - Auth and user routes
server/src/routes/auth.ts - Catalog routes
server/src/routes/products.ts - Cart and order routes
server/src/routes/orders.ts - Admin and reports
server/src/routes/admin.ts - Merchant routes
server/src/routes/merchant.ts - Delivery routes
server/src/routes/delivery.ts - Delivery org routes
server/src/routes/delivery-org.ts - Reviews
server/src/routes/reviews.ts
Shared infrastructure
- API client
src/lib/api.ts - JWT and role checks
server/src/middleware/auth.ts - Request validation
server/src/utils/validation.ts - Prisma client
server/src/lib/prisma.ts - PostgreSQL
Other components
- Customer
Connections 39
- Customer → React app router: uses
src/App.tsx - React app router → Browse catalog: routes to
src/App.tsx - React app router → Checkout: routes to
src/App.tsx - React app router → Order tracking: routes to
src/App.tsx - React app router → Sign in and profile: routes to
src/App.tsx - React app router → Admin workflows: routes to
src/App.tsx - React app router → Merchant workflows: routes to
src/App.tsx - React app router → Delivery workflows: routes to
src/App.tsx - React app router → Delivery organization: routes to
src/App.tsx - Customer → Product details: views
- Customer → Cart state: manages
- Checkout → Cart state: uses
src/pages/Checkout.tsx - Sign in and profile → Auth state: submits auth
- Auth state → API client: calls
src/hooks/useAuth.ts - Checkout → API client: submits order
src/pages/Checkout.tsx - Product details → Cart state: adds items
- Browse catalog → API client: fetches catalog
- Order tracking → API client: requests status
- Admin workflows → API client: requests admin data
- Merchant workflows → API client: requests merchant data
src/components/Merchant/MerchantPage.tsx - Delivery workflows → API client: requests delivery data
- Delivery organization → API client: requests assignments
- API client → Express app: HTTP requests
src/lib/api.ts - Express app → Auth and user routes: mounts
server/src/index.ts - Express app → Catalog routes: mounts
server/src/index.ts - Express app → Cart and order routes: mounts
server/src/index.ts - Express app → Admin and reports: mounts
server/src/index.ts - Express app → Merchant routes: mounts
server/src/index.ts - Express app → Delivery routes: mounts
server/src/index.ts - Express app → Delivery org routes: mounts
server/src/index.ts - Express app → Reviews: mounts
server/src/index.ts - Auth and user routes → JWT and role checks: authenticates
server/src/routes/auth.ts - Auth and user routes → Request validation: validates
server/src/routes/auth.ts - Reviews → JWT and role checks: authorizes
server/src/routes/reviews.ts - Reviews → Request validation: validates
server/src/routes/reviews.ts - JWT and role checks → Prisma client: checks user
server/src/middleware/auth.ts - Auth and user routes → Prisma client: queries
server/src/routes/auth.ts - Reviews → Prisma client: queries
server/src/routes/reviews.ts - Prisma client → PostgreSQL: persists data