How mzubair31102/ai-portfolio works
This repository is a Flask-backed AI assistant template with two browser experiences: a conversational chat and a web-content generation page. Users submit messages from the frontend; the backend either maintains chat history and requests an Azure-hosted model response, or rewrites a query, obtains URLs, and scrapes page text. The backend also exposes PostgreSQL data and Redis test endpoints. The README describes Azure deployment and CI/CD, but those capabilities are not implemented in the supplied runtime tree. Relationships below follow the sampled app and JavaScript; unsampled deployment and schema details are omitted.
Main entry points: app.py Flask API · index.html Chat interface · jsscript.js Chat interaction · contentgen.html Content interface
Components 12
Browser experiences
- Chat interface
frontend/index.html - Chat interaction
frontend/jsscript.js - Content interface
frontend/contentgen.html - Content interaction
frontend/contentgen.js
Flask services
- Flask API
backend/app.py - URL search
backend/services/search_url.py - Page scraper
backend/services/scraper.py
External services and data
- Azure AI model
- Redis history
- PostgreSQL
Other components
- Assistant user
- Web pages
Connections 12
- Assistant user → Chat interface: uses
- Chat interface → Chat interaction: runs
frontend/jsscript.js - Chat interaction → Flask API: posts chat
frontend/jsscript.js - Assistant user → Content interface: uses
- Content interface → Content interaction: runs
frontend/contentgen.js - Content interaction → Flask API: posts content
frontend/contentgen.js - Flask API → Azure AI model: requests completion
backend/app.py - Flask API → Redis history: reads and writes
backend/app.py - Flask API → PostgreSQL: queries data
backend/app.py - Flask API → URL search: gets URLs
backend/app.py - Flask API → Page scraper: fetches text
backend/app.py - Page scraper → Web pages: fetches pages
backend/services/scraper.py