How cdac-toppers/auctxi works
Purpose and Runtime
AuctXII is a Vite-based React frontend for managing sports-style auctions, including users, teams, players, auctions, payments, reports, and role-specific dashboards. The repository contains no backend or infrastructure definitions; service modules indicate a planned HTTP API boundary. Primary browser entry: frontend/src/main.jsx; application root: frontend/src/App.jsx.
Application Composition
App.jsx is expected to assemble routing, global providers, and top-level layouts. Page implementations are organized by actor role and domain rather than a single shared feature tree:
• Admin: frontend/src/pages/admin/AdminDashboard.jsx, frontend/src/pages/admin/Auctions/Auctions.jsx
• Manager: frontend/src/pages/manager/ManagerDashboard.jsx, frontend/src/pages/manager/Players/Players.jsx
• Client: frontend/src/pages/client/ClientDashboard.jsx, frontend/src/pages/client/Payments/Payments.jsx
Authentication screens are isolated under frontend/src/pages/auth/Login.jsx and frontend/src/pages/auth/Signup.jsx.
Access Control and Session State
Authentication state is centralized in frontend/src/context/AuthContext.jsx. Protected page access is enforced through frontend/src/components/ProtectedRoute.jsx, with roles and route identifiers represented as constants in frontend/src/constants/roles.js and frontend/src/constants/routes.js. The intended control flow is login → auth context session/user state → protected-route authorization → role-specific route/layout.
Role-Specific Shells and Navigation
Distinct layout boundaries support admin, manager, client, dashboard, and authentication experiences:
frontend/src/layouts/AdminLayout.jsx, frontend/src/layouts/ManagerLayout.jsx, and frontend/src/layouts/ClientLayout.jsx.
Navigation structure is centrally declared in frontend/src/config/navigation.js. Sidebar UI state is independently managed through frontend/src/context/SidebarContext.jsx and frontend/src/hooks/useSidebar.js, allowing layouts to coordinate navigation presentation without coupling to auth state.
Domain Data and API Boundary
The domain is split into service adapters for auction, payment, player, team, and user operations:
frontend/src/services/api.js, frontend/src/services/auctionsService.js, frontend/src/services/paymentService.js.
These services are the material integration boundary for an external backend/API. Until or alongside backend integration, feature pages can consume local fixture datasets such as frontend/src/data/auctions.js, frontend/src/data/players.js, and frontend/src/data/payments.js. Status vocabularies are normalized in frontend/src/constants/auctionStatus.js and frontend/src/constants/paymentStatus.js.
Shared UI Behavior and Presentation
Cross-feature list interaction is encapsulated in reusable hooks for search, debouncing, and pagination: frontend/src/hooks/useSearch.js, frontend/src/hooks/useDebounce.js, and frontend/src/hooks/usePagination.js. A centralized visual system is defined by frontend/src/config/theme.js, frontend/src/index.css, and frontend/DESIGN_SYSTEM.md; utility formatting supports consistent currency and date rendering via frontend/src/utils/formatCurrency.js and frontend/src/utils/formatDate.js.
Build Boundary
The client is built and served by Vite, configured in frontend/vite.config.js, with package/runtime dependencies declared in frontend/package.json. Static browser assets reside in frontend/public; no deployment, database, queue, payment-provider, or server-side implementation is present in this tree.
Main entry points: AdminDashboard.jsx Role Dashboards & Pages · App.jsx App Root · ProtectedRoute.jsx Protected Route · AdminLayout.jsx Role Layouts
Components 18
Browser Runtime
- Vite · Builds and serves the React client.
frontend/vite.config.js - Browser Entry
frontend/src/main.jsx - App Root · Assembles providers, routing, and top-level layouts.
frontend/src/App.jsx
Access Control
- Auth Context · Centralizes authenticated user and session state.
frontend/src/context/AuthContext.jsx - Protected Route · Authorizes page access by session and role.
frontend/src/components/ProtectedRoute.jsx - Routes & Roles
frontend/src/constants/routes.js - Login & Signup
frontend/src/pages/auth/Login.jsx
Role Experiences
- Navigation Config
frontend/src/config/navigation.js - Sidebar State · Coordinates sidebar presentation independently of authentication.
frontend/src/context/SidebarContext.jsx - Role Layouts
frontend/src/layouts/AdminLayout.jsx - Role Dashboards & Pages · Admin, manager, and client experiences for auctions, players, and payments.
frontend/src/pages/admin/AdminDashboard.jsx - Shared List UI
frontend/src/hooks/useSearch.js - Theme & Styles
frontend/src/config/theme.js
Domain Data
- API Client · Planned external backend/API boundary.
frontend/src/services/api.js - Domain Services · Adapters for auction, payment, player, team, and user operations.
frontend/src/services/auctionsService.js - Local Fixtures · Fallback data for feature development.
frontend/src/data/auctions.js - Status Vocabularies
frontend/src/constants/auctionStatus.js - External Backend API · Not implemented in this repository.
Connections 18
- Vite → Browser Entry: serves
- Browser Entry → App Root: mounts
- App Root → Auth Context: provides
- App Root → Protected Route: defines routes with
- App Root → Login & Signup: routes to
- Protected Route → Auth Context: reads session
- Protected Route → Routes & Roles: checks
- Protected Route → Role Layouts: admits
- Role Layouts → Navigation Config: uses
- Role Layouts → Sidebar State: coordinates
- Role Layouts → Role Dashboards & Pages: hosts
- Role Dashboards & Pages → Shared List UI: uses
- Role Dashboards & Pages → Theme & Styles: renders with
- Role Dashboards & Pages → Domain Services: loads domain data
- Role Dashboards & Pages → Local Fixtures: may consume
- Role Dashboards & Pages → Status Vocabularies: uses statuses
- Domain Services → API Client: uses
- API Client → External Backend API: HTTP requests