{"id":17712579,"url":"https://github.com/cpelaez5/evaluations-app","last_synced_at":"2026-01-30T09:13:45.998Z","repository":{"id":258825422,"uuid":"875085879","full_name":"Cpelaez5/evaluations-app","owner":"Cpelaez5","description":"360 Evaluations API","archived":false,"fork":false,"pushed_at":"2024-10-22T00:44:14.000Z","size":3358,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-22T10:57:23.135Z","etag":null,"topics":["express","expressjs","jasonwebtoken","javascript","mongodb-atlas","mongoose","node","nodejs"],"latest_commit_sha":null,"homepage":"https://evaluations-app.onrender.com/api","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cpelaez5.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-19T04:15:51.000Z","updated_at":"2024-10-22T00:44:18.000Z","dependencies_parsed_at":"2024-10-25T10:19:52.558Z","dependency_job_id":null,"html_url":"https://github.com/Cpelaez5/evaluations-app","commit_stats":null,"previous_names":["cpelaez5/evaluations-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cpelaez5%2Fevaluations-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cpelaez5%2Fevaluations-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cpelaez5%2Fevaluations-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cpelaez5%2Fevaluations-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cpelaez5","download_url":"https://codeload.github.com/Cpelaez5/evaluations-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252531834,"owners_count":21763290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","expressjs","jasonwebtoken","javascript","mongodb-atlas","mongoose","node","nodejs"],"created_at":"2024-10-25T09:05:37.757Z","updated_at":"2026-01-30T09:13:45.967Z","avatar_url":"https://github.com/Cpelaez5.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 360 Evaluations API\n\n## Description\n\nThis is a RESTful API developed in Node.js with Express.js and Mongoose, designed to perform 360-degree evaluations of remote employees in an app development company. The API allows for the management of users, employees, evaluations, and feedback, as well as the generation of reports.\n\n## Technologies Used\n\n- **Backend**: Node.js, Express.js\n- **Database**: MongoDB (Mongoose as ODM)\n- **Authentication**: JWT (JSON Web Token)\n\n## Installation\n\n### Prerequisites\n\n- Node.js (version 14 or higher)\n- MongoDB Atlas (account and database set up)\n\n### Steps to Clone the Repository\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/Cpelaez5/evaluations-app.git\n   cd evaluations-app\n   ```\n2. Install the dependencies:\n    ```powershell\n    npm install\n    ```\n3. Set up the environment variables. Create a .env file at the root of the project and add the following variables:\n    ```conf\n    EVALUATIONS_APP_MONGODB_HOST=your_mongodb_atlas_uri\n    EVALUATIONS_APP_MONGODB_DATABASE=your_db_name\n    EVALUATIONS_APP_MONGODB_PORT=3000\n    ```\n\n### Usage\n\n### API Link\n- You can access the API at the following link: [360 Degree Evaluations API (Render)](https://evaluations-app.onrender.com/api) or [360 Degree Evaluations API (Railway)](https://thorough-renewal-production.up.railway.app/api)\n\n## API Endpoints\n\n### Authentication Endpoints\n\n- **POST /api/auth/register**  \n  Register a new user. Checks for duplicate username or email and ensures the specified roles exist.\n\n- **POST /api/auth/login**  \n  Log in a user and return a JWT for authentication.\n\n### Employee Endpoints\n\n- **POST /api/employees**  \n  Create a new employee (accessible only to managers or admins).\n\n- **GET /api/employees**  \n  Retrieve all employees (accessible only to admins).\n\n- **GET /api/employees/:employeeId**  \n  Retrieve an employee by ID (accessible to any authenticated user).\n\n- **PUT /api/employees/:employeeId**  \n  Update an employee by ID (accessible only to managers or admins).\n\n- **DELETE /api/employees/:employeeId**  \n  Delete an employee by ID (accessible only to admins).\n\n### Evaluation Endpoints\n\n- **POST /api/evaluations**  \n  Create a new evaluation (accessible only to managers or admins).\n\n- **GET /api/evaluations**  \n  Retrieve all evaluations (accessible only to admins).\n\n- **GET /api/evaluations/employee/:employeeId**  \n  Retrieve evaluations for a specific employee (accessible to any authenticated user).\n\n- **GET /api/evaluations/:evaluationId**  \n  Retrieve a specific evaluation by ID (accessible to any authenticated user).\n\n- **PUT /api/evaluations/:evaluationId**  \n  Update an evaluation (accessible only to the creator or admin).\n\n- **DELETE /api/evaluations/:evaluationId**  \n  Delete an evaluation (accessible only to admins).\n\n- **POST /api/evaluations/:evaluationId/start**  \n  Start an evaluation (changes the status to 'inProgress', accessible only to managers or admins).\n\n- **POST /api/evaluations/:evaluationId/complete**  \n  Complete an evaluation (changes the status to 'completed', accessible only to managers or admins).\n\n- **GET /api/evaluations/:evaluationId/progress**  \n  Retrieve the progress of an evaluation (accessible to any authenticated user).\n\n- **POST /api/evaluations/:evaluationId/feedback**  \n  Submit feedback for an evaluation (accessible to any authenticated user).\n\n### Feedback Endpoints\n\n- **POST /api/feedback**  \n  Create new feedback (accessible to any authenticated user).\n\n- **GET /api/feedback/:feedbackId**  \n  Retrieve feedback by ID (accessible to any authenticated user).\n\n- **GET /api/feedback/evaluation/:evaluationId**  \n  Retrieve all feedback for a specific evaluation (accessible to any authenticated user).\n\n- **PUT /api/feedback/:feedbackId**  \n  Update feedback (accessible only to the creator or admin).\n\n- **DELETE /api/feedback/:feedbackId**  \n  Delete feedback (accessible only to the creator or admin).\n\n### User Endpoints\n\n- **GET /api/users**  \n  Retrieve all users (accessible only to admins).\n\n- **GET /api/users/:userId**  \n  Retrieve a user by ID (accessible only to admins).\n\n- **PUT /api/users/:userId**  \n  Update a user by ID (accessible only to admins).\n\n- **DELETE /api/users/:userId**  \n  Delete a user by ID (accessible only to admins).\n\n### Authentication and Roles\nThe API implements JWT authentication and handles user roles:\n\n   * Admin\n   * Manager\n   * Employee\n\n### Example Request\nExample of how to register\n\n    ```json\n    curl -X POST https://evaluations-app.onrender.com/api/auth/register \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n    \"username\": \"your_user_name\",\n    \"email\": \"your@email.com\",\n    \"password\": \"your_password\",\n    \"roles\": [\"admin\",\"manager\",\"employee\"]\n    }'\n\n    ```\n\n### Project Structure\n\n    ```s\n    /evaluations-api\n    ├── src\n    │   ├── /controllers     # controllers\n    │   ├── /lib             # initial database configurations\n    │   ├── /middlewares     # Middleware for error handling and validation\n    │   ├── /models          # Data models (User, Employee, Evaluation, Feedback)\n    │   ├── /routes          # API routes\n    │   ├── config.js        # Configuration for the token generation key\n    │   ├── database.js      # mongoose database configuration\n    │   ├── server.js        # Main file to start the server\n    ├── .env                 # File for environment variables\n    └── README.md            # Project documentation\n    ```\n\n### Tests\nIf tests have been implemented, you can run them with the following command:\n\n    ```powershell\n    npm test\n    ```\n\n### Contribution\n- Contributions are welcome. If you wish to contribute, please follow these steps:\n\n* Fork the repository.\n* Create a new branch (git checkout -b feature/new-feature).\n* Make your changes and commit them (git commit -m 'Add new feature').\n* Push the branch (git push origin feature/new-feature).\n* Open a Pull Request.\n\n### Contact\n- For questions or comments, you can contact [Carlos Peláez](mailto:cpelaez0811@gmail.com)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpelaez5%2Fevaluations-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpelaez5%2Fevaluations-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpelaez5%2Fevaluations-app/lists"}