Skip to content

alexx666/clean-arch-todos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clean-arch-todos

tests Conventional Commits Commitizen friendly

A Monorepo for practicing and studying software architecture and system design using the following concepts:

  • Domain Driven Design (DDD)
  • Command and Query Responsibility Segregation (CQRS)
  • Event Sourcing (ES)
  • Clean Architecture

The project is a simple todo list app (...for now!), glorified and overengineered for the purposes of learning.

Architecture

The project is comprised of the following packages:

  • @todos/core - Shared library containing the entire core of the application
  • @todos/api - Serverless REST API which provideds the core logic of the app. Deployed using AWS SAM
  • @todos/cli - CLI tool for interracting with the API
  • @todos/web - minimal Angular frontend developed using NGRX

architecture

For a design overview see DESIGN.md

Pre-requisites:

Getting Started

The following instruction can get the project up and running.

Installing

npm ci

Static analysis checks and tests

npm run lint
npm run test

Building

Build Source

npm run build

Deploy

Configure AWS CLI

Note: you can find instructions on how to configure AWS CLI here

// omit this step of you use the default profile after configuring
export AWS_PROFILE=<your-aws-cli-configured-profile-name>

Deploing the API

npx nx deploy api

Running

Serve Web and API, along with a local version of DynamoDB.

npm run serve

Run CLI

npx nx start cli -- <command> <options>

Note: use --help or -h to see available commands and options.

Notes

  • Requests directly to the API are available via Thunder Client which has been included as a recommended extension
  • Testing CLI package publishing can be done using verdaccio. It's served using docker when invokking npm run serve
  • For complete local development a local SNS and SQS services are needed.