A Progressive Web Application for medical image analysis with payment integration.
- User authentication and authorization
- Medical image analysis (DICOM, CT scans)
- Payment integration (Zarinpal, PayPal)
- Progressive Web App capabilities
- Offline functionality
- PDF report generation
- Admin dashboard
- Clone the repository:
git clone https://github.com/yourusername/med-pwa.git
cd med-pwa- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with the following variables:
SECRET_KEY=your-secret-key
DATABASE_URL=sqlite:///med_pwa.db
ZARINPAL_MERCHANT_ID=your-merchant-id
ZARINPAL_CALLBACK_URL=http://localhost:5000/payment/verify
PAYPAL_CLIENT_ID=your-paypal-client-id
PAYPAL_CLIENT_SECRET=your-paypal-client-secret
PAYPAL_MODE=sandbox- Initialize the database:
python run.pyRun the development server:
python run.pyThe application will be available at http://localhost:5000
- Install gunicorn:
pip install gunicorn- Run the application with gunicorn:
gunicorn wsgi:app- Installable on home screen
- Offline functionality
- Push notifications
- Responsive design
- Custom icons
- POST
/api/login- User login - POST
/api/verify-2fa- Verify two-factor authentication
- POST
/analyze- Analyze medical images - GET
/analysis/<scan_id>- Get analysis results - GET
/download_report/<scan_id>- Download analysis report
- POST
/payment/initiate- Initiate payment - GET
/payment/verify/<payment_id>- Verify payment - GET
/payment/history- View payment history
- Two-factor authentication
- Rate limiting
- JWT authentication
- Role-based access control
- Secure file uploads
- Data encryption
This project is licensed under the MIT License - see the LICENSE file for details.