CareID is a decentralised healthcare identity and records platform. It gives patients ownership of their medical data while allowing healthcare providers to request time-bound access through on-chain permissions. The system combines a provider web portal, a patient mobile app, a backend upload API, and smart contracts that enforce auditable access control.
This repository is a pnpm workspace managed with Turborepo.
apps/web: Provider-facing Next.js portal for searching patients, requesting/reviewing record access, and uploading/viewing records.apps/mobile: Patient-facing Expo app for managing identity, consent, and record-sharing from a phone.apps/backend: Express service that handles file uploads and pushes files to Pinata/IPFS.apps/docs: Next.js documentation app for project docs and internal reference pages.
packages/contracts: Solidity contracts + Hardhat tooling for medical record metadata and access-permission logic.packages/ui: Reusable UI components shared across frontend apps.packages/eslint-config: Central ESLint presets used by workspace apps.packages/typescript-config: Shared TypeScript configuration presets.
- Monorepo: Turborepo + pnpm workspaces
- Web: Next.js + React
- Mobile: Expo + React Native
- Backend: Express
- Contracts: Solidity + Hardhat
- Storage: Pinata/IPFS
- Node.js
>=18 - pnpm
9.x
pnpm installpnpm dev:localThis script will:
- Start a local Hardhat node
- Deploy contracts
- Sync contract address and ABI to apps
- Start backend, web, and mobile dev servers
pnpm dev # Run turborepo dev pipeline
pnpm build # Build all apps/packages
pnpm lint # Run lint tasks across workspace
pnpm check-types # Run TypeScript checks across workspace
pnpm sync-abi # Sync contract ABI to dependent appsUse a focused branch name, for example:
git checkout -b feat/patient-history-filterKeep changes scoped to one concern (UI, contract logic, backend API, etc.).
Before opening a PR, run:
pnpm lint
pnpm check-types
pnpm buildIf you changed smart contracts, also run:
pnpm --filter contracts exec hardhat test
pnpm sync-abiInclude:
- What changed
- Why it changed
- Screenshots/videos for UI updates
- Any migration or environment variable requirements
- Keep PRs small and reviewable
- Resolve all review comments before merge
- Avoid mixing refactors with feature changes unless necessary
Contract-specific commands and deployment details are documented in packages/contracts/README.md.