nelsongpt
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.
A specialized medical AI assistant powered by the Nelson Textbook of Pediatrics, designed for healthcare professionals and medical students.
- π₯ 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
- 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
βββ 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
The following environment variables are configured:
VITE_MISTRAL_API_KEY
: Mistral API key for LLM responsesVITE_SUPABASE_URL
: Supabase project URLVITE_SUPABASE_ANON_KEY
: Supabase anonymous keyVITE_SUPABASE_SERVICE_ROLE_KEY
: Supabase service role keyVITE_HUGGINFACE_API_KEY
: Hugging Face API key for embeddings
- The app is configured as an HTTP val
- Visit the app URL to access Nelson-GPT
- Install as PWA on mobile devices for full-screen experience
- Chat with the AI assistant for pediatric medical queries
- Real-time streaming responses
- Message history
- Typing indicators
- Mobile-optimized input
- Service worker caching
- IndexedDB for message persistence
- Offline-first architecture
- RAG workflow with Nelson Textbook content
- Vector similarity search
- Evidence-based responses
- Pediatric specialization