How francis1009/esports-dashboard works
Project Type and Purpose
• This is a single‐page, front‑end dashboard application built with React (using Vite + TypeScript) that visualizes static CSV data via D3.js. It runs entirely in the browser, fetching CSV files from the public folder, and is typically deployed as a static site (e.g., on Vercel).
Main Components
a. Client Browser (User)
b. React SPA
• Routing Layer (src/routes)
• UI Components (Navbar, Sidebar, Charts, UI primitives)
• Custom Hooks (e.g., useLocalStorage)
• Utility Library (src/lib/utils.ts)
c. Data Layer
• Static CSV files (public/data)
• Media assets (public/esports.webm)
d. Build & Dev Tooling
• Vite (vite.config.ts) & TypeScript (tsconfig.json)
• ESLint, npm / package.json
e. Deployment
• Vercel configuration (vercel.json)
Relationships and Interactions
• Browser loads index.html → bootstraps main.tsx → React root → renders routes & components.
• Components request static CSVs via HTTP GET (public/data/*.csv).
• CSV data passed into D3-based chart components → interactive visualizations.
• UI events (filters, sliders) update component state and re‑render charts.
• Custom hook useLocalStorage persists user settings.
• Build pipeline (Vite) bundles TSX/CSS into static assets.
Architectural Patterns & Design Principles
• Single‑Page Application (SPA) with client‑side routing.
• Component‑based hierarchy: generic UI primitives → composed chart components → page layouts.
• Separation of concerns:
• Routing layer (src/routes)
• Presentation (src/components/ui)
• Visualization logic (src/components/charts)
• Data utilities (src/lib, hooks)
• Static data hosting for simplicity and performance.