Skip to content

Commit 3ca9449

Browse files
committed
refactor(docs): simplify mdx to focus on showcase
1 parent dfd9f70 commit 3ca9449

File tree

1 file changed

+49
-192
lines changed

1 file changed

+49
-192
lines changed

docs/showcase/valetudo-ai.mdx

Lines changed: 49 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -3,200 +3,57 @@ title: Valetudo AI — Trusted Medical Answer Assistant
33
description: Sonar-powered medical assistant for fast, science-backed answers.
44
sidebar_position: 1
55
keywords: [medical, AI assistant, Perplexity Sonar]
6-
---
7-
6+
---
7+
88
# Valetudo AI
9-
10-
**Valetudo AI** is a Perplexity Sonar-powered assistant that delivers fast, reliable, and well-cited answers to medical questions. Designed for parents, patients, and students — it cuts through misinformation with smart filters, visual input, and prompt-based queries.
11-
12-
## Features
13-
14-
- **Answers with Citations:** Provides numbered scientific citations from a curated list of **10** trusted medical **sources**.
15-
- **Advanced Filtering:** Allows users to filter results **by date and country** to get the most relevant information.
16-
- **Image Upload:** Supports visual context for queries (e.g., **photos** of medications or conditions).
17-
- **Prompt Templates:** Includes **7 categories** of pre-built prompts for common medical questions:
18-
- Symptom-based advice
19-
- Drug interaction checks
20-
- Safety timing
21-
- Safer treatments
22-
- Compare effectiveness
23-
- Recommended exercises
24-
- Latest research
25-
- **Clean & Simple UI:** Built with React and Tailwind CSS for a **user-friendly** experience.
26-
27-
## Prerequisites
28-
29-
Before installing and running Valetudo AI locally, ensure you have the following installed:
30-
31-
- **Node.js** (tested with v22.15.0) and **npm** – for running the frontend (React + Vite)
32-
- **Python** (tested with v3.13.4) and **pip** – for the Flask backend
33-
- **Git** – to clone the repository
34-
- A valid **Perplexity API key** – required to query the Sonar API ([how to generate one](https://docs.perplexity.ai/getting-started/quickstart))
35-
- (Optional) **Virtual environment support** (e.g., `venv`) – for isolating Python dependencies
36-
- (Optional) A modern web browser (e.g., Chrome) – to access the app
37-
38-
## Installation
39-
40-
### 1. Clone the repo
41-
42-
```bash
43-
git clone https://github.com/vero-code/valetudo-ai.git
44-
cd valetudo-ai
45-
```
46-
47-
### 2. Set environment variables
48-
49-
Create a `.env` file inside the `/backend` folder with the following content:
50-
51-
`PERPLEXITY_API_KEY=your_api_key_here`
52-
53-
> Refer to `/backend/.env.example` for guidance.
54-
> Never commit your `.env` file to version control.
55-
56-
### 3. Start the frontend
57-
58-
```bash
59-
npm install
60-
npm run dev
61-
```
62-
63-
### 4. Start the backend
64-
65-
```bash
66-
cd backend
67-
python -m venv venv
68-
69-
# Activate virtual environment
70-
# On Windows:
71-
venv\Scripts\activate
72-
73-
# On macOS/Linux:
74-
source venv/bin/activate
75-
76-
pip install -r requirements.txt
77-
python app.py
78-
```
79-
80-
The app will be available at [http://localhost:5173](http://localhost:5173)
81-
82-
## Usage
83-
84-
Here are some ways to use Valetudo AI effectively:
85-
86-
### 1. Ask a health question
87-
88-
- Type a question like:
89-
_"What to do if a 5-year-old has a fever?"_
90-
- Click **"Ask AI"**
91-
- Expand the full answer
92-
- Hover over citation numbers to preview and copy links
93-
94-
### 2. Use filters
95-
96-
- Click **"Show advanced options"**
97-
- Set a custom **date range**
98-
- Choose a **country** to localize results
99-
100-
### 3. Upload an image
101-
102-
- Drag and drop or manually upload a photo (e.g., medication or condition)
103-
- Ask: _"What is this medication?"_
104-
- The AI will use image context in its response
105-
106-
### 4. Try prompt templates
107-
108-
- Click **"Try Prompts"**
109-
- Select one of **7 categories**
110-
- Fill in the fields and generate a ready-to-send query
111-
- Use the **follow-up input** to refine or expand the conversation
112-
113-
## Code Explanation
114-
115-
### Perplexity API Integration
116-
117-
Valetudo AI leverages the Sonar API to its full potential. The core Q&A functionality is powered by [Perplexity Sonar Pro API](https://docs.perplexity.ai).
118-
119-
| Feature | API Field | Usage |
120-
|-----------------------|------------------------------------|------------------------------------------------------------------------|
121-
| Search Context Size | `search_context_size: medium` | Balances depth and speed of the response for concise medical answers. |
122-
| Domain Filtering | `search_domain_filter` | Limits answers to a curated list of trusted medical domains. |
123-
| Image Upload | `image_url` | Enables visual-based questions like identifying medications or rashes. |
124-
| Date Filtering | `search_after/before_date_filter` | Allows users to narrow results by recency — useful for evolving topics.|
125-
| User Location Filter | `user_location` | Prioritizes sources or context relevant to the user's country. |
126-
127-
> These parameters enable precise control over search quality, scope, and context — especially useful in the medical domain.
128-
129-
### Project Structure
130-
131-
```
132-
valetudo-ai/
133-
134-
├── backend/ # Flask backend API
135-
├── public/ # Static files
136-
├── screenshots/ # UI Images
137-
├── src/
138-
│ ├── assets/ # Media resources
139-
│ ├── components/ # React components
140-
│ ├── constants/ # Mock data and templates
141-
│ ├── hooks/ # Custom React hooks
142-
│ ├── utils/ # Helper functions
143-
│ ├── App.jsx # Routes
144-
│ ├── index.css # Styles
145-
│ └── main.jsx # App entry point
146-
├── index.html # Main HTML file
147-
├── LICENSE # License file
148-
├── package.json # Dependencies
149-
├── README.md # Documentation
150-
└── vite.config.js # Vite config
151-
```
152-
153-
### Key Components
154-
155-
- `HeroSection` — main landing interface with input, filters, and image upload
156-
- `AskPage` — prompt-driven question builder with follow-up form
157-
- `QuickAnswerBox` — renders Sonar response with Markdown and citation links
158-
159-
### Security
160-
161-
- No user data is stored or tracked
162-
- API key is managed securely via `.env`
163-
164-
## Links
165-
166-
- [GitHub Repository](https://github.com/vero-code/valetudo-ai)
9+
10+
**Valetudo AI** is a science-backed medical assistant powered by the Perplexity Sonar API. It provides fast, clear, and well-cited answers to health questions — helping users cut through misinformation with filters, image analysis, and ready-made prompt templates.
11+
12+
Designed for conscious users — like parents, patients, and medical students — seeking reliable information.
13+
14+
## Features
15+
16+
- **Cited Answers** — sourced from a curated list of 10 trusted medical domains
17+
- **Smart Filters** — by date and country for localized, up-to-date insights
18+
- **Image Upload** — analyze photos of medication, conditions, or packaging
19+
- **Prompt Templates** — 7 categories for symptom checks, drug safety, research, and more
20+
- **Simple UI** — built with React and Tailwind CSS
21+
22+
## How It Uses the Sonar API
23+
24+
Valetudo AI integrates with [Perplexity Sonar Pro](https://docs.perplexity.ai), leveraging advanced features for domain-specific search and rich responses:
25+
26+
| Feature | API Field | Purpose |
27+
|-----------------------|------------------------------------|----------------------------------------------------|
28+
| Context Control | `search_context_size: medium` | Balances speed and depth for focused medical Q&A |
29+
| Trusted Domains | `search_domain_filter` | Restricts results to vetted health sources |
30+
| Visual Input | `image_url` | Enables image-based medical queries |
31+
| Freshness Filter | `search_after/before_date_filter` | Helps surface recent and relevant findings |
32+
| Local Relevance | `user_location` | Tailors answers based on user’s region |
33+
34+
## Links
35+
36+
- [GitHub Repository](https://github.com/vero-code/valetudo-ai)
16737
- [Devpost Submission](https://devpost.com/software/valetudo-ai)
168-
- [View More Screenshots](https://github.com/vero-code/valetudo-ai/tree/master/screenshots)
169-
170-
## Limitations
171-
172-
- Valetudo AI is **not a medical tool** — for informational purposes only.
173-
- **Response time** may vary depending on filters or image upload size.
174-
- **Mobile layout** is simplified; optimized for desktop use.
175-
- **Disclaimer**: Always consult a doctor for any clinical decisions.
176-
177-
## Demo Video
178-
179-
Curious how Valetudo AI works in action?
180-
Watch a short walkthrough here:
181-
182-
[![Watch the demo](https://img.youtube.com/vi/AX3nOh9LbTc/0.jpg)](https://www.youtube.com/watch?v=AX3nOh9LbTc)
183-
184-
## Screenshots
185-
186-
### Home Interface
187-
188-
<img src="https://github.com/vero-code/valetudo-ai/blob/master/screenshots/1-home.png" alt="Home screen" width="800" />
189-
190-
### Prompt Templates
191-
192-
<img src="https://github.com/vero-code/valetudo-ai/blob/master/screenshots/10-prompts.png" alt="Prompt templates" width="800" />
193-
194-
### Image Upload
195-
196-
<img src="https://github.com/vero-code/valetudo-ai/blob/master/screenshots/8-image-upload.png" alt="Image upload" width="800" />
197-
198-
### Date & Location Filters
199-
38+
- [View All Screenshots](https://github.com/vero-code/valetudo-ai/tree/master/screenshots)
39+
40+
## Demo Video
41+
42+
See Valetudo AI in action:
43+
[![Watch the demo](https://img.youtube.com/vi/AX3nOh9LbTc/0.jpg)](https://www.youtube.com/watch?v=AX3nOh9LbTc)
44+
45+
## Screenshots
46+
47+
### Home Interface
48+
<img src="https://github.com/vero-code/valetudo-ai/blob/master/screenshots/1-home.png" alt="Home screen" width="800" />
49+
50+
### Prompt Templates
51+
<img src="https://github.com/vero-code/valetudo-ai/blob/master/screenshots/10-prompts.png" alt="Prompt templates" width="800" />
52+
53+
### Image Upload
54+
<img src="https://github.com/vero-code/valetudo-ai/blob/master/screenshots/8-image-upload.png" alt="Image upload" width="800" />
55+
56+
### Date & Location Filters
20057
<img src="https://github.com/vero-code/valetudo-ai/blob/master/screenshots/7-date-filter.png" alt="Date filter" width="800" />
20158

20259
<img src="https://github.com/vero-code/valetudo-ai/blob/master/screenshots/9-location-filter.png" alt="Location filter" width="800" />

0 commit comments

Comments
 (0)