/aula

🏫 A microservice oriented webservice exploring the CNCF landscape

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

Aula — A microservice oriented webservice exploring the CNCF landscape

CI

Goals

  • Microservices: Implement a webservice using a microservice architecture
  • Containerized: Every service should be able to run within its own container.
  • Cloud Native: Try to incorporate useful tooling from the CNCF project.
  • Serverless: Explore how serverless and a microservice architecture work together.
  • Learn: Explore latest techniques, tools from the Cloud Native Foundation and industry and have fun doing so.

Getting started

Recommend way is to use the provided docker environment:

# setup env
$ make configure
# start app
$ docker-compose up

This repo is exploring the monorepo paradigm. To facilitate this Lerna is used. Getting started should be as simple as running npm install:

$ npm install
# start app
$ npx lerna start

Note: This method requires you to setup your own environment

Packages

  • 🌍 base-serverBase HTTP server with Express.js
  • 🎖 commandsShared commands constants used by services
  • 🔐 cryptoEncryption utilities
  • 🎆 eventsShared events constants emitted by services

Services

  • 🔑 authAuthentication with JWT
  • 📓 courseCourse REST API
  • 🕵️‍♂️ searchSearch REST API using Elasticsearch
  • 👨‍🎨 userUser REST API
  • 🦄 webSSR React web app with Next.js
  • 🔮 websocketWebsockets with socket.io

Screenshots

Release

Releasing a new version can be done via the make release command. This command will ask you for a version tag or fallback to branchname-commithash. After the build images will be pushed to the hub.

# Build and push images
$ make release
QUEST:   Version tag?:[master-87265e6] -> 1.0.0
INFO:    Starting build for version 1.0.0
...

Todo

Packages

  • Events
  • Commands
  • HTTP Api's client libraries with circuit breaker (opossum)

Services

  • Move services from packages to services
  • Authenticate websocket requests
  • Workers (eg. search indexers) with queue groups
  • Caching (maybe: apicache)
  • Authorization with express-jwt-permissions
  • Version message queue
  • Course content (files)
  • Course enrollment
  • Notifications
  • Emails
  • Grades
  • Feed
  • Recommendation (search)
  • Graphql

App

  • Implement search
  • Implement course detail page

Testing

  • Smoke test after build, before release
  • Write tests and run through CI

Operations

  • Logging
  • Tracing
  • Automate provisioning (db, servers, elastic etc.)
  • Deployment
  • Istio
  • Autoscaling

CI

  • Only build changed services
  • Build multiarch images