Medico is a comprehensive healthcare platform that bridges the gap between patients, healthcare providers, and medical services. Built with cutting-edge technology, it offers a seamless, secure, and intuitive experience for all healthcare needs.
- Find Doctors: Advanced search system to find specialists based on specialty, location, and availability
- Book Appointments: Seamless appointment scheduling with real-time availability
- Virtual Consultations: Secure video consultations with healthcare providers
- Medical History: Comprehensive medical history tracking and management
- Medicine Orders: Online medicine ordering with doorstep delivery
- Emergency Services: Quick access to ambulance services with real-time tracking
- Health Feed: Personalized health articles and medical updates
- Patient Management: Efficient patient record management system
- Appointment Dashboard: Streamlined appointment handling and scheduling
- Digital Prescriptions: Easy-to-use digital prescription system
- Analytics Dashboard: Insights into patient demographics and consultation patterns
- Secure Messaging: HIPAA-compliant communication system with patients
- Real-time Ambulance Tracking: GPS-enabled ambulance tracking
- Quick Response System: Automated dispatch system for emergencies
- Emergency Contact Management: Easy access to emergency contacts
graph TD
A[Web Application] --> D[API Gateway]
B[Mobile App] --> D
C[Doctor's Portal] --> D
D --> E[Backend Services]
style A fill:#74b9ff
style B fill:#74b9ff
style C fill:#74b9ff
style D fill:#74b9ff
style E fill:#74b9ff
graph TB
subgraph "Frontend"
A1[Next.js Web App]
A2[Mobile Apps]
end
subgraph "Backend Services"
B1[Patient Service]
B2[Doctor Service]
B3[Appointment Service]
B4[Emergency Service]
end
subgraph "Data Storage"
C1[PostgreSQL]
C2[Redis Cache]
C3[File Storage]
end
A1 & A2 --> B1 & B2 & B3 & B4
B1 & B2 & B3 & B4 --> C1 & C2 & C3
style A1 fill:#74b9ff
style A2 fill:#74b9ff
style B1 fill:#74b9ff
style B2 fill:#74b9ff
style B3 fill:#74b9ff
style B4 fill:#74b9ff
style C1 fill:#74b9ff
style C2 fill:#74b9ff
style C3 fill:#74b9ff
sequenceDiagram
Patient->>+Web App: Book Appointment
Web App->>+Backend: Check Availability
Backend->>+Database: Query Slots
Database-->>-Backend: Available Slots
Backend-->>-Web App: Show Options
Web App-->>-Patient: Display Slots
Patient->>+Web App: Confirm Booking
Web App->>+Backend: Create Appointment
Backend->>+Database: Save Booking
Database-->>-Backend: Confirmed
Backend-->>-Web App: Success
Web App-->>-Patient: Confirmation
graph TD
A[Next.js App] --> B[Pages & Components]
B --> C[State Management]
B --> D[API Integration]
subgraph "UI Layer"
B --> E[Radix UI Components]
B --> F[Tailwind Styling]
end
subgraph "Data Layer"
C --> G[Redux Store]
C --> H[React Query]
end
style A fill:#74b9ff
style B fill:#74b9ff
style C fill:#74b9ff
style D fill:#74b9ff
style E fill:#74b9ff
style F fill:#74b9ff
style G fill:#74b9ff
style H fill:#74b9ff
graph TD
A[FastAPI] --> B[Authentication]
A --> C[Core Services]
A --> D[Data Access]
subgraph "Service Layer"
C --> E[Patient Management]
C --> F[Appointment System]
C --> G[Emergency Services]
end
subgraph "Storage Layer"
D --> H[PostgreSQL]
D --> I[Redis Cache]
D --> J[S3 Storage]
end
style A fill:#74b9ff
style B fill:#74b9ff
style C fill:#74b9ff
style D fill:#74b9ff
style E fill:#74b9ff
style F fill:#74b9ff
style G fill:#74b9ff
style H fill:#74b9ff
style I fill:#74b9ff
style J fill:#74b9ff
# Clone repository
git clone https://github.com/medico/platform
# Start with Docker
docker-compose up
# Access applications
Web: http://localhost:3000
API: http://localhost:8000graph TD
A[Security Layer] --> B[Authentication]
A --> C[Authorization]
A --> D[Data Protection]
B --> E[JWT Tokens]
B --> F[OAuth2]
C --> G[Role-Based Access]
D --> H[Encryption]
D --> I[HIPAA Compliance]
style A fill:#74b9ff
style B fill:#74b9ff
style C fill:#74b9ff
style D fill:#74b9ff
style E fill:#74b9ff
style F fill:#74b9ff
style G fill:#74b9ff
style H fill:#74b9ff
style I fill:#74b9ff
- Framework: Next.js 14 with App Router
- State Management:
- Redux Toolkit for global state
- React Query for server state
- UI Components:
- Radix UI for accessible components
- Tailwind CSS for styling
- Custom animations with Framer Motion
- Real-time Features:
- WebSocket integration for chat and notifications
- Server-Sent Events for real-time updates
- API Framework: FastAPI with async support
- Database:
- PostgreSQL for primary data storage
- Redis for caching and real-time features
- Authentication:
- JWT-based authentication
- Role-based access control
- OAuth2 integration for social logins
- File Storage: AWS S3 for medical documents and images
- Search Engine: Elasticsearch for advanced search capabilities
- End-to-end encryption for sensitive data
- HIPAA compliance measures
- Regular security audits
- Rate limiting and DDoS protection
- Data backup and disaster recovery
- Node.js (v18.0.0 or higher)
- Python 3.8+
- PostgreSQL 13+
- Redis 6+
- Docker and Docker Compose (for containerized deployment)
-
Clone and Install Dependencies
# Clone the repository git clone <repository-url> cd Medico # Backend setup cd backend python -m venv venv source venv/bin/activate # On Windows: .\venv\Scripts\activate pip install -r requirements.txt # Frontend setup cd ../frontend npm install
-
Database Setup
# Create database psql -U postgres CREATE DATABASE medico; # Run migrations cd backend alembic upgrade head
-
Environment Configuration
# Backend (.env) DATABASE_URL=postgresql://user:password@localhost:5432/medico JWT_SECRET=your-secret-key JWT_ALGORITHM=HS256 REDIS_URL=redis://localhost:6379 AWS_ACCESS_KEY_ID=your-access-key AWS_SECRET_ACCESS_KEY=your-secret-key AWS_BUCKET_NAME=your-bucket-name # Frontend (.env.local) NEXT_PUBLIC_API_URL=http://localhost:8000 NEXT_PUBLIC_WS_URL=ws://localhost:8000/ws
-
Run Development Servers
# Terminal 1 - Backend cd backend uvicorn main:app --reload --port 8000 # Terminal 2 - Frontend cd frontend npm run dev
Medico/
βββ frontend/
β βββ app/ # Next.js 14 app directory
β βββ components/ # React components
β β βββ ui/ # Reusable UI components
β β βββ features/ # Feature-specific components
β βββ hooks/ # Custom React hooks
β βββ Redux/ # Redux state management
β βββ styles/ # Global styles and themes
β βββ utils/ # Utility functions
βββ backend/
β βββ api/ # API routes and controllers
β βββ core/ # Core functionality
β βββ db/ # Database models and migrations
β βββ services/ # Business logic
β βββ utils/ # Helper functions
βββ infrastructure/ # Deployment configurations
βββ docker/ # Docker configurations
βββ kubernetes/ # Kubernetes manifests
-
Authentication Endpoints
- POST
/api/auth/register - POST
/api/auth/login - POST
/api/auth/refresh-token
- POST
-
User Management
- GET
/api/users/profile - PUT
/api/users/profile - GET
/api/users/medical-history
- GET
-
Appointment Management
- POST
/api/appointments/book - GET
/api/appointments/list - PUT
/api/appointments/{id}
- POST
-
Doctor Management
- GET
/api/doctors/search - GET
/api/doctors/{id}/availability - POST
/api/doctors/consultations
- GET
- Follow Airbnb JavaScript Style Guide
- Use TypeScript strict mode
- Implement proper error handling
- Write comprehensive unit tests
- Create feature branch from
develop - Follow conventional commits
- Submit PR with detailed description
- Ensure CI/CD passes
- Get code review approval
- Implemented lazy loading for components
- Image optimization with Next.js Image
- API response caching
- Database query optimization
- CDN integration for static assets
We welcome contributions!
- Fork the repository
- Create your feature branch
- Follow our coding standards
- Write/update tests as needed
- Submit a pull request
- Open source libraries we depend on
- Medical professionals who provided domain expertise
For support, email alphamoris45@gmail.com.