How charan-143/medical works
Project type and purpose
• This is a full‑stack web application (“Medical Dashboard”) built with Flask.
• Purpose: manage and organize medical records, real‑time chat, PDF report generation, folder hierarchies, and AI‑powered features.
File structure
• Top‑level:
• app.py – Flask application entry point
• config.py – environment configurations
• extensions.py – initialization of Flask extensions (SQLAlchemy, SocketIO, WTForms, etc.)
• models.py – central SQLAlchemy model definitions
• migrations/ – database migration scripts
• requirements.txt – Python dependencies
• README.md
• Modular “blueprints/” directory with subpackages:
• auth/ – forms.py, models.py, routes.py for login, registration, profile
• chat/ – routes.py handling real‑time chat via Flask‑SocketIO
• dashboard/ – routes.py for record views, uploads, AI, PDF
• Static assets (JS, CSS, images, uploads) and Jinja2 HTML templates mirror blueprint modules.
README for additional insights
• Uses Flask‑Login, bcrypt, Flask‑WTF for security/forms.
• Real‑time comm via Flask‑SocketIO.
• File storage on local “static/uploads” and optional AWS S3 (boto3).
• PDF generation via pdfkit.
• AI integration with Google Generative AI API.
• Deployment under Gunicorn.
Elements
• Labels for each component (e.g., “Auth Blueprint”, “Chat Blueprint”, “SQLite DB”, “S3 Bucket”, “Google AI API”)
• HTTP request/response
• WebSocket events
• Database reads/writes
• External API calls
• Blue for backend components
• Green for external services
• Orange for database/storage
• Yellow for real‑time communication
Detail
• Break the Flask app into subcomponents (extensions, blueprints, models).
• For each blueprint, show key routes and their interactions with models and services.
• Which components talk to AWS S3 (uploads) vs. local storage.
• PDF generation flow from request to wkhtmltopdf engine to user download.
• AI integration call flow: dashboard controller → Google AI → response merged into view.