CareTaker is a Progressive Web App (PWA) that connects verified nurses and caregivers with clients in Cameroon. Built with ethics, security, and optimization for low-bandwidth environments in mind.
- Role-based Registration: Nurses/Caregivers and Clients
- Secure Authentication: Supabase auth with JWT tokens
- AI-Powered Matching: Weighted scoring algorithm (reviews 40%, jobs 30%, sentiment 30%)
- Real-time Chat: Offline-first with IndexedDB queue
- Location-based Matching: Geolocation + manual address input
- Payment Integration: MTN MoMo API support
- Admin Dashboard: Nurse verification and request approval
- PWA Ready: Service worker, offline support, installable
- Mobile-First: Optimized for low-end devices and 2G networks
- Lightweight: <50MB app size, <100KB initial load
- Secure: Row-Level Security (RLS), encrypted data, OWASP compliant
- Multi-language: English/French toggle
- Progressive: Works offline, syncs when online
- Next.js 16 with App Router
- React 19 with TypeScript
- Tailwind CSS for styling
- Lucide React for icons
- Supabase (Auth, Database, Realtime, Storage, Edge Functions)
- PostgreSQL with Row-Level Security
- Supabase Edge Functions for serverless logic
- Tesseract.js for OCR (ID/document scanning)
- Leaflet.js for maps (lightweight)
- HuggingFace API for sentiment analysis
- MTN MoMo API for payments
- TypeScript for type safety
- React Hook Form with Zod validation
- ESLint for code quality
- Node.js 18+
- npm or yarn
- Supabase account
- MTN MoMo developer account (for payments)
- Clone the repository
git clone <repository-url>
cd caretaker- Install dependencies
npm install- Set up environment variables
cp .env.local.example .env.localFill in your environment variables:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
MOMO_API_KEY=your_momo_api_key
MOMO_API_SECRET=your_momo_api_secret
HUGGINGFACE_API_KEY=your_huggingface_api_key
JWT_SECRET=your_jwt_secret_key
ENCRYPTION_KEY=your_32_character_encryption_key- Set up Supabase database
# Apply migrations
supabase db push
# Enable required extensions
supabase db push --include-extensions- Run development server
npm run devOpen http://localhost:3000 in your browser.
- Service worker caches all static assets
- IndexedDB stores chat messages and form data
- Automatic sync when connection restored
- Add to home screen on mobile devices
- Works as standalone app
- Push notifications support
- HIPAA/GDPR Compliant: All sensitive data encrypted
- Row-Level Security: Users only see their own data
- Consent-based: Explicit consent for location/document access
- No Raw Document Storage: Only hashes of ID documents
- Bias-Free Scoring: Algorithm doesn't consider gender/age/ethnicity
- Transparent AI: Clear explanation of how matches are scored
- Human Oversight: Admin approval required for all matches
- Fair Opportunity: Equal visibility for all verified nurses
- Data Localization: Where possible, data stored locally
- Anonymization: Personal data anonymized where feasible
- Local Laws: Compliant with Cameroon data protection regulations
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main branch
# Build for production
npm run build
# Start production server
npm startprofiles: User accounts and basic infonurse_profiles: Professional nurse informationcare_requests: Client service requestsmatches: Nurse-client matching recordsmessages: Chat messages between matched usersreviews: Post-service reviewspayments: Transaction records
- Users β Profiles (1:1)
- Profiles β Nurse Profiles (1:0..1)
- Profiles β Care Requests (1:N)
- Care Requests β Matches (1:N)
- Matches β Messages (1:N)
- Matches β Reviews (1:1)
- Matches β Payments (1:N)
- Reviews (40%): Historical client ratings
- Jobs Completed (30%): Experience and reliability
- Sentiment Analysis (30%): Communication quality assessment
- Maximum distance: 50km (configurable)
- Priority to closer matches
- Urban/rural consideration
- All matches require admin approval
- Manual override capability
- Audit trail for all decisions
- Edge Functions handle MoMo API calls
- Webhook-based payment confirmation
- Receipt generation in chat
- Refund support
- Client confirms match
- Payment request initiated
- MoMo payment processed
- Receipt sent via chat
- Funds released after service completion
- English (default)
- French
- React Context for language state
- Translation objects for all UI text
- Date/time localization
- Currency formatting (XAF)
- Code splitting by route
- Dynamic imports for heavy components
- Image optimization (80% compression)
- Tree shaking for unused code
- Service worker caching
- IndexedDB for offline storage
- Lazy loading for images
- Minimal API calls
- No heavy libraries
- Efficient state management
- Component cleanup
- Memory leak prevention
npm run testnpm run test:e2enpm run test:performancePOST /auth/register- User registrationPOST /auth/login- User loginPOST /auth/logout- User logout
GET /api/requests- List care requestsPOST /api/requests- Create care requestPUT /api/requests/:id- Update care request
GET /api/matches- List user matchesPOST /api/matches- Create new matchPUT /api/matches/:id- Update match status
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support:
- Email: support@caretaker.cm
- Phone: +237 XXX XXX XXX
- Website: caretaker.cm
- Basic registration and authentication
- Care request creation
- Basic matching algorithm
- Chat functionality
- Payment integration
- Advanced AI matching
- Video consultation
- Insurance integration
- Mobile apps (iOS/Android)
- Hospital partnerships
- Training programs
- Expansion to other countries
Built with β€οΈ for Cameroon's healthcare community