How leoheinn/fontfinder works
Font Finder accepts a screenshot in a static browser page, sends it to a FastAPI endpoint, and returns a validated font category, family suggestions, and approximate size. The backend checks uploads and rate limits before calling Gemini, with model fallback and response validation; the page presents the result and links font names to Google Fonts. The frontend capabilities and request flow are documented in ReadMe.md; backend relationships reflect the shown endpoint and helper calls. The single-page implementation was not sampled, so its internal UI details are based on README descriptions.
Main entry points: main.py Detect endpoint · index.html Image input
Components 16
Browser experience
- Image input
index.html - Client checks
index.html - Progress status
index.html - Result card
index.html - Theme and reset
index.html - Font search links
index.html
API and safeguards
- Detect endpoint
backend/main.py - Upload validation
backend/main.py - Body and CORS limits
backend/main.py - Rate limiter
backend/main.py - Response parser
backend/main.py - Result schema
backend/main.py
Font inference
- Gemini fallback
backend/main.py
Other components
- User
- Google Fonts
- Gemini API
Connections 15
- User → Image input: adds image
ReadMe.md - Image input → Client checks: checks image
ReadMe.md - Client checks → Detect endpoint: posts upload
ReadMe.md - Detect endpoint → Upload validation: validates upload
backend/main.py - Detect endpoint → Rate limiter: checks limit
backend/main.py - Detect endpoint → Gemini fallback: requests analysis
backend/main.py - Gemini fallback → Gemini API: sends image
ReadMe.md - Gemini fallback → Response parser: parses reply
backend/main.py - Response parser → Result schema: validates fields
backend/main.py - Body and CORS limits → Detect endpoint: guards requests
backend/main.py - Detect endpoint → Progress status: waits for reply
ReadMe.md - Detect endpoint → Result card: returns result
ReadMe.md - User → Theme and reset: changes display
ReadMe.md - Result card → Font search links: links suggestions
ReadMe.md - Font search links → Google Fonts: opens search
ReadMe.md