Skip to content

Tasks App - Modular Monolith

License

Notifications You must be signed in to change notification settings

heikkilamarko/tasks-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tasks App - Modular Monolith

A simple single binary task management app, built as a modular monolith. The app supports single-process and multi-process setups. In the multi-process setup, each instance is configured to run a subset of the modules.

Tech Stack

TECHNOLOGY DESCRIPTION
NATS Messaging, WebSockets, KV Store, Object Store
PostgreSQL Database
ZITADEL Identity and Access Management (IAM)
Terraform Infrastructure Automation
Bash Scripting
Go Programming Language
htmx Web Technology
Hyperscript Frontend Scripting Language

Infrastructure Setup

The infrastructure is built on top of the Azure K3s setup provided in the following GitHub repository:

https://github.com/heikkilamarko/azure-k3s-demo

Hosts Configuration

To enable local name resolution for the services, add the following entries to your /etc/hosts file, replacing <IP_ADDRESS> with the external IP of your K3s ingress controller or load balancer:

<IP_ADDRESS> zitadel.local
<IP_ADDRESS> smtp4dev.local
<IP_ADDRESS> tasks-app.local

NATS Configuration

Follow the instructions in infra/nats to configure NATS.

PostgreSQL Configuration

Follow the instructions in infra/postgresql to configure PostgreSQL.

ZITADEL Configuration

Follow the instructions in infra/zitadel to configure ZITADEL.

Application Deployment

Build the Application

./ci.sh <docker_image_tag>

Deploy as a Single Binary

./cd.sh <docker_image_tag> single
./cleanup.sh <docker_image_tag> single

Deploy as Microservices

./cd.sh <docker_image_tag> micro
./cleanup.sh <docker_image_tag> micro

Application

Access the Tasks application at:

https://tasks-app.local/

Example Users

Log in using the following example credentials:

Username Initial Password
johndoe S3c_r3t!
janedoe S3c_r3t!

smtp4dev Web UI

Inspect outgoing application emails such as password change notifications or task expiration alerts using the smtp4dev web interface:

https://smtp4dev.local/