Skip to content

r-sitko/todo-list-app-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo list microservices architecture application

Table of contents

Description

This project demonstrates microservices architecture based application.

Main application features:

  • gRPC APIs
  • SSL encryption between client and backend
  • users can login and register accounts
  • JWT token authorization
  • gateway API
  • logged users can create, get, list, update and delete todo list entries
  • services use MySQL databases
  • services are running in Docker containers

Application consists of three services:

  • Gateway API service - SSL encryption, JWT token verification, authorization and orchestration
  • User service - registering users, managing user accounts, authentication and JWT token generation
  • Todo service - creating, updating, deleting and querying todos

Project structure

.
├── gateway - directory with gateway service
│   ├── inc
│   │   └── gateway - directory with header files
│   ├── src - directory with source code files
│   └── third_party - external dependencies (libraries)
│       └── jwt-cpp
├── protos - directory with gRPC interfaces
│   ├── todo - directory with gRPC interface for todo service
│   └── user - directory with gRPC interface for user service
├── test - directory with end2end tests
│   └── certs - directory with test certificates
├── todo - directory with source code and tests for todo service
│   ├── tests
│   │   └── integration - directory with integration tests for todo service
│   │       └── certs - directory with test certificates
│   └── todo - package with todo service code
└── user - directory with source code and tests for user service
    ├── tests
    │   └── integration - directory with integration tests for user service
    │       └── certs - directory with test certificates
    └── user - package with user service code

Cloning repository

git clone --recursive https://github.com/rsitko92/todo-app-microservices.git

Prerequisites

Generating interfaces

Being in root directory of project run:

sudo protos/run.sh

Generated interfaces definitions will be placed in protos/.gen directory. It is sufficient to generate they only one time.

Generating diagrams

Being in root directory of project run:

docs/diagrams/generate.sh

Generated images with diagrams will be placed in docs/diagrams/out directory.

Running tests

Before running any kind of tests (integration or end2end) generate the gRPC client and server interfaces from .proto service definitions files. See section Generating interfaces.

Running integration tests

  • User service:

    Being in root directory of project run:

    sudo user/tests/integration/run.sh
  • Todo service:

    Being in root directory of project run:

    sudo todo/tests/integration/run.sh

Running end2end tests

Being in root directory of project run:

sudo test/run.sh

Technology stack

User service technology stack

  • Python3
  • Docker
  • gRPC Python
  • SQLAlchemy
  • PyJWT
  • MariaDB (MySQL relational database management system)

Todo service technology stack

  • Python3
  • Docker
  • gRPC Python
  • SQLAlchemy
  • PyJWT
  • MariaDB (MySQL relational database management system)

Gateway API service technology stack

  • C++
  • Docker
  • gRPC C++ with SSL
  • jwt-cpp
  • CMake

End2end tests technology stack

  • Python3
  • Docker
  • gRPC Python
  • PyJWT

Diagrams

Deployment diagram

Deployment diagram

Login user sequence diagram

Login user sequence diagram

Register user sequence diagram

Register user sequence diagram

Create todo sequence diagram

Create todo sequence diagram

Get todo sequence diagram

Get todo sequence diagram

Delete todo sequence diagram

Delete todo sequence diagram

Update todo sequence diagram

Update todo sequence diagram

List todo sequence diagram

List todo sequence diagram

About

A todo list backend application written using microservices architecture. Used languages and technologies: gRPC, C++, Python, Docker, JWT, SQL, SQLAlchemy.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published