MedSync is a modern, AI-powered medical appointment platform that seamlessly connects patients with healthcare providers. Built with cutting-edge technology, it offers intelligent doctor recommendations, smart scheduling, interactive maps for finding nearby doctors, and AI-assisted prescription writingβall in one comprehensive healthcare solution.
Connecting Patients and Healthcare Providers with AI Intelligence
MedSync revolutionizes the way patients find and connect with doctors through intelligent technology, making healthcare more accessible and efficient for everyone.
- πΊοΈ Interactive Map: Find nearby doctors using Leaflet.js and OpenStreetMap
- π€ AI Doctor Recommendations: Get personalized doctor suggestions based on symptoms
- π Smart Scheduling: AI-optimized appointment booking with availability detection
- π Advanced Search: Filter by specialization, rating, distance, and experience
- π± Responsive Design: Seamless experience across all devices
- π Secure Authentication: JWT-based user authentication
- π Digital Prescriptions: Create and manage prescriptions
- π€ AI Prescription Assistant: Get diagnosis and medication suggestions
- π Appointment Management: View and manage patient appointments
- π₯ Patient Dashboard: Track patient history and visits
- Doctor Matching: Llama 3.3 70B model analyzes patient requirements
- Prescription Assistance: AI-generated diagnosis and medication recommendations
- Smart Scheduling: Intelligent time slot optimization
- Framework: React 18 + TypeScript
- Build Tool: Vite
- UI Library: shadcn/ui + Tailwind CSS
- Routing: React Router v6
- Maps: Leaflet.js + react-leaflet
- Animation: Framer Motion
- Forms: React Hook Form + Zod validation
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose
- Authentication: JWT + bcrypt
- File Upload: Cloudinary integration
- Security: Helmet, CORS, Rate Limiting
- Provider: Groq AI
- Model: Llama 3.3 70B Versatile
- SDK: groq-sdk
MedSync_JK1/
βββ backend/
β βββ src/
β β βββ controllers/ # Request handlers
β β βββ models/ # MongoDB schemas
β β βββ routes/ # API routes
β β βββ middlewares/ # Auth, validation, error handling
β β βββ validators/ # Input validation
β β βββ utils/ # Helper functions
β β βββ config/ # Database config
β βββ server.js # Entry point
β βββ Dockerfile # Docker configuration
β βββ .env.production # Production environment template
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/ # API services + Groq AI
β β βββ contexts/ # React Context (Auth)
β β βββ hooks/ # Custom hooks
β β βββ lib/ # Utilities
β βββ public/ # Static assets
β βββ Dockerfile # Docker configuration
β βββ nginx.conf # Nginx configuration
β βββ .env.production # Production environment template
βββ docker-compose.yml # Multi-container setup
βββ build.sh # Linux/Mac build script
βββ build.bat # Windows build script
βββ DEPLOYMENT_GUIDE.md # Comprehensive deployment guide
βββ GROQ_AI_INTEGRATION.md # AI features documentation
βββ PROJECT_DOCUMENTATION.md # Full project documentation
- Node.js 18+ and npm
- MongoDB (local or Atlas)
- Groq API key (for AI features)
-
Clone the repository
git clone <your-repo-url> cd MedSync_JK1
-
Install dependencies
# Install all dependencies npm run install:all # Or install separately cd backend && npm install cd ../frontend && npm install
-
Configure environment variables
Backend (
backend/.env):PORT=5000 MONGODB_URI=mongodb://localhost:27017/medsync JWT_SECRET=your_secret_key CLIENT_URL=http://localhost:8080
Frontend (
frontend/.env):VITE_API_URL=http://localhost:5000/api VITE_GROQ_API_KEY=your_groq_api_key
-
Run development servers
# Terminal 1 - Backend cd backend npm run dev # Terminal 2 - Frontend cd frontend npm run dev
-
Access the application
- Frontend: http://localhost:8080
- Backend API: http://localhost:5000
# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down# Backend
cd backend
docker build -t medsync-backend .
docker run -p 5000:5000 --env-file .env medsync-backend
# Frontend
cd frontend
docker build -t medsync-frontend .
docker run -p 8080:80 medsync-frontendbuild.batchmod +x build.sh
./build.sh# Backend
cd backend
npm install --production
# Frontend
cd frontend
npm install
npm run buildSee DEPLOYMENT_GUIDE.md for comprehensive deployment instructions including:
- Vercel + Render deployment
- Railway deployment
- Heroku deployment
- Docker deployment
- Environment configuration
- Security checklist
- Monitoring setup
See GROQ_AI_INTEGRATION.md for details on:
- AI doctor recommendations
- Smart prescription assistant
- Intelligent appointment scheduling
- Groq API configuration
- Fallback strategies
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current user
GET /api/doctors- Get all doctorsGET /api/doctors/:id- Get doctor by IDPOST /api/doctors- Create doctor (protected)
GET /api/appointments- Get appointments (protected)POST /api/appointments- Book appointment (protected)PUT /api/appointments/:id- Update appointment (protected)
GET /api/prescriptions- Get prescriptions (protected)POST /api/prescriptions- Create prescription (doctor only)
- JWT authentication with httpOnly cookies
- Password hashing with bcrypt
- Rate limiting on API endpoints
- CORS configuration
- Input validation and sanitization
- XSS protection
- MongoDB injection prevention
# Backend tests
cd backend
npm test
# Frontend tests
cd frontend
npm testThis project is licensed under the MIT License. See LICENSE for details.
Contributions are welcome! Please open an issue or submit a pull request for bug fixes, new features, or improvements.
- Fork the repository
- Create your feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add AmazingFeature' - Push to your branch
git push origin feature/AmazingFeature
- Open a Pull Request!
For issues and questions:
- Create an issue on GitHub
- Check existing documentation
- Review DEPLOYMENT_GUIDE.md or PROJECT_DOCUMENTATION.md
- Mobile app (React Native)
- Video consultations
- Payment integration
- Multi-language support
- Advanced analytics dashboard
- Email/SMS notifications
- Insurance integration
- Lighthouse Score: 95+
- First Contentful Paint: <1.5s
- Time to Interactive: <3s
- Optimized bundle size with code splitting
- Image optimization with Cloudinary
ASMIT SWAIN
- GitHub: @AsmitSwain27
- LinkedIn: Asmit Swain
- Portfolio Website: portfolio-asmit-swain.com
- Email: @asmitswain
- Groq AI for powerful LLM capabilities
- OpenStreetMap for free map data
- shadcn/ui for beautiful components
- MongoDB Atlas for database hosting
- React and Vite
- Leaflet.js for interactive maps
- Cloudinary for image management
