FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
zee1205

zee1205

nelsongpt

Public
Like
nelsongpt
Home
Code
4
backend
3
frontend
2
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 milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/4/2025
Viewing readonly version of main branch: v10
View latest version
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
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
Ā© 2025 Val Town, Inc.