{"id":25468216,"url":"https://github.com/ziwot/theadventureapi","last_synced_at":"2025-11-04T11:30:27.348Z","repository":{"id":115591185,"uuid":"607657936","full_name":"ziwot/TheAdventureApi","owner":"ziwot","description":"Old-school RPG Mini game API","archived":false,"fork":false,"pushed_at":"2023-02-28T16:16:07.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T12:47:36.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/ziwot.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":"2023-02-28T12:25:32.000Z","updated_at":"2023-03-02T06:42:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"46315d34-a8b2-48dd-9f6f-d1a5cafc2888","html_url":"https://github.com/ziwot/TheAdventureApi","commit_stats":null,"previous_names":["nigro64/theadventureapi","walterproof/theadventureapi","ziwot/theadventureapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziwot%2FTheAdventureApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziwot%2FTheAdventureApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziwot%2FTheAdventureApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziwot%2FTheAdventureApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziwot","download_url":"https://codeload.github.com/ziwot/TheAdventureApi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239432868,"owners_count":19637799,"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":"2025-02-18T07:44:32.465Z","updated_at":"2025-11-04T11:30:27.296Z","avatar_url":"https://github.com/ziwot.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Adventure API\n\nOld-school RPG Mini game API\n\n## Technical Overview\n\nThe data model is very simple as there is only one entity, the [Session](./src/Entity/Session.php).\n\nI though that having an unique identifier for the character was unneeded, as there is a one to one relation\nbetween the adventure and the character. So I cheated by merging the adventure id and the character id.\n\nAn adventure state is then entirely managed via the `state` field of the `session` table, which is of type `json`.\n\nThe Game is composed by a main [Adventure](./src/Game/Adventure.php) class that is the only object manipulated in the\ncontrollers.\n\nMost of the code in [Game/](./src/Game/) is made of mutable objects with static methods for their instantiation.\n\nFollow-up:\n\n- The Adventure class isn't used as a service, but it probably should transformed into one\n- Point above should lead to clean up the controllers and move the persistence to the new service\n- There are no functional tests\n- There are no logs\n- decouple controllers from Symfony AbstractController\n\n## Requirements\n\nYou need PHP up to version 8.1 and docker.\nYou also need symfony cli and composer.\n\n## Install\n\nJust run `composer install`\n\n## Dev\n\nRun `docker compose up -d` to start services.\n\nAn [adminer](http://localhost:8080/?server=db\u0026username=root\u0026db=app) is available to inspect and interact with db.\n\nThe default configuration use a database named `app` and the user `root` with password `secret`.\n\nRun `symfony console d:m:m` to run the migrations.\n\nReset db with (short) `sfc d:d:d --force \u0026\u0026 sfc d:d:c \u0026\u0026 sfc d:m:m`\n\nRun `symfony serve -d` to run the app (watch logs with `symfony server:log`).\n\nRun tests with `./vendor/bin/phpunit --testdox`\n\nRun cs fixer with `composer cs-fix`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziwot%2Ftheadventureapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziwot%2Ftheadventureapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziwot%2Ftheadventureapi/lists"}