A comprehensive health companion web application built with React, TypeScript, and modern web technologies.
-
Clone the repository
git clone <repository-url> cd care-companion-digital-health
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your Firebase and API keys -
Start development server
npm run dev
-
Open your browser Navigate to
http://localhost:8080
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
- Frontend: React 18, TypeScript, Vite
- UI Components: shadcn/ui, Tailwind CSS
- State Management: React Query (TanStack Query)
- Backend: Firebase (Authentication, Firestore, Hosting)
- Internationalization: react-i18next
- Charts: Recharts
- Icons: Lucide React
- Multi-language Support (English, Arabic)
- Dark/Light Theme Toggle
- Responsive Design
- Health Chatbot Interface
- User Authentication (Firebase)
- Real-time Data Sync
Copy .env.example to .env and fill in your configuration:
# Firebase Configuration
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=123456789
VITE_FIREBASE_APP_ID=1:123456789:web:abcdef123456- Create a Firebase project at Firebase Console
- Enable Authentication and Firestore Database
- Add your domain to authorized domains
- Copy your config keys to
.env
-
Install Firebase CLI
npm install -g firebase-tools
-
Login to Firebase
firebase login
-
Initialize Firebase (if not done)
firebase init hosting
-
Deploy
npm run build firebase deploy
The project includes GitHub Actions for automatic deployment:
-
Set up repository secrets in GitHub:
FIREBASE_SERVICE_ACCOUNT- Firebase service account JSONFIREBASE_PROJECT_ID- Your Firebase project ID- All
VITE_environment variables
-
Push to
mainbranch to trigger automatic deployment
src/
├── components/ # Reusable UI components
│ ├── ui/ # shadcn/ui components
│ ├── layout/ # Layout components (Header, Footer)
│ └── chatbot/ # Chatbot-specific components
├── pages/ # Page components
├── hooks/ # Custom React hooks
├── contexts/ # React contexts (Theme, i18n)
├── lib/ # Utility functions
├── i18n/ # Internationalization files
└── config/ # Configuration files
- AI Integration: Real chatbot with OpenAI/Gemini
- Health Predictions: ML models for health insights
- Mobile App: React Native companion app
- Device Integration: Wearable device connectivity
- Advanced Analytics: Health data visualization
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
For support and questions:
- Create an issue in the repository
- Check the documentation for deployment help