{"id":19595144,"url":"https://github.com/alesbe/node-restserver","last_synced_at":"2026-04-09T23:52:02.167Z","repository":{"id":42009003,"uuid":"283551324","full_name":"alesbe/node-restserver","owner":"alesbe","description":"Rest server made with NodeJS and MongoDB for a cafeteria","archived":false,"fork":false,"pushed_at":"2023-02-01T22:51:52.000Z","size":244,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-26T14:24:44.889Z","etag":null,"topics":["jwt","mongodb","mongoose","nodejs","rest-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alesbe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-29T16:40:10.000Z","updated_at":"2022-09-23T18:30:52.000Z","dependencies_parsed_at":"2023-02-17T11:50:16.211Z","dependency_job_id":null,"html_url":"https://github.com/alesbe/node-restserver","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/alesbe/node-restserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesbe%2Fnode-restserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesbe%2Fnode-restserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesbe%2Fnode-restserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesbe%2Fnode-restserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alesbe","download_url":"https://codeload.github.com/alesbe/node-restserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alesbe%2Fnode-restserver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266614306,"owners_count":23956341,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["jwt","mongodb","mongoose","nodejs","rest-api"],"created_at":"2024-11-11T08:45:54.694Z","updated_at":"2026-04-09T23:51:57.142Z","avatar_url":"https://github.com/alesbe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API: Cafeteria with NodeJS\n\nREST server made with [NodeJS](https://nodejs.org/es/) and [MongoDB](https://www.mongodb.com/es).\n\n**API documentation and info:** [Postman docs](https://web.postman.co/collections/7727126-fa15d799-b897-48d5-b197-95121ede80dc?version=latest\u0026workspace=302ec022-de25-4482-842c-23cd7f984d58)\n\n![example](https://i.imgur.com/6lYECCD.png)\n\nREST API created as a project to simulate a cafeteria or restaurant. User management, categories, requests GET, POST, PUT, DELETE and PATCH and token user autentication.\n\n## NPM packages used\n\n- [**bcrypt**](https://www.npmjs.com/package/bcrypt): Password encryptation\n- [**body-parser**](https://www.npmjs.com/package/body-parser): Take request parameters\n- [**express**](https://www.npmjs.com/package/express): HTTP server\n- [**express-fileupload**](https://www.npmjs.com/package/express-fileupload): Files upload\n- [**google-auth-library**](https://www.npmjs.com/package/google-auth-library): Google authentication\n- [**jsonwebtoken**](https://www.npmjs.com/package/jsonwebtoken): Token authentication\n- [**mongoose**](https://www.npmjs.com/package/mongoose): MongoDB connection\n- [**mongoose-unique-validator**](https://www.npmjs.com/package/mongoose-unique-validator): MongoDB validation\n- [**underscore**](https://www.npmjs.com/package/underscore): Additional JS functionality\n\n## Features\n\n- General features\n  - [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) for users, categories and products\n  - Role system for users\n  - [JWT](https://jwt.io/) token authentication and [Google OAuth](https://cloud.google.com/nodejs/getting-started/authenticate-users)\n  - Categories for each product\n  - Image upload\n\n- Security\n  - Password encryptation with [bcrypt](https://www.npmjs.com/package/bcrypt)\n  - URL protection with tokens\n  - Images saved in non-public folders\n  - Admin and users role system\n  - Validation system with [mongoose-unique-validator](https://www.npmjs.com/package/mongoose-unique-validator)\n  - Token seeds saved in server side\n  - Password protection to prevent being showed in clear text on JSON\n  - Category or product linked to the user that created it\n  - File extension validation\n  - Error capture returning an HTTP code\n  - Image URL protected with token\n\n## Install 🐳\nI bundled the project in 2 docker containers, however **this project was made with learning purposes and is not maintained, do not use it in a real enviorment!**\n\n### Download the source code\nGit clone the project or download the last version from [releases](https://github.com/alesbe/node-restserver/releases)\n\n### Run the containers\nCd into the project root folder, and do `docker-compose up`, this will pull the docker images and start them.\n\nBy default, the backend server is running on port `8000`, and mongodb in port `27017`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falesbe%2Fnode-restserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falesbe%2Fnode-restserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falesbe%2Fnode-restserver/lists"}