developeramarish / angkor

(Almost) purely educational app to manage nice places and recipes. Stack: Single-page app (Angular 12), Spring Boot 2.5 (Kotlin), PostgreSQL 12, Go, Mapbox GL, Cognito/OAuth2, Docker Compose, Terraform/AWS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular Kotlin Spring Go Terraform AWS Postgres Docker

Releases GitHub language count License Quality Gate Status kotlin-ci angular-ci Go Report Card

Project "Angkor" - Angular Golang Kotlin RESTful Webapp Stack

This (almost) purely educational app manages places I'd like to visit some day, and helps me to keep track of more or less exotic dishe recipes.

Key technologies: Angular based single-page app with Mapbox GL, AWS Cognito for OAuth2, PostgreSQL DB and S3 for persistence and a Spring Boot backend written in Kotlin, various spin-off tools written in Golang, all provisioned to AWS Infrastructure with Terraform and lots of Confidence.

tl;dr

$ make angkor
๐ŸŒ‡ Successfully Built Angkor 

Modules

Angkor is a monorepo which combines the following modules and technologies:

Path Descriptions Technologies / Tools / Language(s) Build Status
/terraform Cloud Infrastructure as Code Terraform, HCL, aws  terraform-ci
/kotlin Server Backend Kotlin, Spring Boot, Gradle, docker  kotlin-ci
/angular Frontend and reverse proxy Angular, TypeScript, yarn, Nginx, docker  angular-ci
/tools Supporting services such as webhooks golang, systemd  golang-ci
/docs Project Documentation Antora, asciidoc  antora-ci

Components & Infrastructure

You should have AWS CLI and most importantly Terraform installed. In a nutshell the application's neighborhood looks as follows:

Angkor wasn't built in a day ...

We use good old GNU Make utility to manage all tasks for terraform, gradle, yarn and whatever else we have in our ecosystem centrally. Rund without args to see what's possible, open the Makefile to look beyond!

  $ make
  api-clean            Cleans up ./api/build folder
  api-build            Assembles backend jar in ./api/build with gradle (alias: assemble)
  api-test             Runs spring boot unit and integration tests in ./api
  api-run              Runs springBoot API in ./api using gradle bootRun (alias: bootrun)
  api-mock             Runs OIDC (and potentially other) mock service for api
  api-deploy           Deploys API with subsequent pull and restart of server on EC2

  ui-clean             Remove UI dist folder ./ui/dist
  ui-build             Run ng build  in ./ui
  ui-build-prod        Run ng build --prod in ./ui
  ui-test              Runs chromeHeadless tests in ./ui
  ui-run               Run UI with ng serve and opens UI in browser (alias: serve,open,ui)
  ui-deploy            Deploys UI with subsequent pull and restart of server on EC2
  ui-mocks             Run json-server on foreground to mock API services for UI (alias: mock)

  infra-init           Runs terraform init on working directory ./infra, switch to
  infra-plan           Runs terraform plan with implicit init and fmt (alias: plan)
  infra-deploy         Runs terraform apply with auto-approval (alias: apply)

  ec2-stop             Stops the ec2 instance (alias: stop)
  ec2-start            Launches the ec-2instamce (alias: start)
  ec2-status           Get ec2 instance status (alias: status)
  ec2-ps               Run docker compose status on instance (alias: ps)
  ec2-login            Exec ssh login into current instance (alias: ssh,login)
  ec2-deploy           Pull recent config on server, triggers docker-compose up (alias: pull)

  docs-clean           Cleanup docs build directory
  docs-build           Generate documentation site using antora-playbook.yml
  docs-push            Generate documentation site and push to s3
  docs-deploy          Deploys docs with subsequent pull and restart of server on EC2 (alias: docs)

  tools-test           Run lint and tests (tbi)
  tools-deploy         Interim task to trigger re-init of tools on server side

  all-clean            Clean up build artifact directories in backend and frontend (alias: clean)
  all-build            Builds frontend and backend (alias: build)
  all-test             Builds frontend and backend (alias: build)
  all-deploy           builds and deploys frontend and backend images (alias deploy)

  angkor               The ultimate target - builds and deploys everything ๐Ÿฆ„

  release              create final release tag with semtag

I want more Documentation

Seriously? Check our Dedicated angkor-docs project built with Antora

Contribute

See CONTRIBUTING.md

About

(Almost) purely educational app to manage nice places and recipes. Stack: Single-page app (Angular 12), Spring Boot 2.5 (Kotlin), PostgreSQL 12, Go, Mapbox GL, Cognito/OAuth2, Docker Compose, Terraform/AWS

License:Apache License 2.0


Languages

Language:TypeScript 30.4%Language:Kotlin 28.6%Language:Go 11.9%Language:HTML 8.7%Language:HCL 7.0%Language:Makefile 4.9%Language:Shell 3.8%Language:SCSS 3.4%Language:Dockerfile 0.5%Language:JavaScript 0.5%Language:PLpgSQL 0.3%Language:CSS 0.1%