How dakshchaudhary2668/galaxy-tools-hub works
Galaxy Tools Hub is an industrial e-commerce platform. Shoppers browse products, build a cart, and check out; the API validates pricing and stock, creates an order, reserves inventory, and coordinates payment. Administrators manage the catalog and product images, while the README also documents authentication, RBAC, and a broader set of operational domains. The graph combines documented architecture with relationships visible in sampled source and the SOURCE INDEX; unsampled feature internals and some frontend-to-API calls are not expanded.
Main entry points: payment.controller.ts Checkout and payment · product.routes.ts Product routes · index.ts API routes · order.service.ts Order lifecycle
Components 24
Web storefront
- Storefront pages
apps/web/src/app/page.tsx - Catalog browsing
apps/web/src/app/products/page.tsx - Cart state
apps/web/src/store/useCartStore.ts - Checkout UI
apps/web/src/app/checkout/page.tsx - Web API services
apps/web/src/services/api.ts - Customer and admin access
apps/web/src/contexts/AuthContext.tsx
API request layer
- Express API
apps/server/src/server.ts - API routes
apps/server/src/routes/index.ts - Authentication and RBAC
apps/server/src/middlewares/auth.middleware.ts - Product routes
apps/server/src/routes/product.routes.ts - Other API domains
apps/server/src/routes
Commerce services
- Checkout and payment
apps/server/src/controllers/payment.controller.ts - Checkout pricing
apps/server/src/services/payment.service.ts - Order lifecycle
apps/server/src/services/order.service.ts - Inventory reservations
apps/server/src/services/inventory.service.ts - Payment finalization
apps/server/src/services/payment-finalization.service.ts
Catalog management
- Product handling
apps/server/src/controllers/product.controller.ts - Product persistence
apps/server/src/repositories/product.repository.ts - Image upload handling
apps/server/src/controllers/storage.controller.ts - Object storage access
apps/server/src/repositories/storage.repository.ts
Other components
- Shopper
- Administrator
- Razorpay
- Supabase database and storage
Connections 30
- Shopper → Storefront pages: browses
- Storefront pages → Catalog browsing: opens catalog
- Shopper → Catalog browsing: browses
- Shopper → Cart state: adds items
- Cart state → Checkout UI: provides cart
apps/web/src/app/checkout/page.tsx - Shopper → Checkout UI: checks out
- Checkout UI → Web API services: requests payment
apps/web/src/app/checkout/page.tsx - Web API services → Express API: HTTP requests
- Express API → API routes: mounts routes
apps/server/src/server.ts - API routes → Product routes: dispatches
- Product routes → Product handling: routes requests
apps/server/src/routes/product.routes.ts - Product routes → Authentication and RBAC: guards admin routes
apps/server/src/routes/product.routes.ts - Administrator → Product routes: manages catalog
- Product handling → Product persistence: queries catalog
apps/server/src/controllers/product.controller.ts - Product persistence → Supabase database and storage: reads and writes
apps/server/src/repositories/product.repository.ts - Image upload handling → Product persistence: checks product
apps/server/src/controllers/storage.controller.ts - Image upload handling → Object storage access: requests upload URL
apps/server/src/controllers/storage.controller.ts - Object storage access → Supabase database and storage: uses storage
apps/server/src/repositories/storage.repository.ts - Checkout and payment → Checkout pricing: calculates checkout
apps/server/src/controllers/payment.controller.ts - Checkout and payment → Order lifecycle: creates order
apps/server/src/controllers/payment.controller.ts - Checkout and payment → Inventory reservations: reserves stock
apps/server/src/controllers/payment.controller.ts - Checkout and payment → Razorpay: creates payment order
apps/server/src/controllers/payment.controller.ts - Checkout and payment → Payment finalization: finalizes payment
apps/server/src/controllers/payment.controller.ts - Order lifecycle → Inventory reservations: reserves or releases
apps/server/src/services/order.service.ts - Order lifecycle → Supabase database and storage: persists orders
- Payment finalization → Supabase database and storage: updates payment state
apps/server/src/services/payment-finalization.service.ts - Payment finalization → Razorpay: verifies payment
- API routes → Other API domains: routes requests
- Shopper → Customer and admin access: signs in
- Administrator → Customer and admin access: signs in