This is a todo app based on microservice architecture. I made this project while learning about Docker, Kubernetes, gRPC, Service Meshes.
Here is an overview of the application architecture.
Service | Language, Framework | Description |
---|---|---|
frontend | HTML, CSS, JavaScript | This is a simple web app written in plain HTML, CSS, JavaScript. It's docker image uses apache httpd to serve the web app. |
api-service | Python, FastAPI | This service exposes RESTful APIs that the frontend communicates with. It doesn't have much business logic but instead further communicates with auth-service and todo-service over gRPC to handle the requests. The protobuf definitions can be found here. |
auth-service | Go | This service handles all the authentication, registration, etc. logic. It stores all its data in a PostgreSQL database. |
todo-service | TypeScript | This service basically handles all the CRUD operations of todos. It stores all its data in a MongoDB database. |
To run this app first you'll need to build the docker images for all the services.
cd frontend
docker build -t todo-app-frontend:v1 .
cd auth-service
docker build -t todo-app-auth-service:v1 .
cd todo-service
docker build -t todo-app-todo-service:v1 .
cd api-service
docker build -t todo-app-api-service:v1 .
Now, you can deploy the app on your kubernetes cluster.
kubectl create ns todo-app
kubectl apply -f kubernetes/
Home Page | Login Page |
---|---|
Here are some other larger sample projects based on microservice architecture that you should check out.
- Online Boutique by Google
- Bookinfo Application by Istio