{"id":19315311,"url":"https://github.com/saelsa/family-tree","last_synced_at":"2025-07-13T19:38:02.792Z","repository":{"id":52155246,"uuid":"231795677","full_name":"saelsa/family-tree","owner":"saelsa","description":"Capstone project within the Udacity Fullstack Nanodegree project - Backend to an application that visualizes a family tree","archived":false,"fork":false,"pushed_at":"2023-02-07T23:11:41.000Z","size":119,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T04:30:08.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://fsnd-family-tree.herokuapp.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saelsa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-04T16:41:56.000Z","updated_at":"2022-10-22T13:41:40.000Z","dependencies_parsed_at":"2025-01-06T03:41:06.806Z","dependency_job_id":"654f9410-7e72-4edc-bc11-b6db682d5c2b","html_url":"https://github.com/saelsa/family-tree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saelsa/family-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saelsa%2Ffamily-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saelsa%2Ffamily-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saelsa%2Ffamily-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saelsa%2Ffamily-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saelsa","download_url":"https://codeload.github.com/saelsa/family-tree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saelsa%2Ffamily-tree/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265197044,"owners_count":23726416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T01:05:50.240Z","updated_at":"2025-07-13T19:38:02.752Z","avatar_url":"https://github.com/saelsa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Full Stack Familytree API Backend\n\n## About\n\nThe project provides the backbone to create and visualize a family tree. Members can manage information about family members and their ancestors as well as important family events. Guests can retrieve that information. At a future stage, persons and events will be linked in order to create a family tree.\n\nhttps://fsnd-family-tree.herokuapp.com\n\n## API\n\nIn order to use the API users need to be authenticated. Users can either have a guest or a member status. An overview of the API can be found below as well as in the provided postman collection.\n\n### Retreiving data (Guests and members)\n\n**GET** `/persons`\n\nRetrieves a list of family members\n\n```\ncurl -X GET \\\n  https://fsnd-family-tree.herokuapp.com/persons \\\n  -H 'Authorization: Bearer \u003cINSERT_YOUR_TOKEN\u003e'\n```\n\n**GET** `/events`\n\nRetrieves a list of events\n\n```\ncurl -X GET \\\n  https://fsnd-family-tree.herokuapp.com/events \\\n  -H 'Authorization: Bearer \u003cINSERT_YOUR_TOKEN\u003e'\n```\n\n### Managing data (Members only)\n\n**POST** `/persons`\n\nAdd a new person\n\n```\ncurl -X POST \\\n  https://fsnd-family-tree.herokuapp.com/persons \\\n  -H 'Authorization: Bearer \u003cINSERT_YOUR_TOKEN\u003e' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"firstname\": \"John\",\n    \"lastname\": \"Doe\",\n    \"birthdate\": \"01.01.2000\"\n}'\n```\n\n**PATCH** `/persons/\u003cid\u003e`\n\nChange information for a given person\n\n```\ncurl -X PATCH \\\n  https://fsnd-family-tree.herokuapp.com/persons/1 \\\n  -H 'Authorization: Bearer \u003cINSERT_YOUR_TOKEN\u003e' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"firstname\": \"Jane\"\n}'\n```\n\n**DELETE** `/persons/\u003cid\u003e`\n\nDelete a given person\n\n```\ncurl -X DELETE \\\n  https://fsnd-family-tree.herokuapp.com/persons/5 \\\n  -H 'Authorization: Bearer \u003cINSERT_YOUR_TOKEN\u003e ' \\\n\n```\n\n**POST** `/events`\n\nAdd a new event\n\n```\ncurl -X POST \\\n  https://fsnd-family-tree.herokuapp.com/persons \\\n  -H 'Authorization: Bearer \u003cINSERT_YOUR_TOKEN\u003e' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"event_type\": \"wedding\",\n    \"date\": \"01.01.2020\"\n}'\n```\n\n## Installation\n\nThe following section explains how to set up and run the project locally.\n\n### Installing Dependencies\n\nThe project requires Python 3.6. Using a virtual environment such as `pipenv` is recommended. Set up the project as follows:\n\n```\n\npipenv shell\npipenv install\n\n```\n\n### Database Setup\n\nWith Postgres running, create a database:\n\n```\n\nsudo -u postgres createdb familytree\n\n```\n\n### Running the server\n\nTo run the server, first set the environment variables, then execute:\n\n```bash\nexport APP_SETTINGS=\"config.DevelopmentConfig\"\nexport DATABASE_URL=\"postgresql:///familytree\"\npython manage.py runserver\n```\n\n## Testing\n\nTo test the API, first create a test database in postgres and then execute the tests as follows:\n\n```\nsudo -u postgres createdb familytree_test\npython test_app.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaelsa%2Ffamily-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaelsa%2Ffamily-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaelsa%2Ffamily-tree/lists"}