/nlw-valoriza

Valoriza is a platform to promote recognition among teammatesm @Rocketseat nlw#6

Primary LanguageTypeScript

Logo

NLW - Valoriza | NLW#6

languages languagesTop repo-size last-commit

Application developed in the sixth edition of Rocketseat Next Level Week 💻🚀

AboutTechnologiesUsageContributionAuthorLicense

home

🤗 NLW - Valoriza | NLW#6 🗣 compliments... 😘

🎯 About

Valoriza is a platform to promote recognition among teammates.

🛠 Technologies

The following tools were used in the construction of the project:

👷 Usage

Required! Install git, node and yarn (or npm).

# Clone Repository
$ git clone https://github.com/RodrigoSaantos/nlw-valoriza.git

# Go to server folder
$ cd nlw-valoriza

# Install Dependencies
$ yarn
# or
$ npm install

# Run Aplication
$ yarn start
# or
$ npm run start

# Access localhost
http://localhost:3000

Routes ➡️

  • POST
    • /tags -> Create new tag
    • /users -> Create new user
    • /login -> User authenticated
    • /compliments -> Create compliments (admin)
  • GET
    • /tags -> List all tags
    • /users -> List all users
    • /users/compliments/send -> List send compliments
    • /users/compliments/receive -> List receive compliments

Rules

  • Create User

    • It is not allowed to register more than one user with the same email

    • It is not allowed to register user without e-mail

  • Create TAG

    • It is not allowed to register an unnamed tag

    • It is not allowed to register more than one tag with the same name

    • Registration by users who are not administrators is not allowed

  • Create Compliments

    • Users are not allowed to register a compliment for themselves

    • It is not allowed to register compliments for invalid users

    • The user must be authenticated in the application

Requests

  • POST /session

Request body:

{
  "email": "contato.rodrigosaantos@gmail.com",
  "password": "12345678"
}
  • POST /users

Request body:

{
  "name": "Rodrigo",
  "email": "contato.rodrigosaantos@gmail.com",
  "password": "12345678",
  "admin": true
}
  • POST /tags

Request body:

{
  "name": "Leader",
}
  • POST /compliment

Request body:

{
  "tag_id": "sa78a97s-d8a0-8c783-382g-382sk92ja873",
  "receiver_id": "sui78e7sd-a87l-107l-2znk-19so7uj4hs73",
  "message": "You are great leader"
}

🤝 Contribution

This project is for study purposes too. All kinds of contributions are very welcome and appreciated!

  • Fork this repository;
  • Create a branch with your feature: git checkout -b my-feature;
  • Commit your changes: git commit -m 'feat: My new feature';
  • Push to your branch: git push origin my-feature.

💻 Author

Rodrigo Santos

By Rodrigo Santos 👋🏽 Find me:

Linkedin Badge | Gmail Badge

📝 License

This project is under the MIT license.