Code Monkey home page Code Monkey logo

todo-list-app-microservices's Introduction

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

todo-list-app-microservices's People

Contributors

r-sitko 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.