- Basic user CRUD (no delete)
- Basic message CRUD (no delete)
- Get messages between two users
- Search for word in messages
Check swagger for REST API - http://localhost:3000/api
$ yarn install
$ docker-compose up -d
$ yarn build
$ yarn migration:run
$ yarn start:dev
Navigate to http://localhost:3000/api for swagger documentation
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
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
# Only do this if you updated/created an entity
$ yarn migration:generate src/database/migrations/{MIGRATION_NAME}
Event Driven messenger arch
The following guides are very helpful
- https://medium.com/event-driven-utopia/configuring-debezium-to-capture-postgresql-changes-with-docker-compose-224742ca5372#:~:text=Register%20the%20Postgres%20connector%20in%20Debezium&text=Log%20in%20to%20the%20Debezium,consistent%20snapshot%20of%20the%20shipment_db%20
- https://arctype.com/blog/kafka-tutorial-1/
- https://docs.confluent.io/home/connect/self-managed/extending.html
- https://www.confluent.io/blog/kafka-elasticsearch-connector-tutorial/
- https://github.com/confluentinc/cp-all-in-one/blob/7.1.2-post/cp-all-in-one/docker-compose.yml