Krrunchy Architecture
Krrunchy Architecture
Krrunchy will be a microservices based web application that can be accessed by Web and Mobile UI clients.
- Each microservice will be a well defined feature with its own database. I intend to use SQL DBs for now.
- These microservices will communicate in a choreographed SAGA pattern via an event bus.
- The authentication will be based on OAuth2 framework using Google as the authentication provider
- The microservices will be accessible via an API gateway.
- Each microservice will have its own unit tests
- There will be 2 types of clients - Web based UI and an Android based UI. These clients will have their own unit tests.
Technology Choices
- PostgreSQL for al the DBs
- Springboot for the microservices. JUnit and Mockito for the unit tests.
- Docker for containerization
- Apache ActiveMQ for event bus
- Angular for the web client
- REST-Assured for API testing
- Android for Mobile Client
- API Gateway (yet to be finalized)
Tools
- Eclipse IDE for Springboot development.
- Postman for API testing
Architectural Concerns
- CI / CD pipeline to be set up
- Service discovery, auto scaling and high availability to be addressed once basic features are implemented.
- Containers to be deployed on cloud in the future using dedicated host
- Domain name to be registered
- OAuth to be implemented for these services for security
Microservices
Menu Service - Repository
This service will be responsible to
- Add new menu as defined by Kitchen Admin (admin access only)
- Modify existing menus (admin access only)
- Delete existing menus by ID (admin access only)
- Retrieve existing menus by ID
Dependencies - None
Scheduling Service - Repository
This service will be responsible to
- Schedule a given menu ID on a given date (admin access only)
- Schedule a blackout date (admin access only)
- Get a weekly menu from given start date
- Get the menu of a given date
Dependencies - Menu Service
Customization Service [Not started]
This service will be responsible to
- Customize a menu on a given date for a given user
- Retrieve customizations for given user (admin access only)
- Retrieve all customizations for a given date. (admin access only)
Dependencies - Menu Service, Scheduling Service
User Authentication Service [Not started]
This service will be responsible to generate and validate OAuth2 tokens for user interaction.
Clients
Web UI Client - Repository
This is an Angular based application to interact with the Krrunchy Backend.
- Tools - Visual Studio Code
- Nodejs and Angular
- Unit tests to be written using Jasmine or Karma.
Mobile Client (Android) Repository
This is a mobile client created using Android / Java using Android Studio.