Skip to content

zakbain/messenger-event-driven

Repository files navigation

Requirements of system

  1. Basic user CRUD (no delete)
  2. Basic message CRUD (no delete)
  3. Get messages between two users
  4. Search for word in messages

Check swagger for REST API - http://localhost:3000/api

Installation & Docker start

$ yarn install
$ docker-compose up -d

Run saved migrations

$ yarn build
$ yarn migration:run 

Running the app

$ yarn start:dev

Navigate to http://localhost:3000/api for swagger documentation

Seed data

Make sure server is running (yarn start)

./scripts/seed-users.sh
./scripts/seed-messages.sh <userId1> <userId2>

Note: Replace userId1 and userId2 with the user ids returned from seed-users.sh

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

Create new migration

# Only do this if you updated/created an entity
$ yarn migration:generate src/database/migrations/{MIGRATION_NAME}

messenger-event-driven

Event Driven messenger arch

The following guides are very helpful

About

Event Driven messenger arch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published