{"id":20567446,"url":"https://github.com/sombriks/rosetta-beer-store","last_synced_at":"2025-04-14T15:53:11.052Z","repository":{"id":27468672,"uuid":"114042722","full_name":"sombriks/rosetta-beer-store","owner":"sombriks","description":"the very same beer store implemented in various stacks. also, frontends and backends are interchangeable","archived":false,"fork":false,"pushed_at":"2023-03-19T20:54:03.000Z","size":11022,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T04:41:43.455Z","etag":null,"topics":["android","angularjs","backend","cordova","cpp","express","flask","frontend","go","javascript","jee","kotlin","martini","nativescript-vue","pipenv","qt","rails","spring-boot","typescript","vue"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/sombriks.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":"2017-12-12T21:49:54.000Z","updated_at":"2023-07-22T23:47:15.000Z","dependencies_parsed_at":"2023-02-19T02:15:59.511Z","dependency_job_id":null,"html_url":"https://github.com/sombriks/rosetta-beer-store","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Frosetta-beer-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Frosetta-beer-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Frosetta-beer-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Frosetta-beer-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sombriks","download_url":"https://codeload.github.com/sombriks/rosetta-beer-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248911372,"owners_count":21182078,"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":["android","angularjs","backend","cordova","cpp","express","flask","frontend","go","javascript","jee","kotlin","martini","nativescript-vue","pipenv","qt","rails","spring-boot","typescript","vue"],"created_at":"2024-11-16T04:46:44.538Z","updated_at":"2025-04-14T15:53:11.007Z","avatar_url":"https://github.com/sombriks.png","language":"JavaScript","readme":"# rosetta-beer-store\n\nThe very same beer store implemented in various stacks. Also, front ends and\nback ends are interchangeable\n\n## Why\n\nTo compare stacks, analyze solutions, maybe give you a glimpse on what each\napproach can do.\n\nAlso because it's fun.\n\n## What do we have so far\n\n### Working API\n\n- beers listing\n- beer detail\n\n### Service Implementation\n\n| **technology / feature**          | REST API | CORS | Transparent JSON serialization | DB schema migration | Pooled db connection | Hot-reload development mode | Test Suite |\n|-----------------------------------|----------|------|--------------------------------|---------------------|----------------------|-----------------------------|------------|\n| javascript, knex, express         | YES      | YES  | YES                            | YES                 | YES                  | YES                         | YES        |\n| javascript, knex, koa             | YES      | YES  | YES                            | YES                 | YES                  | YES                         | YES        |\n| typescript, typeorm, nestjs       | YES      | YES  | YES                            | YES                 | YES                  | YES                         | ***        |\n| java, JEE                         | YES      | NO*  | YES                            | YES                 | YES                  | YES                         | ***        |\n| java, flywaydb, spring boot       | YES      | YES  | YES                            | YES                 | YES                  | NO                          | YES        |\n| kotlin, ktorm, liquibase, javalin | YES      | YES  | YES**                          | YES                 | YES                  | NO                          | ***        |\n| python, sqlalchemy, flask         | YES      | YES  | YES                            | YES                 | YES                  | NO                          | ***        |\n| go, gorm, gomigrate, martini      | YES      | YES  | YES                            | YES                 | NO                   | NO                          | ***        |\n| go, ent, sql-migrate, gin         | YES      | YES  | YES                            | YES                 | NO                   | NO                          | ***        |\n| ruby, rails                       | YES      | YES  | YES                            | YES                 | NO                   | YES                         | ***        |\n\n\\* for java project a simple filter can be set to adjust CORS\n\n\\** ktorm and javalin/jackson needs special configuration, see [retails](./beer-store-service-kotlin-javalin-ktorm-liquibase/README.md)\n[here](https://stackoverflow.com/questions/71721581/how-to-configure-the-default-jackson-json-mapper-on-javalin/71722025#71722025).\n\n\\*** it could be implemented\n\n### Client Implementation\n\n| **technology/feature**            | Transparent JSON serialization | Material Design implementation | SPA | Hot-reload development mode |\n| --------------------------------- | ------------------------------ | ------------------------------ | --- | --------------------------- |\n| javascript, vue, browserify       | YES                            | YES                            | YES | YES                         |\n| javascript, angularjs, CDN        | YES                            | YES                            | YES | NO                          |\n| javascript, react, webpack        | YES                            | YES                            | YES | YES                         |\n| typescript, sveltekit             | YES                            | NO                             | N/A | YES                         |\n| C++, Qt, qml, qt-creator          | NO                             | NO                             | N/A | NO                          |\n| javascript, cordova, vue, vue-cli | YES                            | YES                            | YES | NO                          |\n| kotlin, android, android-studio   | YES                            | YES                            | N/A | NO                          |\n| vue, nativescript                 | YES                            | NO                             | N/A | YES                         |\n\n## How does it work\n\nEach project will have one README.md explaining how to fire the engines.\n\nYou will need at least one service and one client running in order to see a\ncomplete work.\n\nWe'll have clients and services.\n\nServices must provide the very same REST API so their clients shall connect on\nit in a transparent way.\n\nTherefore, all services must use port 3000.\n\nYou shall run just one service at time.\n\nThe clients have not such limitation.\n\nHowever, you must correctly point them to the service address.\n\nThis is not a simple language comparison, but tooling as well.\n\nIs there more than one way to set up a java service project? Let's have it!\n\nMore than one way to set up a javascript client project! Let's go!\n\n## Tell me more about this Beer Store\n\n- The Beer Store is a modern web app\n  - It has a frontend and a back end\n  - It has two roles: customer and manager\n  - A default user called admin are available from the cold start\n    - It has both customer and manager roles\n  - New users can be created.\n    - New users have only the customer role\n    - The admin can grant the manager role for other users\n    - An user can not change their own roles\n  - **Customers** (i.e. users holding the customer role) can:\n    - Register themselves into the store\n    - Log in into the beer store\n    - List **beers**\n    - See beer details\n    - Add a beer to the **cart**\n    - Remove a beer from the cart\n    - Change beer amount in the cart\n    - Checkout the cart (pay for the beers)\n    - List past orders\n  - **Managers** can:\n    - Log in into the beer store\n    - Add new beers\n    - Change beer stock\n    - List beer **orders**\n    - See order details\n    - Change order status\n    - List customers\n    - See customer details\n- There must have a rest api able to perform all these actions\n- Some kind of data schema must be set up to help to persist information\n- A few initial data must be present when the store goes up\n  - Some beers\n  - The admin user with both profiles (customer, manager)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsombriks%2Frosetta-beer-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsombriks%2Frosetta-beer-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsombriks%2Frosetta-beer-store/lists"}