How magnusinst84-sudo/regenera-ledger works
Regenera Ledger is an ESG intelligence and regenerative-farmer offset marketplace. A company signs in, submits ESG material for forensic analysis, can add shipping-manifest data for Scope 3 review, calculates an emissions gap, then finds farmer projects to offset it; farmers can also submit data for AI estimation. The README documents these capabilities, while sampled source confirms the application entry points, authentication, Gemini client and manifest parsing. Detailed route-to-service wiring is not sampled, so those links reflect documented flows rather than inspected calls.
Main entry points: analysis.py Analysis endpoints · App.jsx Application routes · main.py FastAPI application · db.py Firestore access
Components 26
Web application
- Application routes
frontend/src/App.jsx - Company dashboard
frontend/src/pages/CompanyDashboard.jsx - ESG analysis
frontend/src/pages/ESGAnalysis.jsx - Scope 3 view
frontend/src/pages/Scope3Viz.jsx - Carbon gap
frontend/src/pages/CarbonGap.jsx - Project matching
frontend/src/pages/Matching.jsx - Farmer estimation
frontend/src/pages/FarmerEstimation.jsx - Session state
frontend/src/context/AuthContext.jsx
Identity and API
- Auth endpoints
backend/routes/auth.py - JWT access control
backend/middleware/auth.py - FastAPI application
backend/main.py - Audit endpoints
backend/routes/audit.py - Audit logging
backend/utils/audit_logger.py - Firestore access
backend/db.py
Carbon intelligence
- Analysis endpoints
backend/routes/analysis.py - PDF extraction
backend/data/parsers/pdf_extractor.py - Manifest parsing
backend/data/parsers/manifest_parser.py - Scope 3 processing
backend/data/processors/scope3_processor.py - Gap calculation
backend/data/matching/carbon_calculator.py - Gemini inference
backend/ai/gemini_client.py
Farmer marketplace
- Matching endpoints
backend/routes/matching.py - Farmer matching
backend/data/matching/farmer_matcher.py - Farmer endpoints
backend/routes/farmer.py
Other components
- Company user
- Farmer user
- Google Gemini
Connections 39
- Company user → Application routes: uses
- Farmer user → Application routes: uses
- Application routes → Company dashboard: routes to
- Application routes → ESG analysis: routes to
- Application routes → Scope 3 view: routes to
- Application routes → Carbon gap: routes to
- Application routes → Project matching: routes to
- Application routes → Farmer estimation: routes to
- Company user → Session state: signs in
- Farmer user → Session state: signs in
- Session state → Auth endpoints: requests auth
- Auth endpoints → JWT access control: issues tokens
- Auth endpoints → Firestore access: reads and writes
- FastAPI application → Auth endpoints: mounts
- FastAPI application → Analysis endpoints: mounts
- FastAPI application → Matching endpoints: mounts
- FastAPI application → Farmer endpoints: mounts
- FastAPI application → Audit endpoints: mounts
- ESG analysis → Analysis endpoints: submits report
- Analysis endpoints → PDF extraction: extracts text
- Analysis endpoints → Gemini inference: requests analysis
- Gemini inference → Google Gemini: calls model
- Analysis endpoints → Firestore access: stores results
- Analysis endpoints → Audit logging: records action
- Scope 3 view → Analysis endpoints: submits manifest
- Analysis endpoints → Manifest parsing: parses manifest
- Manifest parsing → PDF extraction: extracts PDF text
- Analysis endpoints → Scope 3 processing: processes supply chain
- Scope 3 view → Carbon gap: views emissions gap
- Analysis endpoints → Gap calculation: calculates gap
- Carbon gap → Matching endpoints: requests projects
- Matching endpoints → Farmer matching: finds farmers
- Matching endpoints → Firestore access: reads and writes
- Project matching → Matching endpoints: requests matches
- Farmer estimation → Farmer endpoints: submits farm data
- Farmer endpoints → Gemini inference: requests estimation
- Farmer endpoints → Firestore access: stores profile and estimate
- Audit endpoints → Firestore access: reads audit records
- Audit logging → Firestore access: writes audit records