Advanced HCV stage detection powered by artificial intelligence
Features โข Quick Start โข Architecture โข Contributing โข License
- About
- Features
- Architecture
- Quick Start
- Installation
- Usage
- API Documentation
- Contributing
- Testing
- Deployment
- License
- Disclaimer
HepatoCAI is a comprehensive web-based platform designed to provide accessible and informative resources related to Hepatitis C (HCV). The platform leverages artificial intelligence to offer educational content, AI-assisted information, and showcases the potential of AI-powered diagnostic tools.
- Individuals seeking general information about Hepatitis C
- Patients or those at risk looking for resources and understanding
- Healthcare professionals interested in AI applications in HCV diagnostics
- Researchers exploring AI-driven healthcare solutions
- Interactive AI assistant powered by Google's Gemini API
- Provides educational information about Hepatitis C
- Real-time Q&A with safety disclaimers
- Multilingual support capabilities
- Conceptual AI diagnostic tool for HCV stage detection
- Blood sample parameter analysis framework
- Clinical decision support interface
- Future ML model integration ready
- AI-generated illustrations using Google's Imagen API
- Modern, responsive Material-UI design
- Professional healthcare-focused aesthetics
- Interactive animations and transitions
- Comprehensive HCV educational resources
- Blog system for articles and research updates
- Patient stories and expert opinions
- Up-to-date medical information
- JWT-based authentication
- Secure API endpoints
- Medical data protection measures
- GDPR compliance ready
HepatoCAI/
โโโ frontend/ # React + Vite application
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โโโ pages/ # Application pages
โ โ โโโ services/ # API integration
โ โ โโโ hooks/ # Custom React hooks
โ โโโ public/ # Static assets
โโโ backend/ # Django REST API
โ โโโ aiassistant/ # AI assistant module
โ โโโ diagnosis/ # Diagnostic tools
โ โโโ users/ # User management
โ โโโ utils/ # Shared utilities
โ โโโ tests/ # Test modules
โโโ docs/ # Project documentation
Frontend:
- React.js 18+ with Vite
- Material-UI (MUI) for component library
- TanStack Query for state management
- Axios for API communication
- TypeScript support
Backend:
- Django 5.2+ with Django REST Framework
- JWT authentication
- Google AI APIs (Gemini & Imagen)
- PostgreSQL/SQLite database
- Comprehensive logging system
AI Integration:
- Google Gemini API for text generation
- Google Imagen API for image generation
- Custom AI model integration framework
- Node.js 18+ and npm
- Python 3.11+
- Git
git clone https://github.com/hirok121/HepatoCAI.git
cd HepatoCAI
cd backend
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
cd frontend
npm install
npm run dev
Visit http://localhost:5173
to see the application running.
Backend Issues:
- Database errors: Run
python manage.py migrate
to apply migrations - Missing API keys: Ensure
GOOGLE_API_KEY
is set in backend/.env - CORS errors: Add your frontend URL to
CORS_ALLOWED_ORIGINS
Frontend Issues:
- API connection failed: Check
VITE_API_BASE_URL
in frontend/.env.local - Build failures: Clear node_modules and reinstall:
rm -rf node_modules && npm install
- Port conflicts: Change port in vite.config.js or use
npm run dev -- --port 3000
Development Tips:
- Backend logs are in
backend/logs/
- Use
python manage.py shell
for Django debugging - Check browser console for frontend errors
- API documentation available at
http://localhost:8000/api/docs/swagger/
For detailed installation instructions, see:
// Example AI assistant usage
const response = await fetch("/aiassistant/chats/{chat_id}/messages/", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
message: "What are the symptoms of Hepatitis C?",
}),
});
# Example diagnostic API usage
curl -X POST http://localhost:8000/diagnosis/analyze-hcv/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"alt": 45,
"ast": 38,
"bilirubin": 1.2,
"albumin": 4.0
}'
๐ Complete Documentation Hub - Your one-stop guide to all HepatoCAI documentation
Get Started | Learn More | Deploy |
---|---|---|
๐ Installation | ๐ User Guide | ๐ Deployment |
โ FAQ | ๐๏ธ Architecture | ๐งช Testing |
๐ API Docs | ๐ค Contributing | ๐ Security |
Document | Description |
---|---|
๐ค Contributing | Developer contribution guidelines |
๐ Security | Security policy and vulnerability reporting |
๐ Changelog | Version history and release notes |
- API Documentation:
- Swagger UI:
http://localhost:8000/api/docs/swagger/
- ReDoc:
http://localhost:8000/api/docs/redoc/
- Schema:
http://localhost:8000/api/schema/
- Swagger UI:
Endpoint | Method | Description |
---|---|---|
/aiassistant/chats/ |
GET/POST | List/create AI chat sessions |
/aiassistant/chats/{chat_id}/messages/ |
POST | Send message to AI assistant |
/diagnosis/analyze-hcv/ |
POST | HCV diagnostic analysis |
/users/profile/ |
GET/PUT | User profile management |
/accounts/token/ |
POST | User authentication |
/accounts/token/refresh/ |
POST | Token refresh |
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow PEP 8 for Python code
- Use ESLint configuration for JavaScript/React
- Write comprehensive tests
- Document all public APIs
cd backend
python manage.py test
cd frontend
npm run test
# Run full test suite
npm run test:integration
The application is configured for deployment on Render for both frontend and backend:
- Backend: Django REST API as Render Web Service
- Frontend: React application as Render Static Site
- Database: PostgreSQL managed database on Render
- Frontend: https://hepatocai.onrender.com
- Backend API: https://hepatocai-backend.onrender.com
- API Documentation: https://hepatocai-backend.onrender.com/api/docs/swagger/
Both services use render.yaml
configuration files:
backend/render.yaml
- Backend web service configurationfrontend/render.yaml
- Frontend static site configuration
For detailed deployment instructions, see DEPLOYMENT.md.
Both frontend and backend require environment configuration:
Backend (.env):
cp backend/.env.example backend/.env
# Edit backend/.env with your API keys and database settings
Frontend (.env.local):
cp frontend/.env.example frontend/.env.local
# Edit frontend/.env.local with your API URLs and configuration
Key environment variables:
GOOGLE_API_KEY
- Required for AI featuresSECRET_KEY
- Django secret keyVITE_API_BASE_URL
- Backend API URL for frontend
This project is licensed under the MIT License - see the LICENSE file for details.
Important Medical Disclaimer:
This application provides general information about Hepatitis C for educational purposes only. It is not intended to be a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.
The AI diagnostic tool is conceptual and should not be used for actual medical diagnosis. Any implementation would require proper medical validation, regulatory approval, and compliance with healthcare standards.
Made with โค๏ธ for better healthcare through AI
ยฉ 2025 HepatoCAI. All rights reserved.