Setting up a Node.js and Express project. This guide outlines the structure of a typical Node.js project and provides a brief overview of the purpose of each file and directory. The project is designed to be modular and scalable, suitable for building robust system.
Here's an overview of the project structure:
src
├─── config
│ └─── express.config.js
├─── middlewares
│ ├─── auth.middleware.js
│ ├─── rbac.middleware.js
│ ├─── uploader.middleware.js
│ ├─── validator.middleware.js
├─── modules
│ └─── users
│ ├─── user.controller.js
│ ├─── user.request.js
│ ├─── user.routes.js
│ ├─── user.service.js
├─── router
│ └─── router.config.js
├─── service
│ └─── mail.service.js
└─── utilities
│ └─── helper.js
├─── index.js
├─── .env
├─── .gitignore
├─── package.json
├─── Readme.md
/src
The main source directory where all the application code resides.
API keys.node_modules and sensitive files.