# balajiyedida5929/medisnap-ai architecture

> Architecture diagram of the GitHub repository balajiyedida5929/medisnap-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/balajiyedida5929/medisnap-ai
- Repository: https://github.com/balajiyedida5929/medisnap-ai

## Overview

MediSnap AI is a Streamlit medicine-image information assistant. A user selects a language, uploads an image, and can add a question; on request, the app combines the image with its safety-oriented prompt and calls Gemini Vision. The app displays the model’s response or an identification/error message and a medical disclaimer. The sampled source shows this workflow in app.py, with prompt guidance in prompts.py. No separate persistence or medical-data subsystem is present.

Main entry points: [`app.py`](https://github.com/balajiyedida5929/medisnap-ai/blob/main/app.py) (Analysis Flow), [`prompts.py`](https://github.com/balajiyedida5929/medisnap-ai/blob/main/prompts.py) (Safety Prompt)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_streamlit_ui["Upload and Inputs<br/>[app.py]"]
  node_results["Results and Disclaimer<br/>[app.py]"]
end

subgraph group_analysis["Medicine Analysis"]
  node_analysis_flow["Analysis Flow<br/>[app.py]"]
  node_prompt_guidance["Safety Prompt<br/>[prompts.py]"]
end

subgraph group_external["External Services"]
  node_gemini["Gemini Vision"]
end

node_user(("User"))

node_user -->|"uploads image"| node_streamlit_ui
node_streamlit_ui -->|"starts analysis"| node_analysis_flow
node_analysis_flow -->|"uses guidance"| node_prompt_guidance
node_analysis_flow -->|"sends image and prompt"| node_gemini
node_analysis_flow -->|"displays response"| node_results

click node_streamlit_ui "https://github.com/balajiyedida5929/medisnap-ai/blob/main/app.py"
click node_analysis_flow "https://github.com/balajiyedida5929/medisnap-ai/blob/main/app.py"
click node_prompt_guidance "https://github.com/balajiyedida5929/medisnap-ai/blob/main/prompts.py"
click node_results "https://github.com/balajiyedida5929/medisnap-ai/blob/main/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit_ui,node_results,node_user toneBlue
class node_analysis_flow,node_prompt_guidance toneAmber
class node_gemini toneMint
```

## Components

### User Interface

- [Upload and Inputs](https://github.com/balajiyedida5929/medisnap-ai/blob/main/app.py): `app.py`
- [Results and Disclaimer](https://github.com/balajiyedida5929/medisnap-ai/blob/main/app.py): `app.py`

### Medicine Analysis

- [Analysis Flow](https://github.com/balajiyedida5929/medisnap-ai/blob/main/app.py): `app.py`
- [Safety Prompt](https://github.com/balajiyedida5929/medisnap-ai/blob/main/prompts.py): `prompts.py`

### External Services

- **Gemini Vision**

### Other components

- **User**

## Connections

- User → Upload and Inputs: uploads image (evidence: `README.md`)
- Upload and Inputs → Analysis Flow: starts analysis (evidence: `app.py`)
- Analysis Flow → Safety Prompt: uses guidance (evidence: `app.py`)
- Analysis Flow → Gemini Vision: sends image and prompt (evidence: `app.py`)
- Analysis Flow → Results and Disclaimer: displays response (evidence: `app.py`)
