Code Monkey home page Code Monkey logo

aosolorzano / city-tasks-aws-fullstack Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 866 KB

A fullstack application deployed on AWS using Copilot, SAM, and Amplify.

License: Apache License 2.0

Makefile 0.12% Dockerfile 1.93% Java 54.06% Shell 16.58% TypeScript 18.27% HTML 5.14% SCSS 3.87% JavaScript 0.03%
angular aurora-postgresql aws-acm-certificate aws-alb aws-amplify-angular aws-cognito aws-copilot aws-dynamodb aws-eventbridge aws-fargate

city-tasks-aws-fullstack's Introduction

EDA using Spring Boot and Spring Cloud Functions to deploy native executables on ECS and Lambda respectively.

  • Author: Andres Solorzano.
  • Level: 400 - Advanced.
  • Technologies: Java 17, Spring Boot 3, Spring Cloud 4, Spring Native, Spring WebFlux, Spring OAuth2, Quartz, Flyway, Lombok, Docker, Testcontainers, LocalStack, AWS Copilot CLI, AWS SAM-CLI, Amazon Cognito, Amazon Aurora, DynamoDB, Application Load Balancer, EventBridge, Lambda, and Amplify.

You can read the following articles from my Medium.com account to get more project details:

  1. Multi-Account environment on AWS using IAM Identity Center.
  2. End-to-End Encryption using TLS ECDSA certificate and ACM with Copilot CLI.
  3. EDA using Amazon EventBridge, Lambda, and SAM-CLI, with Fargate ECS as Event Source.
  4. Storing EDA events in DynamoDB from a Native Lambda Function using Spring Cloud Functions.
  5. FullStack application on AWS using Ionic/Angular Frameworks inside an Nx Monorepo with PNPM and Amplify.

Description.

This project uses Spring Boot to manage Quartz Jobs with the help of Spring Webflux and Spring Native. The Quartz library is configured for a clustered environment, so it needs Postgres to store and manage Jobs executions. When a Quartz Job is executed, the calling method retrieves the Device item associated with the Tasks and updates its state in DynamoDB. To perform all these activities, the users must have a valid access token (JWT) to access the endpoints. All test cases use TDD from the beginning of the development, and only Integration Tests are executed with the support of Testcontainers and LocalStack to try to cover real-world scenarios. This project also uses Docker Compose to deploy a local cluster with the required services for local testing.

Prerequisites.

  • Git.
  • NodeJS (version 18.+).
  • Nx CLI (version 17.+).
  • PNPM (version 8.11.+).
  • AWS Copilot CLI (version 1.27.+).
  • AWS SAM CLI (version 1.90.+).
  • OpenJDK (version 17.0.+). You can use SDKMAN.
  • Apache Maven (version 3.9.+) You can use SDKMAN.
  • Spring Boot (version 3.1.+).
  • Spring Functions (version 4.0.+).
  • Docker and Docker Compose (version 24.0.+).

Project Structure.

The project is divided into the following files/directories:

  • apis: Back-end source code.
  • apps: Front-end source code.
  • copilot: AWS Copilot configuration files.
  • template.yaml: AWS SAM configuration.
  • compose.yaml: Docker Compose configuration.
  • pom.xml: Java projects parent POM.
  • tools: Files used for automation deployment.

Deployment Options.

You need to execute the following command from the project's root directory:

./run-scripts.sh

The script will ask you for the required AWS profiles to deploy the application locally or in AWS:

Then, the script shows a main menu with the following options:

If you choose option 'h' for 'Helper Menu,' you can create/deploy dependent resources required before deploying the application on AWS.

Internal Documentation.

The internal project documentation is divided into the following directories:

  • apis/city-events-function: Contains Spring Functions project's documentation.
  • apis/city-tasks-api: Contains Spring Boot project's documentation.
  • apps/city-tasks-app: Contains Ionic/Angular project's documentation.
  • docs/images: Contains solution's architecture images.

The markdown documentation for individual projects is available at:

city-tasks-aws-fullstack's People

Contributors

aosolorzano avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.