An AI-powered medical education chatbot designed for the College of Human Medicine's Shared Discovery Curriculum. This comprehensive assessment system helps medical students test their knowledge across all major medical topics with intelligent, contextual feedback.
- 10 Medical Topics: Cardiovascular, Respiratory, Renal, Endocrine, Gastrointestinal, Nervous System, Immunology, Microbiology, Biochemistry, Pharmacology
- 3 Difficulty Levels: Easy, Medium, Difficult assessments tailored to learning progress
- Curriculum Phases: M1, MCE (Mid-Curricular Exam), LCE (Longitudinal Curricular Exam) specific content
- AI-Powered Responses: OpenAI GPT-4o integration for intelligent, contextual feedback
- Modern UI: Clean, medical-themed interface with chat widget
- Conversation Persistence: Full chat history saved across sessions
- Offline Fallback: Robust fallback system when API is unavailable
- Comprehensive Testing: Multiple choice questions with detailed explanations
- Node.js (v18 or higher)
- PostgreSQL database
- OpenAI API key
-
Clone the repository:
git clone https://github.com/yourusername/JustInTimeMedicine-Chatbot.git cd JustInTimeMedicine-Chatbot -
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile in the root directory:DATABASE_URL=your_postgresql_connection_string OPENAI_API_KEY=your_openai_api_key
-
Run database migrations:
npm run db:push
-
Start the application:
npm run dev
-
Open your browser: Navigate to
http://localhost:5000
User: "Give me a cardiovascular test"
AI: Generates 5 multiple-choice questions about cardiovascular system with explanations
User: "I need a difficult biochemistry assessment"
AI: Creates advanced biochemistry questions appropriate for upper-level medical students
User: "MCE level respiratory questions"
AI: Provides Mid-Curricular Exam level respiratory system assessment
User: "Explain renal physiology"
AI: Provides comprehensive explanation with follow-up assessment questions
- React with TypeScript
- shadcn/ui components with medical blue theme
- TanStack React Query for state management
- Wouter for routing
- Tailwind CSS for styling
- Express.js with TypeScript
- Drizzle ORM with PostgreSQL
- OpenAI API integration
- Zod for validation
- RESTful API design
- Users: Authentication and profiles
- Conversations: Chat session tracking
- Messages: Individual chat messages with metadata
DATABASE_URL: PostgreSQL connection stringOPENAI_API_KEY: OpenAI API key for AI responsesNODE_ENV: Development/production environment
- Medical topics can be modified in
server/enhanced-knowledge-base.ts - UI theme colors in
client/src/index.css - Assessment difficulty levels in curriculum configuration
Run the test suite:
npm run testFor development testing:
npm run dev
# Application runs on http://localhost:5000The system includes comprehensive knowledge bases for:
- Basic Sciences: Anatomy, Physiology, Pathology, Pharmacology
- Clinical Systems: All major organ systems
- Specialties: Internal Medicine, Surgery, Pediatrics, OB/GYN
- Assessment Types: NBME-style questions, case-based scenarios
- Offline Mode: Pre-generated questions when API unavailable
- Error Handling: Graceful degradation with helpful error messages
- Content Backup: Local curriculum database for reliability
- Import repository to Replit
- Add environment variables in Secrets
- Click "Deploy" to publish
- Build the application:
npm run build - Set up PostgreSQL database
- Configure environment variables
- Deploy to your preferred platform (Vercel, Heroku, etc.)
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Developed for the College of Human Medicine's Shared Discovery Curriculum to enhance medical education through AI-powered assessments and interactive learning.
For questions about the medical content or technical issues, please open an issue on GitHub or contact the development team.
Built with ❤️ for medical education