How shreytiwari790-arch/redline_backup works
Redline is a contract-review application for freelancers. Users start a review, upload a contract, inspect an analysis in a dashboard, and can save or reopen contracts through the library. The dashboard separates risk review, summaries, suggestions, market comparisons, plain-language explanations, and negotiation guidance. The provided excerpts establish the frontend navigation, analysis state, authentication, and Firestore contract operations. Backend function files are listed but their implementation details are not shown, so their connections to the upload workflow are left unasserted.
Main entry points: Dashboard.tsx Review dashboard · App.tsx App navigation · AnalysisContext.tsx Analysis state · contracts.ts Contract records
Components 23
User experience
- App navigation
src/App.tsx - Landing page
src/screens/Landing.tsx - Contract upload
src/screens/Upload.tsx - Saved library
src/screens/Library.tsx
Contract review
- Analysis state
src/AnalysisContext.tsx - Sample analysis data
src/data.ts - Review dashboard
src/screens/Dashboard.tsx - Risk review
src/screens/dashboard/RisksTab.tsx - Summary view
src/screens/dashboard/SummaryTab.tsx - Protection suggestions
src/screens/dashboard/SuggestionsTab.tsx - Market comparison
src/screens/dashboard/MarketTab.tsx - Plain-language view
src/screens/dashboard/Eli5Tab.tsx - Negotiation guidance
src/screens/dashboard/NegotiateTab.tsx - Document viewer
src/components/DocumentViewer.tsx - Chat panel
src/components/ChatPanel.tsx
Identity and storage
- Sign-in modal
src/components/AuthModal.tsx - Authentication
src/auth/AuthContext.tsx - Firebase setup
src/lib/firebase.ts - Contract records
src/lib/contracts.ts - Firestore
Server functions
- Analysis function
netlify/functions/analyze.ts - Chat function
netlify/functions/chat.ts
Other components
- Freelancer
Connections 23
- Freelancer → Landing page: visits
src/screens/Landing.tsx - App navigation → Landing page: renders
src/App.tsx - App navigation → Contract upload: renders
src/App.tsx - App navigation → Review dashboard: renders
src/App.tsx - App navigation → Saved library: renders
src/App.tsx - App navigation → Sign-in modal: renders
src/App.tsx - App navigation → Analysis state: provides state
src/App.tsx - App navigation → Contract records: saves and loads
src/App.tsx - Sign-in modal → Authentication: requests sign-in
src/components/AuthModal.tsx - Authentication → Firebase setup: uses configuration
src/auth/AuthContext.tsx - Contract records → Firebase setup: uses connection
src/lib/contracts.ts - Contract records → Firestore: reads and writes
src/lib/contracts.ts - Analysis state → Sample analysis data: initializes from
src/AnalysisContext.tsx - Review dashboard → Analysis state: reads review state
src/screens/Dashboard.tsx - Review dashboard → Risk review: renders
src/screens/Dashboard.tsx - Review dashboard → Summary view: renders
src/screens/Dashboard.tsx - Review dashboard → Protection suggestions: renders
src/screens/Dashboard.tsx - Review dashboard → Market comparison: renders
src/screens/Dashboard.tsx - Review dashboard → Plain-language view: renders
src/screens/Dashboard.tsx - Review dashboard → Negotiation guidance: renders
src/screens/Dashboard.tsx - Review dashboard → Document viewer: renders
src/screens/Dashboard.tsx - Review dashboard → Chat panel: renders
src/screens/Dashboard.tsx - Risk review → Analysis state: reads review state
src/screens/dashboard/RisksTab.tsx