Skip to content

An example of CQRS/Event Sourcing and GraphQL implemented in TypeScript.

License

Notifications You must be signed in to change notification settings

s-kikuchi/cqrs-es-example-js

 
 

Repository files navigation

cqrs-es-example-js

CI Renovate License

Overview

This is an example of CQRS/Event Sourcing and GraphQL implemented in TypeScript.

This project uses j5ik2o/event-store-adapter-js for Event Sourcing.

日本語

Feature

  • Write API Server(GraphQL)
  • Read API Server(GraphQL)
  • Read Model Updater on Local
  • Docker Compose Support
  • Read Model Updater on AWS Lambda
  • Deployment to AWS

Overview

Component Composition

System Architecture Diagram

Usage

Local Environment

Build the image

$ pnpm docker-build

Starting Services

$ pnpm docker-compose-up
./tools/scripts/docker-compose-up.sh
ARCH=arm64
 Container read-api-server-1  Stopping
...
 Container docker-compose-migration-1  Started
 Container read-api-server-1  Starting
 Container read-api-server-1  Started

Testing

$ pnpm verify-group-chat
...
GroupChat:
{
  "data": {
    "getGroupChat": {
      "id": "GroupChat-01HPG4EV94HMPT08GZS0ZWW0VJ",
      "name": "group-chat-example-1",
      "ownerId": "UserAccount-01H42K4ABWQ5V2XQEP3A48VE0Z",
      "createdAt": "2024-02-13 02:24:12 +0000 UTC",
      "updatedAt": "2024-02-13 02:24:12 +0000 UTC"
    }
  }
}
...

Links

About

An example of CQRS/Event Sourcing and GraphQL implemented in TypeScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 79.6%
  • Shell 10.7%
  • JavaScript 3.8%
  • Makefile 3.5%
  • Dockerfile 2.4%