How utkarshcodehub/proprompter works
ProPrompter turns a user's rough prompt into a model-aware Lean or Structured result, with quality and token metrics; Compare runs both modes. The frontend also supports sign-in and the README-described history, collections, dashboard, and community features. Those broader screens are represented by their documented paths, but their internal calls and Supabase data wiring were not shown, so the graph avoids asserting those relationships.
Main entry points: optimize.py Optimize and compare routes · config.py Runtime settings · main.py FastAPI application · page.jsx Optimize interface
Components 21
User experience
- Optimize interface
frontend/src/app/page.jsx - Speech input
frontend/src/components/MicButton.jsx - Prompt history
frontend/src/app/history/page.jsx - Collections
frontend/src/app/collections/page.jsx - Mode comparison
frontend/src/app/compare/page.jsx - Usage dashboard
frontend/src/app/dashboard/page.jsx - Community prompts
frontend/src/app/community/page.jsx
Identity
- Sign-in screen
frontend/src/app/login/page.jsx - Auth state
frontend/src/hooks/useAuth.js - OAuth callback
frontend/src/app/auth/callback/route.js - Supabase client
frontend/src/lib/supabase.js
Prompt API
- FastAPI application
backend/app/main.py - Optimize and compare routes
backend/app/routers/optimize.py - Request and result schemas
backend/app/schemas.py - Daily rate limits
backend/app/middleware/rate_limiter.py - Health endpoint
backend/app/routers/health.py - Runtime settings
backend/app/config.py
Optimization engine
- Prompt optimization
backend/app/services/groq_service.py
Other components
- Prompt author
- Supabase
- Groq LLM
Connections 22
- Prompt author → Optimize interface: submits prompt
README.md - Optimize interface → Speech input: uses input
frontend/src/app/page.jsx - Optimize interface → Optimize and compare routes: POSTs optimize
frontend/src/app/page.jsx - Mode comparison → Optimize and compare routes: requests compare
- Optimize and compare routes → Prompt optimization: runs optimization
backend/app/routers/optimize.py - Optimize and compare routes → Daily rate limits: checks quota
backend/app/routers/optimize.py - Optimize and compare routes → Request and result schemas: validates and returns
backend/app/routers/optimize.py - Prompt optimization → Groq LLM: calls model
backend/app/services/groq_service.py - FastAPI application → Optimize and compare routes: registers routes
backend/app/main.py - FastAPI application → Health endpoint: registers route
backend/app/main.py - FastAPI application → Runtime settings: configures app
backend/app/main.py - Daily rate limits → Runtime settings: reads limits
backend/app/middleware/rate_limiter.py - Health endpoint → Runtime settings: reads settings
backend/app/routers/health.py - Prompt optimization → Runtime settings: reads model settings
backend/app/services/groq_service.py - Sign-in screen → Auth state: uses auth
- Auth state → Supabase client: uses client
frontend/src/hooks/useAuth.js - Auth state → Supabase: auth operations
frontend/src/hooks/useAuth.js - OAuth callback → Supabase: exchanges session
frontend/src/app/auth/callback/route.js - Prompt history → Supabase: stores and reads prompts
- Collections → Supabase: manages collections
- Usage dashboard → Supabase: loads activity stats
- Community prompts → Supabase: community data