CareSync is a comprehensive healthcare management platform built as a monorepo containing a Python/FastAPI backend, AI agents, React web frontend, and React Native mobile app.
- Docker and Docker Compose
- Git
- Node.js (v18 or higher)
- Python (v3.9 or higher)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd caresync-mono- Start the local development services:
cd docker
docker-compose up -dThis will start PostgreSQL and Redis containers for local development.
- Navigate to the backend API directory:
cd apps/backend-api- Install Python dependencies:
pip install poetry
poetry install- Run the backend service:
poetry run uvicorn main:app --reload- Navigate to the frontend web directory:
cd apps/frontend-web- Install dependencies:
npm install- Start the development server:
npm run dev- Navigate to the frontend mobile directory:
cd apps/frontend-mobile- Install dependencies:
npm install- Start the development server:
npx react-native startFor Python projects, we use Ruff for linting and Black for formatting:
# Lint
ruff check .
# Format
black .For frontend projects, we use ESLint and Prettier:
# Lint
npm run lint
# Format
npm run format- Create a feature branch from
main - Follow the linting and formatting rules
- Write meaningful commit messages
- Submit a pull request with a clear description
- Ensure all tests pass before merging
caresync-mono/
├── .github/
│ └── workflows/ (for CI/CD later)
├── apps/
│ ├── backend-api/ # FastAPI application
│ ├── ai-agents/ # Python FastAPI microservices for AI agents
│ ├── frontend-web/ # React application
│ └── frontend-mobile/ # React Native application
├── libs/ # (Optional) For shared code like types, utilities
├── infra/ # Infrastructure as Code (e.g., Terraform, AWS CDK)
└── docker/ # Dockerfiles and docker-compose for local dev
## Infrastructure Setup
The infrastructure is provisioned using Terraform and includes:
- VPC with public and private subnets across multiple AZs
- EKS cluster for container orchestration
- RDS PostgreSQL for primary database
- ElastiCache Redis for caching
- S3 buckets for document storage and logging
- Cognito for authentication
- SES for email notifications
- Secrets Manager for secure credential management
- ECR repositories for Docker images
- CI/CD pipeline with GitHub Actions
### Prerequisites
- AWS CLI configured with appropriate permissions
- Terraform >= 1.0
- Docker
- kubectl
### Setting Up Infrastructure
1. **Configure AWS credentials:**
```bash
aws configure
- Initialize Terraform:
cd infra/terraform/staging
terraform init-
Set up remote state (optional but recommended): Create an S3 bucket and DynamoDB table for Terraform state locking, then update
backend.tf. -
Review and apply the infrastructure:
terraform plan -var="aws_account_id=YOUR_ACCOUNT_ID" -var="environment=staging"
terraform apply -var="aws_account_id=YOUR_ACCOUNT_ID" -var="environment=staging"- Set up GitHub Actions secrets: After running Terraform, set the following secrets in your GitHub repository:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYECR_REPOSITORY_BACKEND(from Terraform output)ECR_REPOSITORY_AUDITOR(from Terraform output)ECR_REPOSITORY_ORCHESTRATOR(from Terraform output)ECR_REPOSITORY_FRONTEND_WEB(from Terraform output)ECR_REPOSITORY_FRONTEND_MOBILE(from Terraform output)
The CI/CD pipeline is configured in .github/workflows/ci.yml and includes:
- Code linting and formatting checks
- Unit tests
- Docker image building and pushing to ECR
- Deployment to EKS cluster