A blockchain-based prescription security platform that combines AI-powered verification with immutable blockchain records to ensure prescription authenticity and prevent fraud.
- 🔐 Blockchain Security: Immutable prescription records stored on the blockchain
- 🤖 AI Verification: Advanced AI algorithms for prescription authenticity detection
- 👥 Multi-Role Access: Secure access control for doctors, pharmacists, and administrators
- 📱 Modern UI: Beautiful, responsive interface built with React and Tailwind CSS
- 🔒 End-to-End Encryption: Military-grade encryption for sensitive patient data
- 📊 Real-time Analytics: Comprehensive dashboard with statistics and activity tracking
- Node.js with Express.js
- PostgreSQL with Prisma ORM
- Redis for caching and job queues
- JWT for authentication
- Blockchain integration with Ethereum/Polygon
- AI Services integration
- React 19 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- React Router for navigation
- Lucide React for icons
- Node.js 18+
- PostgreSQL 12+
- Redis 6+
- npm or yarn
git clone <repository-url>
cd MediChaincd backend
# Install dependencies
npm install
# Copy environment file
cp env.example .env
# Edit .env with your configuration
# DATABASE_URL, REDIS_URL, JWT_SECRET, etc.
# Set up database
npm run db:generate
npm run db:migrate
# Start the server
npm run devThe backend will be running on http://localhost:4000
cd Frontend-BlockChain
# Install dependencies
npm install
# Copy environment file
cp env.example .env
# Edit .env with your backend API URL
# VITE_API_BASE_URL=http://localhost:4000/api/v1
# Start the development server
npm run devThe frontend will be running on http://localhost:5173
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/medichain_db"
# JWT Secrets
JWT_SECRET="your-super-secret-jwt-key-here"
REFRESH_SECRET="your-super-secret-refresh-key-here"
# Redis
REDIS_URL="redis://localhost:6379"
# AI Service
GEMINI_API_KEY="your-gemini-api-key-here"
# AWS S3 (optional)
S3_BUCKET="medichain-prescriptions"
S3_REGION="us-east-1"
S3_ACCESS_KEY="your-s3-access-key"
S3_SECRET_KEY="your-s3-secret-key"
# Blockchain
RPC_URL="https://polygon-mumbai.infura.io/v3/your-project-id"
WALLET_PRIVATE_KEY="your-wallet-private-key"
CONTRACT_ADDRESS="your-smart-contract-address"
# CORS
CORS_ORIGIN="http://localhost:5173"
# Server
PORT=4000
NODE_ENV="development"VITE_API_BASE_URL=http://localhost:4000/api/v1POST /api/v1/auth/login- User loginPOST /api/v1/auth/register/doctor- Doctor registrationPOST /api/v1/auth/register/pharmacist- Pharmacist registrationPOST /api/v1/auth/logout- User logoutGET /api/v1/auth/me- Get current user
POST /api/v1/prescriptions/upload- Upload prescriptionGET /api/v1/prescriptions- Get prescriptionsPOST /api/v1/verify/prescription/:id- Verify prescription
POST /api/v1/ai/generate-prescription- Generate prescription
GET /api/v1/users- Get all usersGET /api/v1/users/doctors- Get verified doctors
- Generate digital prescriptions
- Upload prescription images
- View prescription history
- Access doctor directory
- Upload prescription images
- Verify prescription authenticity
- View verification history
- Access doctor directory
- All doctor and pharmacist permissions
- User management
- System analytics
- Admin panel access
cd backend
# Run tests
npm test
# Database operations
npm run db:studio # Open Prisma Studio
npm run db:migrate # Run migrations
npm run db:generate # Generate Prisma client
# Linting
npm run lintcd Frontend-BlockChain
# Build for production
npm run build
# Preview production build
npm run previewcd backend
# Build and run with Docker Compose
docker-compose up -d
# Or build manually
docker build -t medichain-backend .
docker run -p 4000:4000 medichain-backend- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the 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.
For support and questions, please open an issue in the GitHub repository or contact the development team.
- Mobile app development
- Advanced AI verification features
- Integration with more blockchain networks
- Real-time notifications
- Advanced analytics and reporting
- API rate limiting and monitoring
- Multi-language support