Skip to content

healthfirstai/prototype-backend

Repository files navigation

HealthFirst AI Prototype

Video Demo

Watch our Demo

About The Project

Prototype for our HealthFirst AI web app.

Pre-requisites

Project Dependencies

  • Docker
  • Poetry
  • Supabase CLI

Additional Project Documentation Dependencies

Setting up Supabase local development

supabase link --project-ref yhkoibydboihnkcupibk

And enter the database password

To fetch the newest migration to the remote DB,

supabase db remote commit

Finally, run

supabase start

Reference the Supabase Doc, for other stuff.

Deploy with Docker

  1. Ensure you have Docker installed.

    docker --version
  2. Clone the repo

    git clone https://github.com/healthfirstai/prototype-backend
    cd prototype-backend
  3. Create .env file from example.env and change the values

    cp example.env .env
  4. Run docker compose up

    Building for first time

    docker compose up --build -d

    Fresh Rebuild

    docker compose build --no-cache
    docker compose up -d --build
  5. Setup Python virtual environment with Poetry

    poetry config virtualenvs.in-project true # Make poetry use local .venv folder
    poetry install # Install dependencies
    source .venv/bin/activate # Activate virtual environment in zsh
    source .venv/bin/activate.[fish|csh] # For other shell types

CLI Usage

  1. Activate virtual environment

    source .venv/bin/activate # Activate virtual environment in zsh
    source .venv/bin/activate.[fish|csh] # For other shell types
  2. CLI Help

    cli # or python3 healthfirstai_prototype/cli.py

Useful Commands for Development

  • Save dependencies to requirements.txt

    poetry export --without-hashes --format=requirements.txt > requirements.txt
  • Build and serve documentation

    mkdocs build
    mkdocs serve -a localhost:9000 # Runs on port 9000
  • Start Streamlit app

    streamlit run healthfirstai_prototype/streamlit_frontend/🏠_Home.py # Runs on port 8501
  • Start FastAPI Development Web Server

    uvicorn healthfirstai_prototype.main:app --reload # Runs on port 8000
  • Export TODOs to Markdown

    leasot --reporter markdown healthfirstai_prototype/*.py > docs/todo.md | prettier --write docs/todo.md
  • Build CLI Docs

    typer healthfirstai_prototype/cli.py utils docs --output docs/cli.md

About

Prototype for our HealthFirst AI web app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •