nlw-valoriza

Next Level Week Node.JS back-end application!

MIT License

Stars
0

About The Project

Features

  • Register coworkers
  • Register tags (praise)
  • Send compliments to coworkers

Built With

  • node.js - evented I/O for the backend with JS
  • Express - fast web framework for node.js
  • TypeORM - Object Relational Model framework to work easily with databases
  • PostgreSQL - Advanced Open Source Relational Database. We migrated from sqlite3 to PostgreSQL.

Business Rules

  • User registration

    • It's not allowed to register an user with same email
    • It's not allowed to register an user without email
    • It's not allowed to register an user with invalid/disposable email
    • It's not allowed to create an admin user directly
    • User password:
      • Should not be empty
      • Should be encrypted when it goes to database
      • Should have a minimum of 8 characters
      • Should have letters and numbers
  • User update

    • It's not allowed to turn a user into admin if you are not an admin
    • It's not allowed to edit a user other than yourself if you are not an admin
  • Tag registration

    • Is not allowed to register a tag with same name
    • Is not allowed to register a tag without name
    • Is not allowed registrations from non admin users
  • Compliments registration

    • Is not allowed an user to register a tag to himself
    • Is not allowed to register a tag to invalid users
    • The user must be authenticated in order to register a tag

Getting Started

To get a local copy up and running follow these simple steps.

Installation

  1. Clone the repo
    git clone https://github.com/xandao-dev/nlw-valoriza.git
    
  2. Install Docker Engine
  3. Install Docker Compose
  4. Build the docker image
cd nlw-valoriza
docker-compose up -d --build
  1. Set up a local database
docker-compose exec back-end-dev /bin/sh
  > yarn typeorm migration:run
  > exit

Usage

  • Start the back-end service
    docker-compose up -d
    
  • Stop the back-end service
    docker-compose down
    

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

NLW Valoriza uses Trunk Based Development(TBD) workflow and Conventional Commits!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Need a database tool? Try these DBeaver or BeeKeeper Studio

Want to try the API? Try these Insomnia or Postman

License

Distributed under the MIT License. See LICENSE for more information.

Free software =)

Contact

Alexandre Calil - Linkedin - [email protected]

Project Link: https://github.com/xandao-dev/nlw-valoriza

Acknowledgements