How chris903224/merchandise-system works
SJC Merchandise is a student-focused school merchandise storefront with separate administrative and organization workflows. Students browse products, manage a cart, check out, pay online, and track orders; account features include authentication, profiles, favorites, and notifications. The React app routes users to these interfaces, while services connect the workflows to Supabase and payment/email integrations. Admin and organization interfaces support product, inventory, order, and payment operations. The map reflects the README and shown excerpts; unsampled subsystems are included where documented, but their internal calls are not inferred.
Main entry points: supabaseClient.ts Supabase Client · orders.ts Order Service · App.tsx Application Router · adminOrdersService.ts Admin Order Operations
Components 31
Student Storefront
- Catalog and Product Detail
src/pages/CatalogPage.tsx - Product Service
src/services/products.ts - Cart
src/pages/CartPage.tsx - Checkout
src/pages/CheckoutPage.tsx - Order History and Detail
src/pages/OrderDetailsPage.tsx - Order Service
src/services/orders.ts
Accounts and Preferences
- Registration and Login
src/services/authService.ts - Authentication Screens
src/pages/LoginPage.tsx - Profile and Settings
src/pages/ProfilePages.tsx - Profile Storage
src/data/storage.ts - Favorites
src/services/favorites.ts - Notifications
src/services/userNotifications.ts
Admin and Organization
- Administrative Console
src/pages/admin/DashboardPage.tsx - Admin Order Operations
src/services/admin/adminOrdersService.ts - Organization Workspace
src/pages/organization/DashboardPage.tsx - Organization Order Service
src/services/organization/orgOrderService.ts - Organization Products
src/services/organization/productService.ts
Application and Data
- Application Router
src/App.tsx - Application State
src/store.tsx - Supabase Client
src/lib/supabaseClient.ts - Supabase Data
- Browser Cache
src/utils/cache.ts
External Integrations
- Payment Flow
src/services/paymongo.ts - PayMongo API
api/paymongo/create-checkout.ts - Payment Verification
api/paymongo/verify.ts - Payment Webhook
api/webhooks/paymongo.ts - Order Email
api/notifications/send-order-email.ts - OTP Endpoint
api/send-otp.ts - Backend Server
server/server.ts - Brevo Email
Other components
- Student
Connections 34
- Student → Application Router: uses
README.md - Application Router → Catalog and Product Detail: routes to
src/App.tsx - Application Router → Checkout: routes to
src/App.tsx - Application Router → Order History and Detail: routes to
src/App.tsx - Application Router → Authentication Screens: routes to
src/App.tsx - Catalog and Product Detail → Product Service: loads products
- Product Service → Supabase Client: queries
src/services/products.ts - Product Service → Browser Cache: uses cache
src/services/products.ts - Checkout → Payment Flow: starts payment
- Payment Flow → PayMongo API: requests checkout
- PayMongo API → Payment Flow: PayMongo checkout
README.md - Payment Verification → Payment Flow: verifies payment
- Payment Webhook → Order Service: updates payment
- Checkout → Order Service: submits order
- Order Service → Supabase Client: persists orders
- Order History and Detail → Order Service: loads order
src/pages/OrderDetailsPage.tsx - Authentication Screens → Registration and Login: authenticates
- Registration and Login → Supabase Client: uses auth
src/services/authService.ts - Profile and Settings → Profile Storage: updates profile
- Profile Storage → Supabase Client: reads and writes
src/data/storage.ts - Application State → Order Service: updates orders
src/store.tsx - Application State → Notifications: creates alerts
src/store.tsx - Administrative Console → Admin Order Operations: manages orders
- Admin Order Operations → Order Service: loads and updates
src/services/admin/adminOrdersService.ts - Admin Order Operations → Product Service: loads products
src/services/admin/adminOrdersService.ts - Admin Order Operations → Notifications: triggers status alerts
src/services/admin/adminOrdersService.ts - Organization Workspace → Organization Order Service: manages orders
- Organization Workspace → Organization Products: manages products
- Organization Order Service → Supabase Client: accesses data
src/services/organization/orgOrderService.ts - Organization Order Service → Notifications: triggers order alerts
src/services/organization/orgOrderService.ts - Order Email → Brevo Email: sends email
README.md - OTP Endpoint → Brevo Email: sends OTP
- Backend Server → Supabase Client: backend access
- Supabase Client → Supabase Data: persists application data
README.md