Skip to content

alizare84/MED

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medical Analysis PWA

A Progressive Web Application for medical image analysis with payment integration.

Features

  • 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

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/med-pwa.git
cd med-pwa
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file 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
  1. Initialize the database:
python run.py

Development

Run the development server:

python run.py

The application will be available at http://localhost:5000

Production Deployment

  1. Install gunicorn:
pip install gunicorn
  1. Run the application with gunicorn:
gunicorn wsgi:app

PWA Features

  • Installable on home screen
  • Offline functionality
  • Push notifications
  • Responsive design
  • Custom icons

API Documentation

Authentication

  • POST /api/login - User login
  • POST /api/verify-2fa - Verify two-factor authentication

Image Analysis

  • POST /analyze - Analyze medical images
  • GET /analysis/<scan_id> - Get analysis results
  • GET /download_report/<scan_id> - Download analysis report

Payment

  • POST /payment/initiate - Initiate payment
  • GET /payment/verify/<payment_id> - Verify payment
  • GET /payment/history - View payment history

Security Features

  • Two-factor authentication
  • Rate limiting
  • JWT authentication
  • Role-based access control
  • Secure file uploads
  • Data encryption

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published