Application hosted at heroku.
See docs: https://buzzl.herokuapp.com/docs.
Buzzl is being built to offer a complete platform for everyone seeing have a better control over their services, and their customers opinion about them. Here you can register yourself on the platform and create services, that will be able to receive feedbacks and rates from your customers. This will allow you have a contact with customers feedbacks, which can be a ISSUE, an IDEA, or OTHERS, and calculate your services NPS, knowing how your customers are evaluating your services. This is an open source application, which is begin built using Nodejs, including a lot of other concepts and new technologies such as Typescript, SOLID principles, Clean Architecture, DDD, TDD, Docker, PostgreSQL, Redis...
This project structure is inspired in clean architecture code structure, by Uncle Bob. The main purpose of clean architecture, hexagonal architecture, and others softwares architecture structure, is creating a strong, readable, understandable and maintainable project code, splitting all the application code in layers, each one with their own responsibilities and characteristics. The best advantage of using it, is create a application independent of any frameworks, tool, database or technology (infra layer), being easy to handle the code, create a new features, fix any issue, or change some framework, becoming less vulnerable to changes to frameworks and libs, thanks to the adapters and ports technique, that make this frameworks being just a part of the software, and uncoupling them to the domain business rules.
As is shown in the images, the ideia is that external layers can know internal layers, but never the opposite, because a framework, for example, can know the entity, to execute specific tasks. But domain is totally independent of external libs, so it never know each lib or framework is persisting the data for example.
root
โโโ .github โ Github files
โ โโโ assets
โ โโโ workflow
โโโ src โ Application main code
โ โโโ app โ Composition layer, entry point code, server setup...
โ โ โโโ server.ts โ Server entry point
โ โโโ modules โ App modules
โ โ โโโ domain โ Module's entities
โ โ โโโ usecases โ Business rules
โ โ โโโ controllers โ Controllers
โ โ โโโ repositories โ Module's repository interface
โ โโโ infra โ External frameworks and libs ports implementation (orm, encrypter)
โ โโโ presentation โ External api communication layer (controllers, validators)
โโโโ tests โ Application tests code
โโโ e2e
โโโ unit
Users password are hashed with Argon2 hasher, winner of the Password Hashing Competition (PHC), the most recommended and secure hashing algorithm option. Authentications tokens are generated using JWT, most used tool to generate authentication tokens for web applications, which are encoded with a key pair of RSA keys using RS256 asymmetric cryptography algorithm, increasing token's authenticity.
To run this project locally, you will have to install Nodejs and PostgreSQL on the machine, or run everything with Docker and docker-compose. Before run the project, go to .env.example file, on project root, and rename it to .env only, filling all the properties in the file with your information (api port, db credentials...). Public and private keys must be generated with the commands below, and pasted in ..env file, with \n
and no spaces after each line; something like this: TOKEN_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBiYJxPJIC/XiBo50AKFcSmHlZ\nS9lVPBTFk7c4rP/4cIt9dtLYms3eOVWLZem8/KW48u1P6tcbdfQx7kuuXonDYoWx\nUm2paTlQ6+eB4ffjNp2gtuXndab0WgUc93700Wn5H1edqT90eP5Z2Xp44Cgr33Gf\n6YdJ0I8Yb8E9uRSTkwIDAQAB\n-----END PUBLIC KEY-----\n"
.
git clone https://github.com/gabriellopes00/buzzl.git
or
git clone git@github.com:gabriellopes00/buzzl.git
openssl genrsa -out private_key.pem 1024 && \
openssl rsa -pubout -in private_key.pem -out public_key.pem
docker-compose up -d --build
npm install
npm run build
npm run start
- All โฏ
yarn test
- Coverage โฏ
yarn test:ci
- Unit โฏ
yarn test:unit
- e2e โฏ
yarn test:e2e
- Lint(eslint) โฏ
yarn lint
- Style(prettier) โฏ
yarn style
Following the standard of the Conventional Commits.
- feature commits(amount) โฏ
git shortlog -s --grep feat
- test commits(amount) โฏ
git shortlog -s --grep test
- refactor commits(amount) โฏ
git shortlog -s --grep refactor
- chore commits(amount) โฏ
git shortlog -s --grep chore
- docs commits(amount) โฏ
git shortlog -s --grep docs
- build commits(amount) โฏ
git shortlog -s --grep build
This project uses GPL-3.0 license, which allows anyone modify, distribute and use the application code in many different ways. However there are many conditions, such as License and copyright notice, State changes, Disclose source and Use the same license. Read complete license to know more about permissions and copyright.