Web app to track my family history using a family tree.
I have family across several continents, and this is a project to create a private web app to keep a history of who is who and where they are.
The idea of this app is to provide a collaborative multilingual family tree with some social networking features like photosharing and tagging.
You can sign up to the instance I run at https://www.okkindred.com or you are welcome to clone this repository and set up your own instance.
If you need help setting it up, drop me a message on [email protected]
If you have ideas or want to add to this, please feel free!
The project is built using Python Django running on Python3.7 and the Django REST Framework
https://www.okkindred.com is hosted with PythonAnywhere (this link has my referal ID)
It also uses Amazon Web Services S3 to store potentially a huge number of images for very little cost.
It also uses Google Maps Geocoding API and Bing Maps API to geolocate addresses so that it can plot where your family is on a map.
The Frontend is a separate repo and is written in VueJS & Typescript https://github.com/JustinWingChungHui/okKindredUI_typescript
Facial recognition routines are contained in a separate repo https://github.com/JustinWingChungHui/okkindred_facial_recognition
Here are instructions to get this project running on PythonAnywhere (this link has my referal ID)
- Sign up to Google Maps Geocoding API service and Bing Maps API service and make a note of their API keys.
Bing is optional, it is used as the backup geocoding service if a location can't be found using Google.
- Sign up to Mapbox , create an API token and make a note of it.
- Sign up to Amazon Web Services S3 and create a new bucket. Make the bucket publically readable but not listable.
You may need to specify the bucket policy manually
{ "Version": "2017-01-01", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::BUCKETNAME/*" } ] }
Create an AWS user with access to S3 and create an external Access Key ID and Secret Key for the user. Note this down for later.
Sign up with PythonAnywhere (this link has my referal ID)
Create two new databases on PythonAnywhere, one for live and one to run the tests against. Make a note of their login details. MySQL and Postgres should both work however, MySQL is free!
In PythonAnywhere, create the AWS credential file
~/.aws/credentials
:[default] aws_access_key_id = YOUR_ACCESS_KEY aws_secret_access_key = YOUR_SECRET_KEY [default] region=us-east-1
In PythonAnywhere, open the console and clone this repository
git clone https://github.com/JustinWingChungHui/okKindred.git
- Change to the directory of the repository, create a virtualenv and install all the Python requirements:
cd okKindred
mkvirtualenv YOURVIRTUALENVNAME --python=/usr/bin/python375
pip install -r requirements.txt
- Create a copy of the file
~/okKindred/okkindred/secrets_example.py
as~/okKindred/okkindred/secrets.py
and edit the file with the AWS, Google API, Bing API, Mapbox token details and database settings - In the PythonAnyWhere console run the following command to create the database:
python manage.py migrate
- Follow instructions on PythonAnyWhere to set up your Web app and WSGI file https://help.pythonanywhere.com/pages/DeployExistingDjangoProject using the virtualenv we have just set up.
- In PythonAnywhere configure the static files. Set the URL
/static/
to point to directory~/okKindred/static/
and URL/media/
to point to directory~/media/okkindred/
This is the core Django created app that contains the settings and wsgi config
A Django app to customize the user model, so that the Django username is an email address
Django app that contains the key models to build a family tree:
- family: this defines a family. Currently every person, user and picture has a single family.
- person: this is a profile and a node on the family tree
- relation: defines how a person is related to another person.
Designed to be as simple and inclusive as possible, the only types of relations can bepartnered
which encompasses married/divorced/cohabiting etc... andraised
which encompasses given birth to/adopted etc... These terms are difficult to translate cross culturally. Note that the relationraised by
resolves toraised
and inverts when saved.
Django app that provides galleries, images and image tagging functionality
Django app to email out a summary of all the changes to family tree (if any) that have happened in the last 24 hours to every user in the family. So will in effect inform users by email of any new family members or changes to any existing profiles within a 24 hour period. The app also tries to send out the emails over a time to avoid traffic spikes. This probably needs to use a message queue in the future!
Django app that handles inviting members of your family to become users and collaborate on the family tree. It handles converting a person to a user.
Django app that handles displaying the map view for family members. Note MapBox <https://www.mapbox.com/> _ is used to display the maps as Google Maps isn't available in China over https.
Django app that allows new users to sign up to the service
Shell files that can be called by system scheduled tasks that trigger off various different things in the project
Mapping is provided by MapBox . This was chosen as it is available in China over an https connection.
This is used in conjunction with LeafletJS .