I wanted to make a family tree of all my friends because I was confused about how we all knew each other. This is more or less what I came up with. It's a little flask app where you can type in your friends and how they know each other, and it'll make a little graph for you.
Add friends and see a list of how everyone knows each other
View a "family tree" and search for the shortest path between two friends
- Install requirements in an environment with
venv
andpip
, or withconda
; activate your environment - Add a secret key to your .env file, or just rename
example.env
-->.env
and change the key inside. - Create a local database with
python models.py
- Run locally with
python app.py
or with flask viaFLASK_APP=app FLASK_ENV=development flask run --port=5777
- Navigate to localhost:5777 to see your app
This app is setup to be launched easily with fly.io - follow fly's instructions to use flyctl
to create and deploy an app. Don't forget to create an attached postgres instance! You'll additionally need to set your secret key using flyctl secrets
.
This app is also setup to deploy automatically to fly.io upon push to the main
branch. To set this up, after launching the app, create a deployment API token with fly tokens create deploy
and add it to your GitHub actions secrets. See this guide for more info. To skip this entirely, delete the .github/workflows/fly.yml
file.