FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
zee1205
zee1205nelsongpt
Public
Like
nelsongpt
Home
Code
4
backend
3
frontend
7
shared
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
README.md

Nelson-GPT - Medical AI Assistant PWA

A specialized medical AI assistant powered by the Nelson Textbook of Pediatrics, designed for healthcare professionals and medical students.

Features

  • 🏥 Medical AI assistant with evidence-based responses
  • 📱 Progressive Web App (PWA) with offline functionality
  • 💬 ChatGPT-like interface with real-time streaming responses
  • 🔍 RAG (Retrieval-Augmented Generation) workflow
  • 📚 Powered by Nelson Textbook of Pediatrics content
  • 🎨 Modern, clean UI with smooth transitions
  • 📲 Full-screen mobile experience
  • 🔔 Push notifications support

Tech Stack

  • Frontend: React + TypeScript + Tailwind CSS
  • Backend: Hono API framework
  • Database: Supabase with PGVector for vector search
  • AI: Mistral API for LLM responses
  • Embeddings: Hugging Face sentence-transformers
  • Animations: Lottie
  • PWA: Service Worker + IndexedDB

Project Structure

├── backend/
│   ├── index.ts           # Main API server
│   ├── routes/
│   │   ├── chat.ts        # Chat API endpoints
│   │   └── embeddings.ts  # Embedding generation
│   └── services/
│       ├── supabase.ts    # Supabase client
│       ├── mistral.ts     # Mistral API client
│       └── embeddings.ts  # HuggingFace embeddings
├── frontend/
│   ├── index.html         # Main HTML template
│   ├── index.tsx          # React entry point
│   ├── components/
│   │   ├── App.tsx        # Main app component
│   │   ├── SplashScreen.tsx
│   │   ├── ChatInterface.tsx
│   │   ├── Sidebar.tsx
│   │   └── MessageBubble.tsx
│   ├── hooks/
│   │   └── useChat.ts     # Chat functionality hook
│   ├── services/
│   │   ├── api.ts         # API client
│   │   └── offline.ts     # Offline storage
│   ├── manifest.json      # PWA manifest
│   └── sw.js             # Service worker
└── shared/
    └── types.ts          # Shared TypeScript types

Environment Variables

The following environment variables are configured:

  • VITE_MISTRAL_API_KEY: Mistral API key for LLM responses
  • VITE_SUPABASE_URL: Supabase project URL
  • VITE_SUPABASE_ANON_KEY: Supabase anonymous key
  • VITE_SUPABASE_SERVICE_ROLE_KEY: Supabase service role key
  • VITE_HUGGINFACE_API_KEY: Hugging Face API key for embeddings

Getting Started

  1. The app is configured as an HTTP val
  2. Visit the app URL to access Nelson-GPT
  3. Install as PWA on mobile devices for full-screen experience
  4. Chat with the AI assistant for pediatric medical queries

Features

Chat Interface

  • Real-time streaming responses
  • Message history
  • Typing indicators
  • Mobile-optimized input

Offline Support

  • Service worker caching
  • IndexedDB for message persistence
  • Offline-first architecture

Medical AI

  • RAG workflow with Nelson Textbook content
  • Vector similarity search
  • Evidence-based responses
  • Pediatric specialization
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.