An application enabling users to upload, organize, and analyze medical summaries and medication records, with AI-driven insights for actionable next steps in healthcare. Built with React, TypeScript, FastAPI, Redis, MongoDB, Postgres, and OpenAI API.
This is a development project/POC. You will need to set up the schemas in the postgres instance / and the document collection in MongoDB and fill these with sample values. To simplify this, there is CREATE_QUERIES list in src/backend/app/db/relational_db.py.
Please reach out if you would like to get examples of potential data to fill in.
- Backend: A FastAPI application located in the
src/backend
directory. - Frontend: A React application located in the
src/frontend
directory.
- Python 3.10
- Node.js (v18.7.0)
- Docker (optional, for containerized deployment)
- MongoDB
- Redis
- ChromaDB
-
Navigate to the backend directory:
cd src/backend
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Set up environment variables:
Create a
.env
file in thesrc/backend
directory and add the following environment variables:ENV=DEV CONFIG_PATH=src/backend/app/utils/config.yaml LOGGING_CONFIG_PATH=src/backend/app/utils/logging_config.yaml MONGODB_URL=mongodb://localhost:27017 REDIS_URL=redis://localhost:6379 CHROMADB_URL=http://localhost:8000 CHROMADB_PATH=/chroma/chroma OPENAI_API_KEY=your_openai_api_key HUGGINGFACE_API_KEY=your_huggingface_api_key GOOGLE_MAPS_API_KEY=your_google_maps_api_key AWS_ACCESS_KEY_ID=your_aws_access_key_id AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key AWS_REGION=your_aws_region S3_BUCKET_NAME=your_s3_bucket_name POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_DB=your_postgres_db POSTGRES_USER=your_postgres_user POSTGRES_PASSWORD=your_postgres_password
-
Run the backend server: Ensure that you have the Redis, Postgres, and Mongodb daemons running! You can then start the FastAPI server with:
uvicorn app.main:app --reload
-
Navigate to the frontend directory:
cd src/frontend
-
Install the dependencies:
npm install
-
Run the frontend development server:
npm run dev
-
Build and run the Docker containers:
docker-compose up --build
-
Lint the backend code:
cd src/backend flake8
-
Format the backend code:
black .
-
Lint the frontend code:
cd src/frontend npx eslint .
-
Format the frontend code:
npm run format
The project uses GitHub Actions for continuous integration and deployment. The workflow is defined in .github/workflows/deployment.yaml
.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License.