How alexsegovia06/socoblocks-ui works
SocoBlocks UI is a React marketplace frontend. The main journey is browsing/filtering the catalog, viewing a set, authenticating when required, adding it to the server-backed cart, and checking out into an order; role-protected areas support collectors, sellers, and administrators. The graph preserves those role-specific capabilities and the local wishlist/collection and review-moderation features. Some page implementations were not sampled, so their internal calls are omitted; route relationships are supported by App.tsx and additional capabilities by the README.
Main entry points: App.tsx Route application · useCatalogo.ts Catalog data · ProductPage.tsx Set details · api.ts HTTP API wrapper
Components 26
App and access
- Route application
src/App.tsx - Shared layout
src/components/Layout/Layout.tsx
Marketplace commerce
- Catalog browsing
src/pages/CatalogPage/CatalogPage.tsx - Catalog data
src/catalogo/useCatalogo.ts - Set details
src/pages/ProductPage/ProductPage.tsx - Cart state
src/carrito/CarritoContext.tsx - Cart lines
src/carrito/useLineasCarrito.ts - Add to cart
src/carrito/useAgregarAlCarrito.ts - Checkout
src/pages/CheckoutPage/CheckoutPage.tsx - Order operations
src/pedidos/pedidos.ts
Accounts and lists
- Login and registration
src/pages/LoginPage/LoginPage.tsx - Session and JWT
src/auth/AuthContext.tsx - Role guards
src/auth/guards.tsx - Wishlist and collection
src/listas/useListaDeSets.ts
Role operations
- Collector pages
src/pages/user - Seller pages
src/pages/seller - Admin pages
src/pages/admin - Review moderation
src/resenas/useResenasOcultas.ts
Shared services
- HTTP API wrapper
src/api.ts - Toast notifications
src/toast/ToastContext.tsx - Set publication state
src/catalogo/useEstadoSets.ts
Other components
- Visitor
- Collector
- Seller
- Administrator
- Spring Boot backend
Connections 33
- Visitor → Route application: opens
src/App.tsx - Collector → Route application: opens
src/App.tsx - Seller → Route application: opens
src/App.tsx - Administrator → Route application: opens
src/App.tsx - Route application → Shared layout: wraps routes
src/App.tsx - Route application → Catalog browsing: routes to
src/App.tsx - Route application → Set details: routes to
src/App.tsx - Route application → Login and registration: routes to
src/App.tsx - Route application → Collector pages: role routes
src/App.tsx - Route application → Seller pages: role routes
src/App.tsx - Route application → Admin pages: role routes
src/App.tsx - Route application → Role guards: guards with
src/App.tsx - Catalog browsing → Catalog data: loads sets
src/pages/CatalogPage/CatalogPage.tsx - Set details → Catalog data: loads sets
src/pages/ProductPage/ProductPage.tsx - Set details → Add to cart: offers add
src/pages/ProductPage/ProductPage.tsx - Add to cart → Cart state: adds items
src/carrito/useAgregarAlCarrito.ts - Cart state → HTTP API wrapper: requests cart
src/carrito/CarritoContext.tsx - Cart lines → Cart state: reads items
src/carrito/useLineasCarrito.ts - Cart lines → Catalog data: joins catalog
src/carrito/useLineasCarrito.ts - Checkout → Cart lines: uses lines
src/pages/CheckoutPage/CheckoutPage.tsx - Checkout → Order operations: creates orders
src/pages/CheckoutPage/CheckoutPage.tsx - Login and registration → Session and JWT: authenticates
src/pages/LoginPage/LoginPage.tsx - Session and JWT → HTTP API wrapper: calls API
src/auth/AuthContext.tsx - Session and JWT → Spring Boot backend: auth endpoints
README.md - Catalog data → HTTP API wrapper: fetches catalog
src/catalogo/useCatalogo.ts - HTTP API wrapper → Spring Boot backend: sends requests
README.md - Collector pages → Wishlist and collection: uses lists
- Set details → Wishlist and collection: uses wishlist
src/pages/ProductPage/ProductPage.tsx - Admin pages → Review moderation: moderates reviews
src/pages/admin/AdminReviews/AdminReviews.tsx - Admin pages → Catalog data: reads catalog
src/pages/admin/AdminReviews/AdminReviews.tsx - Seller pages → Catalog data: reads catalog
src/pages/seller/SellerProducts/SellerProducts.tsx - Seller pages → Set publication state: changes status
src/catalogo/useEstadoSets.ts - Add to cart → Toast notifications: shows feedback
src/carrito/useAgregarAlCarrito.ts