![Logo](https://private-user-images.githubusercontent.com/24904780/345688923-0e15369e-2550-42da-84ad-0f224af1ac8a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NzUxMDIsIm5iZiI6MTcyNDU3NDgwMiwicGF0aCI6Ii8yNDkwNDc4MC8zNDU2ODg5MjMtMGUxNTM2OWUtMjU1MC00MmRhLTg0YWQtMGYyMjRhZjFhYzhhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDA4MzMyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFhNzU1MTJhMjM1YmEyNTRkMzA1Y2NmN2M2ZDhjYmQ1NDJlMzc5YWQzYTYzMjMxOGM3YTYzMWEwYzA0ZDkwYTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.VnrKSAgYvcadBu2lIS1FMU60Ee4SNw6S9Qx_Ar1inlw)
This is an open source AI ambient scribe app for healthcare. Record patient-doctor conversations and automatically generate SOAP notes based on the transcripts. Make sure you are HIPAA compliant before using this in a healthcare setting.
Table of Contents
scribeHC-mobile-demo.MP4
scribeHC-web-demo.MP4
- Expo mobile app for recording patient-doctor conversations.
- Next.js dashboard for managing conversations and SOAP notes.
- FastAPI for processing audio recordings, generating transcripts, and generating SOAP notes.
- Animations:
react-native-reanimated
for OpenAI-like animations. - Authentication: Sign up with Google, Apple, or email. Clerk components for Next.js, custom components (signin, signup, OTP, password reset) for Expo.
- Audio Recording: Record patient-doctor conversations using
expo-av
. - Transcripts + SOAP Notes: Generated in FastAPI using OpenAI APIs.
- Web Dashboard: Next.js app for managing SOAP notes.
- Note Editor: Edit generated SOAP notes using novel.
Refer to building-hipaa-compliant for more information on making this project HIPAA compliant.
- React Native
- Expo
- NativeWind
- TypeScript
- tRPC
- Drizzle ORM
- Clerk
- Next.js
- Tailwind CSS
- FastAPI
- SST Ion
- Jest
- Testing Library
- Turborepo
.github
└─ workflows
└─ CI with pnpm cache setup
.vscode
├─ Recommended extensions and settings for VSCode users
└─ Multi-root Workspaces for smoother python experience in monorepo
apps
├─ expo
| ├─ Expo SDK 51
| ├─ React Native using React 18
| ├─ Navigation using Expo Router
| ├─ Tailwind using NativeWind
| ├─ Typesafe API calls using tRPC
| └─ Jest + React Native Testing Library for unit tests
├─ nextjs
| ├─ Next.js 14
| ├─ React 18
| ├─ Tailwind CSS
| └─ E2E Typesafe API Server & Client
└─ fastapi
├─ FastAPI for uploading and processing audio recordings
├─ OpenAI Whisper for transcription
└─ OpenAI Chat Completions API for generating SOAP notes from transcripts
packages
├─ api
| ├─ tRPC v11 router definition.
| └─ Generated TypeScript client from FastAPI OpenAPI spec.
├─ db
| └─ Typesafe db calls using Drizzle & Amazon RDS
├─ ui
| └─ shadcn/ui.
└─ validators
└─ Zod schemas for repo-wide type-safety and validation.
infra
└─ SST Ion resources
tooling
├─ eslint
| └─ shared, fine-grained, eslint presets
├─ prettier
| └─ shared prettier configuration
├─ tailwind
| └─ shared tailwind configuration
├─ github
| └─ shared github actions
└─ typescript
└─ shared tsconfig you can extend from
In this project, we use
@shc
as a placeholder for package names. As a user, you might want to replace it with your own organization or project name. You can use find-and-replace to change all the instances of@shc
to something like@my-company
or@project-name
.
# Install dependencies
pnpm i
# Configure environment variables
# There is an `.env.example` in the root directory you can use for reference
cp .env.example .env
cp .env.example .env.local
Configure AWS credentials https://docs.sst.dev/advanced/iam-credentials#loading-from-a-file
Install the SST CLI https://ion.sst.dev/docs/reference/cli
# Run SST Ion (run this in apps/nextjs)
pnpm dev
# Push the Drizzle schema to the RDS database
pnpm db:generate
pnpm db:migrate
-
Make sure you have XCode and XCommand Line Tools installed as shown on expo docs.
NOTE: If you just installed XCode, or if you have updated it, you need to open the simulator manually once. Run
npx expo start
in the root dir, and then enterI
to launch Expo Go. After the manual launch, you can runpnpm dev
in the root directory.+ "dev:ios": "expo start --ios",
-
Run
pnpm dev:ios
atapps/expo
to open the iOS simulator.
-
Install Android Studio tools as shown on expo docs.
-
Run
pnpm dev:android
script atapps/expo
to open the Android emulator.+ "dev:android": "expo start --android",
Share your thoughts in Discussions
We welcome contributions! Find out how you can contribute to the project in CONTRIBUTING.md
: Contributing Guidelines
Made with contrib.rocks
Distributed under the MIT License. See LICENSE
for more information.
This repo originates from create-t3-turbo. Feel free to check out the project if you are running into issues with running/deploying the starter.
Thanks as well to the following:
-
next-fast-turbo for the learnings on how to bring FastAPI into the project.
-
Build a ChatGPT Clone with React Native by Simon Grimm for the inspiring the direction of the mobile app.
-
Andy AI for fueling the original idea of this project.