{"id":25976850,"url":"https://github.com/theognis1002/adventure-time","last_synced_at":"2026-04-11T15:38:13.241Z","repository":{"id":251088636,"uuid":"831176719","full_name":"theognis1002/adventure-time","owner":"theognis1002","description":"Choose Your Own Adventure Backend","archived":false,"fork":false,"pushed_at":"2024-07-31T16:24:37.000Z","size":4352,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-31T21:26:42.255Z","etag":null,"topics":["django","django-rest-framework","docker-compose","makefile","postgresql"],"latest_commit_sha":null,"homepage":"","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/theognis1002.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":"2024-07-19T21:08:16.000Z","updated_at":"2024-07-31T21:26:47.815Z","dependencies_parsed_at":"2024-07-31T21:42:51.028Z","dependency_job_id":null,"html_url":"https://github.com/theognis1002/adventure-time","commit_stats":null,"previous_names":["theognis1002/adventure-time"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theognis1002%2Fadventure-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theognis1002%2Fadventure-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theognis1002%2Fadventure-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theognis1002%2Fadventure-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theognis1002","download_url":"https://codeload.github.com/theognis1002/adventure-time/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241966050,"owners_count":20050313,"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":["django","django-rest-framework","docker-compose","makefile","postgresql"],"created_at":"2025-03-05T04:29:25.103Z","updated_at":"2025-12-31T01:03:09.490Z","avatar_url":"https://github.com/theognis1002.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Choose Your Own Adventure Backend\n\nThis is a backend implementation for a choose-your-own-adventure style app. The backend includes a web application server exposing an API, a PostgreSQL database for persistence, and an environment for running the project with Docker Compose.\n\n## Getting Started\n\n### Prerequisites\n\n- Docker\n- Docker Compose\n\n## Important commands\n\n1. `make build` - build containers\n1. `make run` - run containers\n1. `make setup` - run setup script\n1. `make makemigraitons` - run `python manage.py makemigrations` in bash shell\n1. `make migrate` - run `python manage.py migrate` in bash shell\n\n## API Notes\n\n- Stories API is protected via DRF's `Token Authentication` authentication class\n- Story primary key is an auto-generated UUID\n- Frames can be access via a nested model viewset\n  - Use `index` value to view Frame detail API\n- `opensesame` token can be used after running `make setup` command\n\n### Example API Calls:\n\n- cURL for Story API\n\n```curl\ncurl -H \"Authorization: Token opensesame\" http://localhost:8000/api/stories/\n```\n\n- cURL for nested Frame API\n\n```curl\ncurl -H \"Authorization: Token opensesame\" http://localhost:8000/api/stories/e1b9224e-8973-4394-97d4-a999e916540b/frames/\n```\n\n- cURL for nested Frame Detail API via `index`\n\n```curl\ncurl -H \"Authorization: Token opensesame\" http://localhost:8000/api/stories/e1b9224e-8973-4394-97d4-a999e916540b/frames/4/\n```\n\n---\n\n- How to navigate nested API's:\n\n```\nGET /api/stories/e1b9224e-8973-4394-97d4-a999e916540b/frames/4/\nHTTP 200 OK\nAllow: GET, HEAD, OPTIONS\nContent-Type: application/json\nVary: Accept\n\n{\n    \"id\": 5,\n    \"buttons\": [\n        {\n            \"id\": 7,\n            \"created\": \"2024-07-19T21:09:55.828853Z\",\n            \"modified\": \"2024-07-19T21:21:11.889344Z\",\n            \"text\": \"Start Over\",\n            \"link_index\": 0,\n            \"frame\": 5\n        }\n    ],\n    \"created\": \"2024-07-19T21:09:55.827763Z\",\n    \"modified\": \"2024-07-19T21:21:11.888156Z\",\n    \"index\": 4,\n    \"title\": \"No Return\",\n    \"body\": \"\u003cp\u003eYou close your eyes, and drift into sleep. When you awaken, you are in your own bed. The previous events were a dream, which has already begun to fade.\u003c/p\u003e\u003cp\u003eYou spend the rest of your life trying to return to the winding path in the dark forest.\u003c/p\u003e\u003cp\u003e\u003cb\u003eYou never will.\u003c/b\u003e\u003c/p\u003e\",\n    \"img\": \"http://example.com/img/10.png\",\n    \"colors\": {\n        \"bg\": \"#E0072F\",\n        \"text\": \"#680013\"\n    },\n    \"story\": \"e1b9224e-8973-4394-97d4-a999e916540b\"\n}\n```\n\n## TODO\n\n1. add test coverage via `pytest` / `pytest-django`\n1. add type annotations to all methods, classes, functions, etc.\n1. add docstrings to all methods, classes, functions, etc.\n1. add UI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheognis1002%2Fadventure-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheognis1002%2Fadventure-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheognis1002%2Fadventure-time/lists"}