How alexrosario/delegatorfrontend works
This is a React civic-engagement app for browsing legislation and representatives, comparing congressional votes, and encouraging constituent contact. The main flow routes users into bill discovery or representative views; signed-in users also get personalized voting and representative data. Bill cards support voting and contact-message drafting, while representative cards show alignment and donor information. Relationships below use the excerpts and SOURCE INDEX references; several component internals were not sampled, so those links are omitted rather than assumed.
Main entry points: api.tsx Request client · BillProvider.tsx Bill state and feeds · App.tsx Main application · main.tsx Route entry
Components 23
App and identity
- Route entry
src/main.tsx - Authentication state
src/providers/AuthProvider.tsx - Registration and sign-in
src/auth-components/Register.tsx - Main application
src/App.tsx - Screen selection
src/providers/ScreenProvider.tsx
Legislation and voting
- Bill sections
src/components/BillComponents/BillSection.tsx - Bill discovery
src/components/BillComponents/BillDiscover.tsx - Bill state and feeds
src/providers/BillProvider.tsx - Bill details
src/components/BillComponents/BillCard.tsx - Bill voting
src/components/BillComponents/VoteButtons.tsx - Vote control
src/components/BillComponents/VoteButton.tsx - Constituent contact
src/components/BillComponents/ComButton.tsx
Representative insights
- Member data
src/providers/MemberProvider.tsx - Representative sections
src/components/RepComponents/RepSection.tsx - Representative profile
src/components/RepComponents/RepCard.tsx - Campaign donors
src/components/RepComponents/RepDonors.tsx - Vote alignment
src/hooks/useAlignment.ts
Data and domain logic
- Request client
src/api.tsx - Roll-call parsing
src/utils/parser-utils.ts - Bill passage rules
src/utils/passage-utils.ts - Bill facets
src/constants/billFacets.ts
Other components
- Visitor
- Application API
Connections 42
- Visitor → Route entry: opens
src/main.tsx - Route entry → Main application: routes to
src/main.tsx - Route entry → Registration and sign-in: routes to
src/main.tsx - Registration and sign-in → Request client: submits credentials
src/auth-components/Register.tsx - Registration and sign-in → Authentication state: updates session
src/auth-components/Register.tsx - Route entry → Authentication state: provides state
src/main.tsx - Route entry → Screen selection: provides state
src/main.tsx - Main application → Screen selection: reads selection
src/App.tsx - Main application → Authentication state: reads user
src/App.tsx - Main application → Bill sections: renders bills
src/App.tsx - Main application → Representative sections: renders reps
src/App.tsx - Main application → Bill state and feeds: provides bill state
src/App.tsx - Main application → Member data: provides member state
src/App.tsx - Bill sections → Bill discovery: renders
src/components/BillComponents/BillSection.tsx - Bill sections → Bill state and feeds: reads state
src/components/BillComponents/BillSection.tsx - Bill discovery → Bill details: renders
src/components/BillComponents/BillDiscover.tsx - Bill discovery → Bill state and feeds: reads and updates
src/components/BillComponents/BillDiscover.tsx - Bill discovery → Request client: fetches bills
src/components/BillComponents/BillDiscover.tsx - Bill discovery → Bill facets: uses filters
src/components/BillComponents/BillDiscover.tsx - Bill state and feeds → Request client: loads bill data
src/providers/BillProvider.tsx - Bill state and feeds → Authentication state: personalizes requests
src/providers/BillProvider.tsx - Bill state and feeds → Bill facets: selects queries
src/providers/BillProvider.tsx - Bill details → Bill voting: renders
src/components/BillComponents/BillCard.tsx - Bill details → Constituent contact: renders
src/components/BillComponents/BillCard.tsx - Bill voting → Request client: records votes
src/components/BillComponents/VoteButtons.tsx - Bill voting → Vote control: renders
src/components/BillComponents/VoteButtons.tsx - Bill voting → Bill state and feeds: reads vote state
src/components/BillComponents/VoteButtons.tsx - Constituent contact → Request client: submits messages
src/components/BillComponents/ComButton.tsx - Constituent contact → Member data: uses representatives
src/components/BillComponents/ComButton.tsx - Constituent contact → Bill state and feeds: uses vote history
src/components/BillComponents/ComButton.tsx - Representative sections → Member data: reads members
src/components/RepComponents/RepSection.tsx - Representative sections → Representative profile: renders
src/components/RepComponents/RepSection.tsx - Member data → Request client: loads representatives
src/providers/MemberProvider.tsx - Member data → Authentication state: loads for user
src/providers/MemberProvider.tsx - Representative profile → Vote alignment: calculates alignment
src/components/RepComponents/RepCard.tsx - Representative profile → Campaign donors: renders donor view
src/components/RepComponents/RepCard.tsx - Vote alignment → Request client: fetches vote logs
src/hooks/useAlignment.ts - Vote alignment → Bill state and feeds: compares bill votes
src/hooks/useAlignment.ts - Vote alignment → Bill passage rules: infers disposition
src/hooks/useAlignment.ts - Request client → Application API: sends requests
src/api.tsx - Request client → Roll-call parsing: parses roll calls
src/api.tsx - Application API → Request client: returns data