How amruthreddyyamasani/prediction-lab works
Prediction Lab is an AI forecasting workspace: users create measurable questions, generate structured forecasts, track and revise them, resolve outcomes, and review calibration analytics. The React pages call a tRPC API; its procedures coordinate forecast generation and user-scoped persistence. The README documents Gemini, Supabase-backed records, and an interactive observatory. Detailed page and database implementations were not sampled, so the graph follows documented capabilities and supported module paths without inferring finer internal wiring.
Main entry points: trpc.ts tRPC client · App.tsx React app · routers.ts Procedures · Home.tsx Ask forecast
Components 18
Forecasting workspace
- React app
client/src/App.tsx - Ask forecast
client/src/pages/Home.tsx - Forecast library
client/src/pages/Library.tsx - Prediction detail
client/src/pages/PredictionDetail.tsx - Calibration analytics
client/src/pages/Analytics.tsx - Categories
client/src/pages/Categories.tsx - Settings
client/src/pages/Settings.tsx - Observatory
client/src/components/ObservatoryField.tsx - tRPC client
client/src/lib/trpc.ts
Application API
- tRPC endpoint
api/trpc/[...path].ts - Procedures
server/routers.ts
Forecast domain
- Forecast generation
server/forecast.ts - Prediction operations
server/db.ts - Forecast records
server/db.ts
External services
- Gemini API
- Supabase
- Supabase Auth
Other components
- Forecaster
Connections 22
- Forecaster → React app: uses
- React app → Ask forecast: routes
- React app → Forecast library: routes
- React app → Prediction detail: routes
- React app → Calibration analytics: routes
- React app → Categories: routes
- React app → Settings: routes
- Ask forecast → tRPC client: requests
- Forecast library → tRPC client: requests
- Prediction detail → tRPC client: requests
- Calibration analytics → tRPC client: requests
- Categories → tRPC client: requests
- Settings → tRPC client: requests
- tRPC client → tRPC endpoint: sends
- tRPC endpoint → Procedures: dispatches
- Procedures → Forecast generation: generates
- Procedures → Prediction operations: operates
- Forecast generation → Gemini API: prompts
- Prediction operations → Forecast records: reads/writes
- Procedures → Supabase: uses
- Forecaster → Observatory: explores
- tRPC client → Supabase Auth: authenticates