{"id":23269011,"url":"https://github.com/jcflow/pizza_app","last_synced_at":"2025-10-13T12:40:06.804Z","repository":{"id":40172874,"uuid":"244706428","full_name":"jcflow/pizza_app","owner":"jcflow","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-19T17:43:30.000Z","size":60,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-15T08:06:48.526Z","etag":null,"topics":["rest-api","rest-client","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/jcflow.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}},"created_at":"2020-03-03T18:04:13.000Z","updated_at":"2020-03-07T03:34:29.000Z","dependencies_parsed_at":"2023-02-11T13:30:13.288Z","dependency_job_id":null,"html_url":"https://github.com/jcflow/pizza_app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jcflow/pizza_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcflow%2Fpizza_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcflow%2Fpizza_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcflow%2Fpizza_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcflow%2Fpizza_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcflow","download_url":"https://codeload.github.com/jcflow/pizza_app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcflow%2Fpizza_app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015056,"owners_count":26085643,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["rest-api","rest-client","ruby","ruby-on-rails"],"created_at":"2024-12-19T17:40:43.361Z","updated_at":"2025-10-13T12:40:06.771Z","avatar_url":"https://github.com/jcflow.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pizza REST API Service + Client\n\nBasic REST API using Ruby 2.3.3 and  Ruby on Rails 5.1.7.\nBasic Client script using Ruby 2.3.3.\n\n## REST Service\n\n### Features\n  - Database mocked using JSON files located at `${pizza_shop/db/api/products/pizza}` .  These files are Pizza's type, cheese, sauce, crust and size. These files could be updated anytime or updated \"daily\" as AC says.\n  - The ingredients and toppings properties are optional. They are arrays of strings.\n  - Spaghetti, lasagna and salads are considered client orders too.\n  - The client orders are stored on a postgres DB.\n  - The state of the order are \"baking\", \"cooking\" and \"heating\". Also it could be \"delivering\" and \"delivered\" if the `deliver` flag is `true`.\n  - A order job automatically updates the order state based every x seconds. This time is located in every specific controller.\n\n### Routes\n\n| Verb | URI Pattern |\n| ------ | ------ |\n| GET | /api/products/pizzas |\n| POST | /api/products/pizzas |\n| GET | /api/products/pizzas/:id |\n| GET | /api/products/spaghetti |\n| POST | /api/products/spaghetti |\n| GET | /api/products/spaghetti/:id |\n| GET | /api/products/lasagna |\n| POST | /api/products/lasagna |\n| GET | /api/products/lasagna/:id |\n| GET | /api/products/salads |\n| POST | /api/products/salads |\n| GET | /api/products/salads/:id |\n\n#### Pizza object\n\n| Property | Type | Required | Values |\n| ------ | ------ | ------ | ------ |\n| type | string | YES | \"hawaiian\", \"brazilian\", \"veggie\" | \n| cheese | string | YES | \"mozzarella\", \"cheddar\", \"parmesan\" | \n| sauce | string | YES | \"bechamel\", \"veloute\", \"espagnole\", \"hollandaise\" | \n| crust | string | YES | \"thin\", \"thick\", \"filled\" | \n| size | string | YES | \"personal\", \"small\", \"medium\", \"large\" | \n| slices | integer | NO | \"personal\" -\u003e 4, \"small\" -\u003e 6, \"medium\" -\u003e 8, \"large\" -\u003e 10 | \n| ingredients | array\u003cstring\u003e | NO | - | \n| toppings | array\u003cstring\u003e | NO | - | \n| deliver | boolean | NO | - | \n\n### Run service\n\n```sh\ncd service/\nbuild install\nrails server -b 127.0.0.1 -p 3000 -e development\n```\n\n### Run service unit tests\n\n```sh\ncd service/\nrake test\n```\n\n### Important\n\nThe most important changed files are:\n  - Controllers: `service/app/controllers/api/products/` - All orders extend OrderController\n  - Models: `service/app/models/` - All orders extend Order\n  - Routes: `service/config/routes.rb` - Routes file\n  - Tests: `service/test/` - Models and controllers unit tests\n  - Jobs: `service/app/jobs/` - Order status updater job\n  - DB: `service/db/migrate/` - Rake migrate files\n\n## REST Client\n\n### Features\n  - Every 10 to 20 seconds the program will send client requests.\n  - Every time 1 to 3 clients will place orders.\n  - Each client will order 1 to 5 different products.\n\n### Run client\n\n```sh\ncd client/\nruby main.rb http://localhost:3000\n```\n\n## Todos\n\n - Order status job execution on server could be improved.\n - External order status enum\n\nLicense\n----\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcflow%2Fpizza_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcflow%2Fpizza_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcflow%2Fpizza_app/lists"}