{"id":15040562,"url":"https://github.com/moathshraim/nodejs-rest-api-project-structure-express","last_synced_at":"2025-04-05T21:07:43.641Z","repository":{"id":44351957,"uuid":"219710983","full_name":"MoathShraim/Nodejs-rest-api-project-structure-Express","owner":"MoathShraim","description":"Nodejs project structure practices for building RESTful APIs using Express framework and MongoDB.","archived":false,"fork":false,"pushed_at":"2022-12-22T12:58:41.000Z","size":105,"stargazers_count":359,"open_issues_count":7,"forks_count":142,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-05T21:07:40.124Z","etag":null,"topics":["express","expressjs","javascript","jwt-authentication","mongodb","mongoose","nodejs","restful-api"],"latest_commit_sha":null,"homepage":"","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/MoathShraim.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}},"created_at":"2019-11-05T09:51:29.000Z","updated_at":"2025-04-03T11:08:17.000Z","dependencies_parsed_at":"2023-01-30T09:31:24.024Z","dependency_job_id":null,"html_url":"https://github.com/MoathShraim/Nodejs-rest-api-project-structure-Express","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoathShraim%2FNodejs-rest-api-project-structure-Express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoathShraim%2FNodejs-rest-api-project-structure-Express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoathShraim%2FNodejs-rest-api-project-structure-Express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoathShraim%2FNodejs-rest-api-project-structure-Express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MoathShraim","download_url":"https://codeload.github.com/MoathShraim/Nodejs-rest-api-project-structure-Express/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"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","javascript","jwt-authentication","mongodb","mongoose","nodejs","restful-api"],"created_at":"2024-09-24T20:44:44.624Z","updated_at":"2025-04-05T21:07:43.612Z","avatar_url":"https://github.com/MoathShraim.png","language":"JavaScript","readme":"# Node.js, Express and MongoDB Project Structure \nThis is a basic project structure to help you to start building your own RESTful web APIs (for Android, IOS, or JavaScript framworks) using Express framework and MongoDB with a good structure practices based on clean MVC Architecture.\n\n\n# Features\n- Fundamental of Express: routing, middleware, sending response and more\n- Fundamental of Mongoose: Data models, data validation and middleware\n- RESTful API including pagination,sorting and limiting fields\n- CRUD operations with MongoDB\n- Security: encyption, sanitization and more\n- Authentication with JWT : login and signup\n- Authorization (User roles and permissions)\n- Error handling\n- Enviroment Varaibles\n- handling error outside Express\n- Catching Uncaught Exception\n\n# Project Structure\n- server.js : Responsible for connecting the MongoDB and starting the server.\n- app.js : Configure everything that has to do with Express application. \n- config.env: for Enviroment Varaiables\n- routes -\u003e userRoutes.js: The goal of the route is to guide the request to the correct handler function which will be in one of the controllers\n- controllers -\u003e userController.js: Handle the application request, interact with models and send back the response to the client \n- models -\u003e userModel.js: (Business logic) related to business rules, how the business works and business needs ( Creating new user in the database, checking if the user password is correct, validating user input data)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoathshraim%2Fnodejs-rest-api-project-structure-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoathshraim%2Fnodejs-rest-api-project-structure-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoathshraim%2Fnodejs-rest-api-project-structure-express/lists"}