How mudst-2026-pegasus/pegasus-tcg-web works
Pegasus TCG Web is a React frontend for a trading-card marketplace. The main journey runs from public discovery and product/listing detail through cart and checkout, with account, payment, and after-sales stages; sellers manage shops, inventory, auctions, and orders, while admins oversee catalog, users, finance, and operations. The app router dispatches into role-aware route groups, feature modules call a separate API through shared client/query infrastructure, and shared layouts and UI present results. The README documents these capabilities; unsampled feature internals are represented at supported directory paths, without inferring their call relationships.
Main entry points: client.ts API client · public.routes.tsx Public routes · router.tsx Route dispatcher · seller.routes.tsx Seller routes
Components 25
App routing
- Browser entry
src/main.tsx - Route dispatcher
src/app/router.tsx - Public routes
src/app/routes/public.routes.tsx - Auth routes
src/app/routes/auth.routes.tsx - Seller routes
src/app/routes/seller.routes.tsx - Admin routes
src/app/routes/admin.routes.tsx
Marketplace
- Home discovery
src/features/home - Catalog and listings
src/features/catalog - Auctions
src/features/auction
Buyer services
- Sign-in and roles
src/features/auth - Cart and checkout
src/features/cart - Payment
src/features/payment - Account and orders
src/features/account - Returns and reviews
src/features/finance
Seller workspace
- Seller operations
src/features/seller
Administration
- Admin operations
src/features/admin
Shared platform
- API client
src/lib/api/client.ts - Layouts and UI
src/components/layout - Query states
src/components/common/QueryBoundary.tsx - Localization
src/lib/i18n/index.ts - Session bootstrap
src/lib/api/session.ts
Other components
- Shopper
- Seller
- Administrator
- Pegasus API
Connections 37
- Browser entry → Route dispatcher: mounts
src/main.tsx - Browser entry → Session bootstrap: bootstraps
src/main.tsx - Browser entry → Layouts and UI: provides app context
- Route dispatcher → Public routes: dispatches
src/app/router.tsx - Route dispatcher → Auth routes: dispatches
src/app/router.tsx - Route dispatcher → Seller routes: dispatches
src/app/router.tsx - Route dispatcher → Admin routes: dispatches
src/app/router.tsx - Public routes → Home discovery: loads pages
src/app/routes/public.routes.tsx - Public routes → Catalog and listings: loads pages
src/app/routes/public.routes.tsx - Public routes → Sign-in and roles: guards pages
src/app/routes/public.routes.tsx - Auth routes → Sign-in and roles: loads pages
src/app/routes/auth.routes.tsx - Seller routes → Sign-in and roles: role guards
src/app/routes/seller.routes.tsx - Seller routes → Seller operations: loads pages
src/app/routes/seller.routes.tsx - Admin routes → Sign-in and roles: role guards
src/app/routes/admin.routes.tsx - Admin routes → Admin operations: loads pages
src/app/routes/admin.routes.tsx - Shopper → Public routes: browses
- Seller → Seller routes: opens workspace
- Administrator → Admin routes: opens console
- Home discovery → API client: requests data
- Catalog and listings → API client: requests data
- Auctions → API client: requests data
- Cart and checkout → API client: requests data
- Payment → API client: requests data
- Account and orders → API client: requests data
- Returns and reviews → API client: requests data
- Seller operations → API client: requests data
- Admin operations → API client: requests data
- API client → Pegasus API: calls API
- Cart and checkout → Payment: continues checkout
- Payment → Account and orders: records purchase
- Account and orders → Returns and reviews: opens after-sales
- Seller operations → Auctions: manages auctions
- Public routes → Layouts and UI: uses layouts
src/app/routes/public.routes.tsx - Admin routes → Layouts and UI: uses layouts
- Seller routes → Layouts and UI: uses layouts
- Query states → Layouts and UI: renders states
src/components/common/QueryBoundary.tsx - Session bootstrap → Pegasus API: restores session