How rajesh18112006/ipl-ace-league works
Purpose and Entry Points
This is a client-side TypeScript application for IPL match tracking: match entry, today’s schedule, player views, leaderboard, and analytics. The bootstrap path is src/main.tsx, which renders the application root in src/App.tsx; index.html is the browser document entry point.
Application Shell and Navigation
src/components/AppLayout.tsx provides the shared page shell, while src/components/NavLink.tsx centralizes navigation-link behavior. Page-level screens are organized under src/pages/, including src/pages/Home.tsx, src/pages/TodayMatches.tsx, and src/pages/NotFound.tsx. src/App.css and src/index.css provide application/global styling boundaries.
Match and Schedule Domain
The match workflow is centered on src/pages/MatchEntry.tsx, which likely captures or updates match outcomes/scores. Domain calculations belong in src/lib/match-scoring.ts, and IPL fixture/schedule data is isolated in src/lib/ipl-schedule.ts. Shared domain contracts are defined in src/lib/types.ts, separating UI pages from scoring and schedule representations.
Data Persistence and Firebase Boundary
src/lib/firebase.ts is the external-service integration boundary for Firebase. src/lib/storage.ts provides a separate persistence abstraction, likely for browser-local state or cached data. Pages and analytics logic should consume these modules rather than directly coupling to Firebase or browser storage.
Analytics and Ranking Views
src/pages/Analytics.tsx presents derived performance/reporting data, with calculations or event handling centralized in src/lib/analytics.ts. src/pages/Leaderboard.tsx represents comparative rankings, while src/pages/Players.tsx provides player-focused views. These screens depend on the shared scoring, types, and persistence layers rather than owning domain logic.
UI Component System
Reusable interface primitives reside in src/components/ui/, including controls, overlays, tables, charts, and navigation elements such as src/components/ui/chart.tsx, src/components/ui/table.tsx, and src/components/ui/sidebar.tsx. Feature pages compose these primitives; the UI library should remain presentation-oriented and avoid IPL-specific rules.
Runtime and Delivery
The repository is a Vite-based frontend, configured through vite.config.ts, with TypeScript configuration in tsconfig.app.json. Tailwind/PostCSS styling infrastructure is represented by tailwind.config.ts and postcss.config.js. vercel.json indicates deployment configuration for Vercel. Browser testing is configured via playwright.config.ts, and unit-test setup via vitest.config.ts.
Main entry points: App.tsx App root · MatchEntry.tsx Match entry · Analytics.tsx Analytics, leaderboard & players · main.tsx Application bootstrap
Components 18
Browser Runtime
- Browser document
index.html - Application bootstrap
src/main.tsx
Application
- App root
src/App.tsx - Shared app shell
src/components/AppLayout.tsx - Navigation links
src/components/NavLink.tsx - Core screens · Home, today’s matches, and fallback screens.
src/pages/Home.tsx - Match entry
src/pages/MatchEntry.tsx - Analytics, leaderboard & players
src/pages/Analytics.tsx
IPL Domain & Data
- Domain contracts
src/lib/types.ts - Match scoring
src/lib/match-scoring.ts - IPL schedule
src/lib/ipl-schedule.ts - Analytics logic
src/lib/analytics.ts - Persistence abstraction · Keeps application code independent of storage implementation.
src/lib/storage.ts - Firebase integration
src/lib/firebase.ts
UI System
- Reusable UI primitives · Charts, tables, sidebar, controls, and overlays.
src/components/ui/chart.tsx - Application styles
src/App.css
Build & Delivery
- Vite build
vite.config.ts - Vercel deployment
vercel.json
Connections 22
- Browser document → Application bootstrap: loads
- Application bootstrap → App root: renders
- App root → Shared app shell: uses
- Shared app shell → Navigation links: hosts
- App root → Core screens: routes to
- App root → Match entry: routes to
- App root → Analytics, leaderboard & players: routes to
- Match entry → Match scoring: calculates with
- Match entry → IPL schedule: uses fixtures
- Match entry → Persistence abstraction: reads and writes
- Analytics, leaderboard & players → Analytics logic: derives reports with
- Analytics, leaderboard & players → Match scoring: uses scoring
- Analytics, leaderboard & players → Persistence abstraction: reads data
- Match scoring → Domain contracts: uses models
- Analytics logic → Domain contracts: uses models
- Persistence abstraction → Firebase integration: integrates with
- Core screens → Reusable UI primitives: composes
- Match entry → Reusable UI primitives: composes
- Analytics, leaderboard & players → Reusable UI primitives: renders with
- App root → Application styles: styled by
- Vite build → Application bootstrap: builds
- Vercel deployment → Vite build: deploys build