{"id":13686624,"url":"https://github.com/wbstack/api","last_synced_at":"2026-03-09T11:15:38.585Z","repository":{"id":36952775,"uuid":"318826660","full_name":"wbstack/api","owner":"wbstack","description":"Main Laravel based API for wikibase.cloud","archived":false,"fork":false,"pushed_at":"2026-02-27T14:12:41.000Z","size":2633,"stargazers_count":5,"open_issues_count":24,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-02-27T19:22:33.719Z","etag":null,"topics":["api","laravel","wbstack"],"latest_commit_sha":null,"homepage":"https://wikibase.cloud","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wbstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-05T15:49:54.000Z","updated_at":"2026-02-27T14:12:45.000Z","dependencies_parsed_at":"2024-02-06T18:30:52.180Z","dependency_job_id":"26989a3c-2206-4580-b1f8-32390e25a441","html_url":"https://github.com/wbstack/api","commit_stats":null,"previous_names":[],"tags_count":197,"template":false,"template_full_name":null,"purl":"pkg:github/wbstack/api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbstack%2Fapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbstack%2Fapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbstack%2Fapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbstack%2Fapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wbstack","download_url":"https://codeload.github.com/wbstack/api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbstack%2Fapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30291962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T11:12:22.024Z","status":"ssl_error","status_checked_at":"2026-03-09T11:10:54.577Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","laravel","wbstack"],"created_at":"2024-08-02T15:00:36.304Z","updated_at":"2026-03-09T11:15:38.570Z","avatar_url":"https://github.com/wbstack.png","language":"PHP","funding_links":[],"categories":["api"],"sub_categories":[],"readme":"\u003e ℹ️ Issues for this repository are tracked on [Phabricator](https://phabricator.wikimedia.org/project/board/5563/) - ([Click here to open a new one](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?tags=wikibase_cloud,wbstack_api\n))\n\n# WBStack Platform API\n## Configuration\nThe platform API comes in a few different flavours that can be toggled using environment variables:\n\n- `ROUTES_LOAD_WEB` - web routes for the public facing wbstack.com usecase\n- `ROUTES_LOAD_SANDBOX` - web routes for the public facing sandbox usecase\n- `ROUTES_LOAD_BACKEND` - internal only API endpoints (non public) for all usecases\n\nThis single application could likely be split up at some point. Everything is currently together to make use of the shared wiki management code and query service management code.\n\n## Additional environment variables\n### Contact page settings\n- `WBSTACK_CONTACT_MAIL_SENDER` - The mail address of the sender address of the contact page mails. If the address includes the placeholder `\u003csubject\u003e`, it gets replaced with a shorthand for the actual selected subject (`give-feedback`, `report-a-problem`, etc)\n\n- `WBSTACK_CONTACT_MAIL_RECIPIENT` - The receiver address of the contact page mails\n\n## Developing\n\n### Install dependencies\n\nIt is recommended to install the php dependencies via a composer docker container as that contains the required php extensions:\n```\ndocker run --rm -it -v $PWD:/app -u $(id -u):$(id -g) composer install --ignore-platform-reqs\n```\n\nAlternatively, you can run `composer` on your local machine (ignoring platform requirements):\n```\ncomposer install --ignore-platform-reqs\n```\n\n### Initial setup\n\n`cp .env.example .env` and modify the contents accordingly.\n\n### Docker compose\n\nYou should be able to run some amount of this application in docker compose.\n\nThough the experience is not that refined...\n\n```sh\n# Start the stack in the background\ndocker compose up -d\n\n# Stop the stack and delete all volumes\ndocker compose down --volumes\n```\n\n### Migrations  \n\nRun everything in one go:\n\n```sh\ndocker compose exec api bash -c 'php artisan migrate:fresh \u0026\u0026 php artisan passport:install \u0026\u0026 php artisan db:seed \u0026\u0026 php artisan key:generate \u0026\u0026 php artisan storage:link'\n```\n\nOr each command separately:\n\n```sh\n# Create the SQL tables needed\ndocker compose exec api php artisan migrate:fresh\n\n# Create some certs needed for authentication (passport is a laravel plugin)\ndocker compose exec api php artisan passport:install\n\n# Seed some useful development data\ndocker compose exec api php artisan db:seed\n\n# Generate and set the APP_KEY env variable.\ndocker compose exec api php artisan key:generate\n\n# Create a symlink from `public/storage` to `storage/app/public`\ndocker compose exec api php artisan storage:link\n```\n\nTry loading http://localhost:8070/ until the DB is up and the connection works.\n\nIf you want to develop with the UI then simply point the UI docker compose setup to localhost:8082\n\n### Seeded data\n\nSome data is added to the database via the Laravel seeders.\n\nYou can log in with these details for example.\n\nUser: `a@a.a`\nPassword: `a`\n\nAnd create a wiki.\n\n### Testing\n\nCurrently most of the tests require the DB connection to exist.\n\n```sh\n# run the whole test suite\ndocker compose exec api vendor/bin/phpunit\n\n# run a single file\ndocker compose exec api vendor/bin/phpunit tests/Jobs/DeleteWikiJobTest.php\n\n# run a single class\ndocker compose exec api vendor/bin/phpunit --filter DeleteWikiJobTest\n\n# run a single method\ndocker compose exec api vendor/bin/phpunit --filter DeleteWikiJobTest::testDeletesWiki\n```\n\n### Linting\n\n```sh\ndocker compose exec api vendor/bin/pint --test -v\n```\n\n#### Debugging\n\nIf you get a CORS error from an API when testing, it might be due to an exception internally, resulting in a 500 response with no CORS.\n\nIf you are testing a route and believe an exception is happening (returning a 500), you can disable error handling to see the trace.\n\n```php\nuse \\Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithExceptionHandling;\n\nfunction someTest() {\n    $this-\u003ewithoutExceptionHandling();\n    // rest of test code...\n}\n```\n\n### Laravel IDE helper\n\nYou may need to run these from within a container with a DB attached:\n\n```\nphp artisan ide-helper:models\nphp artisan ide-helper:eloquent\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwbstack%2Fapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwbstack%2Fapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwbstack%2Fapi/lists"}