How bobhuang666/ledger works
This is a web system for managing and exploring historical Shantou charity intake records. Users search or browse records, inspect multi-field statistics, and view analytics; search and statistics results can also be exported as Excel files. The React pages call a FastAPI backend, which reads the CSV record set and serves search, statistics, field, and analytics data. Analytics are cleaned and aggregated separately, then cached by the API layer. The graph reflects documented capabilities; backend excerpts are partial, so internal endpoint details not shown are grouped under the API module.
Main entry points: api.ts API client · App.tsx App routing · SearchPage.tsx Record search · StatsPage.tsx Multi-field statistics
Components 12
Web interface
- App routing
frontend/src/App.tsx - Record search
frontend/src/components/SearchPage.tsx - Multi-field statistics
frontend/src/components/StatsPage.tsx - Data visualization
frontend/src/components/VisualizationPage.tsx - API client
frontend/src/api/api.ts - Excel download
frontend/src/utils/download.ts - Pagination controls
frontend/src/components/Pagination.tsx
API services
- FastAPI endpoints
backend/main.py - Excel response
backend/main.py
Record analysis
- Analytics aggregation
backend/analytics_service.py
Record data
- Intake records
backend/data/people.csv
Other components
- Records user
Connections 17
- Records user → App routing: opens
- App routing → Record search: routes to
- App routing → Multi-field statistics: routes to
- App routing → Data visualization: routes to
- Record search → API client: requests search
- Multi-field statistics → API client: requests stats
- Data visualization → API client: requests analytics
- Record search → Pagination controls: uses controls
- Multi-field statistics → Pagination controls: uses controls
- API client → FastAPI endpoints: calls endpoints
- FastAPI endpoints → Intake records: reads records
- FastAPI endpoints → Analytics aggregation: requests overview
- Analytics aggregation → Intake records: aggregates records
- Record search → Excel download: downloads export
- Multi-field statistics → Excel download: downloads export
- API client → Excel response: requests export
- FastAPI endpoints → Excel response: builds workbook