How avi4748sinha/chitrai works
ChitrAI is a prompt-based image-generation web app. A user enters a description in the React interface; it posts the prompt to the FastAPI endpoint, which calls Cloudflare’s Flux image API and returns base64 image data for display. The backend also provides health and custom API-docs endpoints and serves static files. A Gemini client exists, but its source says it is currently unused; it is not part of the shown generation workflow. Relationships reflect the excerpts; no README was provided.
Main entry points: image_routes.py Image endpoint · App.jsx Prompt and preview · main.jsx React entry · main.py FastAPI app
Components 6
Web interface
- Prompt and preview
frontend/src/App.jsx - React entry
frontend/src/main.jsx
API backend
- FastAPI app
backend/main.py - Image endpoint
backend/image_routes.py
External services
- Cloudflare Flux
Other components
- User
Connections 7
- User → Prompt and preview: enters prompt
frontend/src/App.jsx - React entry → Prompt and preview: renders
frontend/src/main.jsx - Prompt and preview → Image endpoint: posts prompt
frontend/src/App.jsx - FastAPI app → Image endpoint: registers routes
backend/main.py - Image endpoint → Cloudflare Flux: sends prompt
backend/image_routes.py - Cloudflare Flux → Image endpoint: returns image
backend/image_routes.py - Image endpoint → Prompt and preview: returns image data
backend/image_routes.py