Backend for CareLink Zambia MVP
# CareLink Zambia MVP - Healthcare Gig Platform
A comprehensive healthcare staffing platform connecting healthcare providers with medical facilities in Zambia.
## π Features
### Core Functionality
- **Gig Application Workflow**: Complete end-to-end application process
- **Role-Based Access Control**: Separate interfaces for clinics and healthcare providers
- **Real-time Notifications**: Instant updates on application status changes
- **Application Management**: Accept/reject applications with audit logging
- **Dashboard Analytics**: Comprehensive stats and insights for clinics
### Security & Performance
- JWT-based authentication with role-based authorization
- Rate limiting and input validation
- Audit logging for all critical actions
- Responsive design for mobile and desktop
- Error handling and user feedback throughout
## ποΈ Architecture
### Backend (Node.js/Express)
```
backend/
βββ controllers/
β βββ applicationController.js # Application management logic
βββ middleware/
β βββ auth.js # Authentication & authorization
βββ models/
β βββ Application.js # Application data model
βββ routes/
β βββ applications.js # API endpoints
βββ server.js # Main server file
```
### Frontend (React)
```
frontend/src/
βββ components/
β βββ Applications.jsx # Application management interface
β βββ GigDetail.jsx # Gig details with application status
β βββ Navbar.jsx # Navigation component
β βββ NotificationSystem.jsx # Real-time notifications
βββ hooks/
β βββ useApplications.js # Application management logic
β βββ useAuth.js # Authentication logic
βββ pages/
β βββ ClinicDashboard.jsx # Clinic dashboard with analytics
βββ utils/
βββ api.js # API configuration
βββ helpers.js # Utility functions
```
## π API Endpoints
### Application Management
- `POST /api/applications/gigs/:gigId/apply` - β¦