How adnanak8/frontfix works
FrontFix AI is a frontend-support chatbot: a developer submits an error or question, the web client uses the FastAPI diagnostic endpoint when available, and displays a suggested fix with explanation and documentation reference. The backend sanitizes input, matches its knowledge data, and returns a diagnostic; the client can instead use local fallback knowledge when offline. The README also describes preset testing and React/SSR, network, JavaScript, CSS, and Hooks guidance. Sampled code supports the main API and diagnostic links; unsampled UI and preset details are represented only where documented.
Main entry points: engine.py Diagnostic engine · app.js Request handling · main.py HTTP API · index.html Chat interface
Components 17
Web client
- Chat interface
frontend/index.html - Client logic
frontend/app.js - Request handling
frontend/app.js - Offline matching
frontend/app.js - Fix display and copy
frontend/app.js - Offline knowledge
frontend/app.js
Diagnostic service
- HTTP API
backend/app/main.py - Diagnostic engine
backend/app/engine.py - Credential redaction
backend/app/engine.py - Pattern matching
backend/app/engine.py - Heuristic fallback
backend/app/engine.py - Preset listing
backend/app/engine.py
Knowledge and fixes
- Diagnostic knowledge
backend/app/knowledge.json - Code fix guidance
backend/app/knowledge.json - Documentation references
backend/app/knowledge.json
Other components
- Developer
- HTTP client
Connections 20
- Developer → Chat interface: enters query
README.md - Chat interface → Request handling: submits query
README.md - Request handling → HTTP client: posts diagnosis
frontend/app.js - HTTP client → HTTP API: calls endpoint
README.md - Request handling → Offline matching: falls back
frontend/app.js - Offline matching → Offline knowledge: matches locally
frontend/app.js - HTTP API → Diagnostic engine: calls diagnosis
backend/app/main.py - Diagnostic engine → Credential redaction: sanitizes input
backend/app/engine.py - Diagnostic engine → Pattern matching: matches patterns
backend/app/engine.py - Pattern matching → Diagnostic knowledge: reads knowledge
backend/app/engine.py - Diagnostic engine → Heuristic fallback: uses when unmatched
backend/app/engine.py - Diagnostic engine → Preset listing: lists presets
backend/app/main.py - HTTP API → Preset listing: requests presets
backend/app/main.py - Pattern matching → Code fix guidance: returns code fix
backend/app/engine.py - Pattern matching → Documentation references: returns references
backend/app/engine.py - Request handling → Fix display and copy: displays result
frontend/app.js - Offline matching → Fix display and copy: provides result
frontend/app.js - HTTP API → Request handling: returns result
- Fix display and copy → Developer: shows fix
README.md - Client logic → HTTP client: checks health
frontend/app.js