/evaluat-backend

A repository to Evalu.at backend app.

Primary LanguageJavaScript

Evalu.at Backend API

This API was designed to facilitate student feedback on professors. This API enables students to evaluate professors based on predefined criterias by MEC (Minitério da Eduacação Brasileira), fostering transparency, accountability, and continuous improvement within the academic community. In resume, the API contributes to the enhancement of teaching quality and student satisfaction.

The API is used by the frontend of the Evalu.at application, where further information about its interface can be accessed here

Development Technologies

JavaScript Nodemon Express.js Postgres Docker NodeJS Swagger

The API was developed in javascript using the node.js framework, and for the database we used postgresSQL. To enhance the comprehension of every API endpoint, it was fully documented using the swagger framework, it can be accessed by the API route /docs or reading the
"swagger-output.json" file.

Pre-requisites

  1. Clone or fork this repository
  2. Have node.js installed
  3. Have Docker Desktop
  4. Use the postgres database using a docker
  5. Have the right Pool class credentials to access the docker

Configure the Docker Container

  1. Install the Docker Desktop and open it
  2. Go to the searchbar (top of the app) and search for "postgres"
  3. Click on "pull"
  4. Go to images, click on run and then open the opitional settings
  5. Give the container a name (example: evaluat)
  6. Set the Hostport to "5432"
  7. In the Environment variables set like this:
Variable Value
POSTGRES_USER evaluat-adm
POSTGRES_PASSWORD check at src\database\index.js
  1. Click on run
  2. Go to containers and start the evaluat container
  3. Now you are ready to run the project

Run the API

Install the project dependencies

npm i

Run the project while modifing it

npm run dev

Run the project whithout modifing it

npm start

⚠️ Commom Errors

Error: Cannot find module 'express'

Solution: uninstall the "node_modules" directory and install it again by running the npm i command in terminal


error: password authentication failed for user "<nameuser>"

Solution 1: If you dont have access to this repository you need to change this database to your personal one
Solution 2: Check the pool credentials and see if matches with the postgres docker that you configured before


error: autentica��o do tipo senha falhou para o usu�rio "evaluat-adm"

Solution: Stop the PostgresSQL services on your windows (you can see it in the task manager crtl + shift + esc

Licences

none at the moment