This is an initial prototype for an app that does this:
- Let users enter or upload basic current health information, including any medications, supplements. Also request information about medical history, including family history. Optionally let the user upload specific details like blood chemistry, genomics, microbiome, etc.
- Respond with general observations and recommendations. Point to any markers that might be out of range and suggest actions.
- Ask about dietary preferences and current exercise levels.
- Propose general guidelines for daily macronutrient percentages (protein, carbs, etc.) and calories.
- Propose additional tests that could reveal more in-depth information.
The easiest way to get started is to use Docker. There are three Dockerfiles of interest:
- docker-compose.yml
- frontend/drr_frontend/Dockerfile
- backend/Dockerfile
docker-compose up --build -d
Look over the docker-compose.yml file and adjust as required.
To generate everything from sources, first create a project directory and download everything from this repo.
You'll need Python
python3 -m venv venv
source venv/bin/activate
pip install -r ./backend/requirements.txt
and now it will run on https://localhost:5005 (or whatever you set in .env
).
Requires npm 9.5
and node 18
cd frontend/drr_frontend
npm install
You may have some trouble with compatibility among the components. If so, do this instead:
npm install --legacy-peer-deps
You'll need two .env
files with your secret environment variables.
In the top directory (these settings should work "out of the box" -- it'll still run in demo mode if you don't change these credentials):
23ANDME_EMAIL=youremail@whatever.com
23ANDME_PASSWORD=password
OPENAI_API_KEY=somelongapikey
REACT_APP_BACKEND_URL=http://0.0.0.0:5005
FLASK_RUN_HOST=0.0.0.0
FLASK_RUN_PORT=5005
DRR_DEMO_MODE=true
DRR_ASSET_PATH=/path/to/sample/files
In the frontend directory (frontend/drr_frontend/.env) , you'll need to set whatever you want as the backend port. In development I've generally been using `5005.
REACT_APP_BACKEND_URL=http://localhost:5005
In production, under a Docker environment, you'll want this to be
REACT_APP_BACKEND_URL=http://backend:5005
If you use VS Code, the ./vscode
directory contains various launch and task settings you might find useful.
Start the backend:
python backend/app.py
Start the frontend:
cd frontend/drr_frontend
npm start