I analyzed the system and put some time to understand how the requested ecosystem must be. The communication, safety, speed, and scalability.
- NestJs - Node + TypeScript + Fastify
- REST API - Communicate from outside of ecosystem
- GRPC - Faster communication for internal communications
- Graph QL - Get data from database
- PostgreSQL
- TypeORM - Nest uses to communicate with database
- Jest - Nest uses to create test cases
- Github
- projects
- issues
- standard git-flow for branching
- Managing users - Oxygen (Because users are the important part of a LIVE system)
- Messaging - Rhenium (Because this chemical element used in electrical contact materials)
- Wallet - Nickel (Because it is a money unit)
- Grouping(club) - Carbon (Because it creates very strong groups like diamonds)
- Readable data provider - Francium (Because it likes to give the electrons)
- Writable data provider - Fluorine (Because it like to receive electrons)
This is a wrapper on the Nestjs server, it provides all common filters, middlewares, interceptors, guards, and... It is published on NPM, so for services, you can use it without being worried about common feature implementations.
You can find it here, nest-plus.
- Authorizer
- Access control
- Validator
- Extractor
- Logging
- Invalid request
- Endpoint NotFound
- Internal error
- Operation failed
Services and parts of systems need name. so I decided to choose chemical elements for services as a metaphor for elements that create the system. Also tried to choose elements which has similar usage with the server itself.
I divided the whole system into 6 services which every one of them has only one porpose and responsibility.
These services are:
- Managing users - Oxygen
- This service manages the users who can be any type of entity; Real, legal or fictional.
- Messaging - Rhenium
- This service broadcast a message or receive messages.
- Wallet - Nickel
- This service manages the assets belonging to an entity. Assets can be anything and they all connect to a unique code.
- Grouping(club) - Carbon
- This service can put several entities in an abstract group and perform activities on it.
- Readable data provider - Francium
- This service responsible for fetching data as fast as possible.
- Writable data provider - Fluorine
- This service responsible for registering data fast and sync with readable data provider.
JWT generated by a PEM secret key.