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.
Viewing readonly version of main branch: v10View latest version
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