{"id":21257862,"url":"https://github.com/jesperancinha/staco-app","last_synced_at":"2025-07-11T02:32:11.131Z","repository":{"id":37076233,"uuid":"382824027","full_name":"jesperancinha/staco-app","owner":"jesperancinha","description":"This application is made as a DEMO to illustrate the use of localstack as a possible way to efficiently learn how the AWS ecosystem works","archived":false,"fork":false,"pushed_at":"2025-06-30T22:34:31.000Z","size":17936,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-30T23:29:46.527Z","etag":null,"topics":["amazon-web-services","aws","dynamod","kotest","kotlin","localstack","mockk","parameter-store","reactive","s3-bucket"],"latest_commit_sha":null,"homepage":"https://joaofilipesabinoesperancinha.nl/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jesperancinha.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"Roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-07-04T10:33:09.000Z","updated_at":"2025-06-30T22:34:34.000Z","dependencies_parsed_at":"2023-10-13T11:15:52.936Z","dependency_job_id":"31e45bb6-25b2-4a37-946d-be21a8e77b16","html_url":"https://github.com/jesperancinha/staco-app","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jesperancinha/staco-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperancinha%2Fstaco-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperancinha%2Fstaco-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperancinha%2Fstaco-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperancinha%2Fstaco-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jesperancinha","download_url":"https://codeload.github.com/jesperancinha/staco-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesperancinha%2Fstaco-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264712792,"owners_count":23652660,"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":["amazon-web-services","aws","dynamod","kotest","kotlin","localstack","mockk","parameter-store","reactive","s3-bucket"],"created_at":"2024-11-21T04:06:12.012Z","updated_at":"2025-07-11T02:32:11.121Z","avatar_url":"https://github.com/jesperancinha.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StaCo - A Stamps and Coins application\n\n---\n\n\n[![Generic badge](https://img.shields.io/static/v1.svg?label=GitHub\u0026message=StaCo%20App%20🪙%20\u0026color=informational)](https://github.com/jesperancinha/staco-app)\n[![GitHub release](https://img.shields.io/github/release-pre/jesperancinha/kotlin-test-drives.svg)](#)\n\n[![CircleCI](https://circleci.com/gh/jesperancinha/staco-app/tree/main.svg?style=svg)](https://circleci.com/gh/jesperancinha/staco-app/tree/main)\n[![staco-app](https://github.com/jesperancinha/staco-app/actions/workflows/staco-app.yml/badge.svg)](https://github.com/jesperancinha/staco-app/actions/workflows/staco-app.yml)\n[![e2e-staco-app](https://github.com/jesperancinha/staco-app/actions/workflows/staco-app-e2e.yml/badge.svg)](https://github.com/jesperancinha/staco-app/actions/workflows/staco-app-e2e.yml)\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8d9267cddf834bff8f27cf8419253243)](https://www.codacy.com/gh/jesperancinha/staco-app/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=jesperancinha/staco-app\u0026amp;utm_campaign=Badge_Grade)\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/8d9267cddf834bff8f27cf8419253243)](https://www.codacy.com/gh/jesperancinha/staco-app/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=jesperancinha/staco-app\u0026utm_campaign=Badge_Coverage)\n[![codecov](https://codecov.io/gh/jesperancinha/staco-app/branch/main/graph/badge.svg?token=JmvRFw1ir1)](https://codecov.io/gh/jesperancinha/staco-app)\n[![Coverage Status](https://coveralls.io/repos/github/jesperancinha/staco-app/badge.svg?branch=main)](https://coveralls.io/github/jesperancinha/staco-app?branch=main)\n\n[![GitHub language count](https://img.shields.io/github/languages/count/jesperancinha/staco-app.svg)](#)\n[![GitHub top language](https://img.shields.io/github/languages/top/jesperancinha/staco-app.svg)](#)\n[![GitHub top language](https://img.shields.io/github/languages/code-size/jesperancinha/staco-app.svg)](#)\n\n---\n\n## Technologies used\n\nPlease check the [TechStack.md](TechStack.md) file for details.\n\n#### Stable releases\n\n-   [1.0.0](https://github.com/jesperancinha/staco-app/tree/1.0.0) - [58e5cd42080a7950423020a64fa08515299d406a](https://github.com/jesperancinha/staco-app/tree/1.0.0)\n\n### Project Layout\n\n##### Article related\n\n-   [Stamps and Coins Demo](./stamps-and-coins-demo) - Module used to create Demo data. It sends Coin and Stamps images\n  and it can generate the initial data\n-   [Stamps and Coins Common](./stamps-and-coins-common) - Contains common libraries, namely, Data Transfer Objects,\n  Domain model\n-   [Stamps and Coins Common Cloud](./stamps-and-coins-common-cloud) - Contains common libraries for the cloud projects.\n-   [Stamps and Coins Batch](./stamps-and-coins-batch) - Spring batch Quartz based Jobs. They dump the data from\n  PostgreSQL to a file and ship it to S3. Another Job retrieves the data, unpacks it and sends it to DynamoDB.\n-   [Stamps and Coins Service](./stamps-and-coins-service) - This is our starting point. It contains a Reactive\n  Application which uses PostgreSQL using R2DBC repos on coroutines\n-   [Stamps and Coins Local Stack Service](./stamps-and-coins-ls-service) - This application serves data in the same way\n  as the above except that it connects to DynamoDB. All Localstack implementations are manual\n-   [Stamps and Coins Web](./stamps-and-coins-web) - Front End Application to explore the different implementations.\n  Pagination is implemented\n\n##### External to article\n\n-   [Stamps and Coins Cloud Server](./stamps-and-coins-cloud-service) - Uses automated configuration and tries to use\n  Localstack as much as possible.\n-   [Stamps and Coins Blocking Service](./stamps-and-coins-blocking-service) - The initial application that started this\n  project back in April 2021. It is now a login authentication/authorization security exploration module, which contains\n  implementations of BASIC Auth, OAUTH2 local Auth and OAUTH with GitHub.\n\n---\n\n## Setup environment\n\nBe sure to have [Docker](https://www.docker.com/products/docker-desktop) installed\n\n#### Install sdk7\n\nBe sure to have [SDK-MAN](https://sdkman.io/) installed for this to work. You can choose another way. It is only\nimportant to have JDK17 installed to have this working.\n\n```shell\n. ./sdk17.sh\n```\n\n#### K8s\n\n```shell\n. ./bash/k8s-setup.sh \n```\n\n#### Docker\n\n```shell\n. ./bash/docker-setup.sh\n```\n\n---\n\n## How to run\n\n#### Running all automatically\n\n```shell\nmake docker-clean-build-start\n```\n\n-   Endpoint:  [http://localhost:8080](http://localhost:8080)\n\n\u003e These containers take a while to start, so depending on your machine, the containers can start in anywhere between 10 seconds up to 5 minutes. Keep checking the logs with `docker logs` or `docker-compose logs`.\n\n## Sequence diagram\n\nTo visualize these diagrams you may need\nthe [mermaid-diagrams](https://chrome.google.com/webstore/detail/mermaid-diagrams/phfcghedmopjadpojhmmaffjmfiakfil)\nplugin installation.\n\nTo visualize them in Intellij, please install the [mermaid plugin](https://mermaid-js.github.io/mermaid/#/).\n\n\n#### Old Sketch\n\n```mermaid\n\nsequenceDiagram\n    participant User\n    participant StaCo App\n    participant StaCo Service\n    participant PostgreSQL Database\n    \n    rect rgb(200,200,200)\n    \n    User-\u003e\u003eStaCo App: User logs into application\n    StaCo App-\u003e\u003eStaCo Service: A list of coins and stamps is requested by filter\n    StaCo Service-\u003e\u003ePostgreSQL Database: Data is fetched via the filter\n    PostgreSQL Database -\u003e\u003eStaCo Service: Data is returned\n    StaCo Service-\u003e\u003eStaCo App: Minimal data manipulation and return\n    StaCo App-\u003e\u003eUser: Results given to the User\n    \n    end\n```\n\n#### Current Sequence Diagram\n\n```mermaid\n\nsequenceDiagram\n    participant Web\n    participant Reactive Service\n    participant Localstack Reactive Service\n    participant Batch\n    participant Blocking Service\n    participant Cloud Service\n    participant PostgreSQL Database\n    participant S3\n    participant DynamoDB\n    participant SSM\n    \n    rect rgb(200,200,200)\n    \n    Web-\u003e\u003eReactive Service: User logs into application\n    Web-\u003e\u003eBlocking Service: User logs into application\n    Web-\u003e\u003eBlocking Service: User asks data from application\n    Reactive Service-\u003e\u003ePostgreSQL Database: Request Data\n    PostgreSQL Database-\u003e\u003eReactive Service: Returns Data\n    Reactive Service-\u003e\u003eWeb: Returns Data\n    Web-\u003e\u003eLocalstack Reactive Service: User asks data from application\n    Localstack Reactive Service-\u003e\u003eDynamoDB: Requests Data\n    DynamoDB-\u003e\u003eLocalstack Reactive Service: Sends data back\n    Localstack Reactive Service-\u003e\u003eWeb: Sends data back\n    Batch-\u003e\u003ePostgreSQL Database: Requests Data\n    PostgreSQL Database-\u003e\u003eBatch: Sends Data Back\n    Batch-\u003e\u003eBatch: Processes data and creates CSV\n    Batch-\u003e\u003eS3: Sends GZ file\n    Batch-\u003e\u003eS3: Asks for data\n    S3-\u003e\u003eBatch: Sends GZ file back\n    Batch-\u003e\u003eBatch: Uncompresses file\n    Batch-\u003e\u003eDynamoDB: Saves data in data base\n    Reactive Service-\u003e\u003eSSM: Startup\n    SSM-\u003e\u003eReactive Service: Configuration Data\n    Localstack Reactive Service-\u003e\u003eSSM: Startup\n    SSM-\u003e\u003eLocalstack Reactive Service: Configuration Data\n    Batch-\u003e\u003eSSM: Startup\n    SSM-\u003e\u003eBatch: Configuration Data\n    Cloud Service-\u003e\u003eSSM: Startup\n    SSM-\u003e\u003eCloud Service: Configuration Data\n    end\n```\n\n#### Walk through\n\n\u003cdiv align=\"center\"\u003e\n      \u003ca title=\"Learning AWS with Localstack and Reactive Kotli DEMO- A stamps and coins implementation\" href=\"https://www.youtube.com/watch?v=Xe8qjnfWJp4\"\u003e\n     \u003cimg \n          src=\"https://img.youtube.com/vi/Xe8qjnfWJp4/0.jpg\" \n          style=\"width:50%;\"\u003e\n      \u003c/a\u003e\n\u003c/div\u003e\n\n#### Demo\n\nTo make it easy for you, I've created a few scripts to run this demo in a seamless way.\n\nThe most important script however, is the `demo-full-manual`.\n\nIf you run:\n\n```shell\nmake demo-full-manual\n```\n\nThen just wait until it completes. The cypress pop-up will appear. You can then start the tests manually and see how this application works!\n\n#### Swagger tests\n\nYou can make tests for this application using the Swagger UI at:\n\n###### Stamps and Coins LocalStack Service\n\n-   [Stamps and Coins LocalStack Service stamps-and-coins-ls-service 8080](http://localhost:8080/api/staco/ls/webjars/swagger-ui/index.html)\n-   [Stamps and Coins LocalStack Service stamps-and-coins-ls-service 8082 (local)](http://localhost:8082/api/staco/ls/webjars/swagger-ui/index.html)\n\n###### Stamps and Coins Reactive Service\n\n-   [Stamps and Coins Reactive Service stamps-and-coins-ls-service 8080](http://localhost:8080/api/staco/service/webjars/swagger-ui/index.html)\n-   [Stamps and Coins Reactive Service stamps-and-coins-ls-service 8081 (local)](http://localhost:8081/api/staco/service/webjars/swagger-ui/index.html)\n\n## References\n\n### Videos\n\n-   [you need to learn AWS RIGHT NOW!! (Amazon Web Services)](https://www.youtube.com/watch?v=bgPuPSPZe2U)\n-   [Top 50+ AWS Services Explained in 10 Minutes](https://www.youtube.com/watch?v=JIbIYCM48to)\n-   [Spring Boot CRUD Example using AWS DynamoDB](https://www.youtube.com/watch?v=3ay92ZdCgwQ)\n-   [Setting up AWS v2 with Spring Boot and Localstack](https://www.youtube.com/watch?v=FOzAdoxdnSc)\n-   [Running AWS Services In A Laptop Using LocalStack](https://www.youtube.com/watch?v=8hi9P1ffaQk)\n\n### Online\n\n-   [How to externalize Spring Boot Properties to an AWS System Manager Parameter Store](https://towardsaws.com/how-to-externalize-spring-boot-properties-to-an-aws-system-manager-parameter-store-2a945b1e856f)\n-   [Representational state transfer](https://www.wikiwand.com/en/Representational_state_transfer)\n-   [REST (REpresentational State Transfer)](https://searchapparchitecture.techtarget.com/definition/REST-REpresentational-State-Transfer)\n-   [Wat is on-premise en wat is de cloud?](https://www.dynamicsonline.nl/erp-software/wat-is-on-premise-en-wat-is-de-cloud/)\n-   [Who Coined 'Cloud Computing'?](https://www.technologyreview.com/2011/10/31/257406/who-coined-cloud-computing/)\n-   [The history of cloud computing](https://www.scality.com/solved/the-history-of-cloud-computing/)\n-   [My First 12 Years at Amazon.com](http://jeff-barr.com/2014/08/19/my-first-12-years-at-amazon-dot-com/)\n-   [A Brief History of AWS](https://mediatemple.net/blog/cloud-hosting/brief-history-aws/)\n-   [When to use (and when not to use) DynamoDB Filter Expressions](https://www.alexdebrie.com/posts/dynamodb-filter-expressions/)\n-   [DynamoDB Scan vs Query - Everything You Need To Know](https://dynobase.dev/dynamodb-scan-vs-query/)\n-   [What is \"/var/folders\"?](http://www.magnusviri.com/what-is-var-folders.html)\n-   [From PostgreSQL to DynamoDB](https://www.dyspatch.io/blog/from-postgresql-to-dynamodb/)\n-   [Amazon Web Services Systems Manager](https://docs.aws.amazon.com/cli/latest/reference/ssm/index.html#cli-aws-ssm)\n-   [Don’t Be Intimidated — Learn How to Run AWS on Your Local Machine With LocalStack](https://betterprogramming.pub/dont-be-intimidated-learn-how-to-run-aws-on-your-local-machine-with-localstack-2f3448462254)\n-   [Spring Boot Integration Tests With AWS Services Using LocalStack](https://rieckpil.de/test-spring-applications-using-aws-with-testcontainers-and-localstack/)\n-   [Using LocalStack for Development Environments](https://www.maxcode.net/blog/using-localstack-for-development-environments/)\n-   [Configuring Docker Swarm as Container Orchestrator on Windows](https://koukia.ca/configuring-docker-swarm-as-container-orchestrator-on-windows-1f89a2037dac)\n-   [What is a Docker Swarm](https://www.sumologic.com/glossary/docker-swarm/)\n-   [Kubernetes vs. Docker](https://azure.microsoft.com/en-us/topic/kubernetes-vs-docker/)\n-   [Working with Queries in DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html)\n-   [How to determine if Amazon DynamoDB is appropriate for your needs, and then plan your migration](https://aws.amazon.com/blogs/database/how-to-determine-if-amazon-dynamodb-is-appropriate-for-your-needs-and-then-plan-your-migration/)\n-   [5 Use Cases for DynamoDB](https://rockset.com/blog/5-use-cases-for-dynamodb/)\n-   [Local Stack Pro Features](https://localstack.cloud/features/#pro)\n-   [LocalStack](https://github.com/localstack/localstack)\n-   [LocalStack Cloud](https://localstack.cloud/)\n\n## About me\n\n[![GitHub followers](https://img.shields.io/github/followers/jesperancinha.svg?label=Jesperancinha\u0026style=for-the-badge\u0026logo=github\u0026color=grey \"GitHub\")](https://github.com/jesperancinha)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesperancinha%2Fstaco-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjesperancinha%2Fstaco-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesperancinha%2Fstaco-app/lists"}