A sophisticated healthcare platform that combines medical record management with AI-powered medical consultation services.
- 🔐 Secure Authentication System
- 📋 Medical Records Management
- 🤖 AI-Powered Medical Consultation
- 📱 Modern React Frontend
- 🔒 Django Backend with REST API
- 📄 PDF Report Generation
- 🎯 Real-time AI Responses
- React with TypeScript
- Tailwind CSS for styling
- Vite for build tooling
- PDF Generation capabilities
- Django REST Framework
- SQLite Database
- Ollama for AI integration
- Custom Authentication system
- Python 3.x
- Node.js and npm/yarn
- Ollama (for AI features)
- Navigate to the backend directory:
cd dr-ai/backend- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # For Unix/macOS
.\venv\Scripts\activate # For Windows- Install dependencies:
pip install -r requirements.txt- Run migrations:
python manage.py migrate- Start the Django server:
python manage.py runserver- Navigate to the frontend directory:
cd dr-ai/frontend- Install dependencies:
npm install- Start the development server:
npm run devbackend/
├── apps/
│ ├── ai_service/ # AI consultation service
│ ├── authentication/ # User authentication
│ ├── medical_records/ # Medical records management
│ └── utils/ # Utility functions
└── drai/ # Main Django project
frontend/
├── src/
│ ├── components/ # React components
│ ├── services/ # API services
│ └── utils/ # Utility functions
- Secure user registration and login
- Token-based authentication
- Role-based access control
- Create and manage patient records
- View medical history
- Generate PDF reports
- Real-time medical consultations
- Integration with Ollama
- Comprehensive response logging
# Backend tests
python manage.py test
# Frontend tests
npm testThe API endpoints are organized as follows:
/api/auth/- Authentication endpoints/api/medical-records/- Medical records management/api/ai-consultation/- AI consultation services
The system maintains comprehensive logs:
- AI response logs in
logs/ai_responses_*.log - System logs for debugging and monitoring
- Secure password hashing
- Token-based authentication
- CORS protection
- Environment variable configuration
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Mohammed hafeez
- Contact: mohamedhafeez.dev@gmail.com
- Thanks to all contributors
- Built with Django and React
- Powered by Ollama AI
Made with ❤️ for better healthcare management
.png)