Skip to content

Badmuts/aula

Repository files navigation

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-server โ€” Base HTTP server with Express.js
  • ๐ŸŽ– commands โ€” Shared commands constants used by services
  • ๐Ÿ” crypto โ€” Encryption utilities
  • ๐ŸŽ† events โ€” Shared events constants emitted by services

Services

  • ๐Ÿ”‘ auth โ€” Authentication with JWT
  • ๐Ÿ““ course โ€” Course REST API
  • ๐Ÿ•ต๏ธโ€โ™‚๏ธ search โ€” Search REST API using Elasticsearch
  • ๐Ÿ‘จโ€๐ŸŽจ user โ€” User REST API
  • ๐Ÿฆ„ web โ€” SSR React web app with Next.js
  • ๐Ÿ”ฎ websocket โ€” Websockets 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