{"id":16096387,"url":"https://github.com/robopuff/expressive-mt","last_synced_at":"2025-03-28T18:32:23.751Z","repository":{"id":79736752,"uuid":"181464261","full_name":"robopuff/expressive-mt","owner":"robopuff","description":null,"archived":true,"fork":false,"pushed_at":"2019-04-16T12:54:19.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T20:49:58.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robopuff.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}},"created_at":"2019-04-15T10:26:58.000Z","updated_at":"2024-11-01T12:24:12.000Z","dependencies_parsed_at":"2023-05-16T08:30:24.694Z","dependency_job_id":null,"html_url":"https://github.com/robopuff/expressive-mt","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"e68048959b7506e302a5da6f4f2901ede86d816b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robopuff%2Fexpressive-mt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robopuff%2Fexpressive-mt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robopuff%2Fexpressive-mt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robopuff%2Fexpressive-mt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robopuff","download_url":"https://codeload.github.com/robopuff/expressive-mt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246080936,"owners_count":20720614,"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-10-09T17:13:55.042Z","updated_at":"2025-03-28T18:32:23.746Z","avatar_url":"https://github.com/robopuff.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MT Sample Zend Expressive\n\nJust a sample of _Zend Expressive_ api. Middleware for the win! :) \n\n## How to run it\n\n* `$ composer install`\n* `$ cp config/autoload/local.php.dist config/autoload/local.php`\n* Check values for mongo in `config/autoload/local.php`\n\nTo run a built-in:\n* `$ php -S 0:8080 -t public/ public/index.php`\n\nTo run it in docker:\n* `$ docker-compose up`\n\nTo run tests just use\n* `$ composer check`\n\nIt will analyse code with `phpstan` and `phpcs` and after that it'll check for `phpunit` tests.\nAdditionally there is `phan` config included for more detailed code scan.\n\nFor **e2e** tests use `newman`, a Postman CLI automation client\n* To install it use: `$ npm install -g newman`\n* To run tests use `$ newman run e2e/postman_collection.json -e e2e/postman_docker_env.json`\n\nThis code requires `php\u003e=7.2` with `mongodb` and `bcmath` installed -\nonly used for display purposes, all monetary values are stored in cents\n\n## List of things not finished\n\n* Make `Items` endpoint - currently just a mock\n* Add post body filters\n* Add response body negotiation\n* ACL and overall identification of a user\n\n## API endpoints\n\n* `[GET] /`\n    - A home endpoint\n* `[GET] /ping`\n    - Just a ping message, useful to check for performance issues\n* `[GET] /api/v1/cart`\n    - A list of all carts, can filter via query params (like `?filters[status][]=created\u0026filters[status][]=deleted`)\n* `[GET] /api/v1/cart/[id]`\n    - Details of specified cart, replace `[id]` with cart id\n* `[POST] /api/v1/cart`\n    - Create a new cart, can take a body with json `{\"items\":[{\"id\":1,\"qty\":1,\"unit_price\":123}]}`\n* `[PATCH] /api/v1/cart/[id]`\n    - Update list of items (same body as _POST_, for items already in cart price is not required)\n    - if you want to remove an item just send `\"qty\":0` with it\n* `[DELETE] /api/v1/cart/[id]`\n    - Mark cart as deleted","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobopuff%2Fexpressive-mt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobopuff%2Fexpressive-mt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobopuff%2Fexpressive-mt/lists"}