Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jamesbrel/node_clean_and_modular_arch

Clean, modular architecture is a particularly interesting concept... for a project that is structured, maintainable and scalable without a hitch...
https://github.com/jamesbrel/node_clean_and_modular_arch

clean-architecture express inversify inversify-express javascript modularization nodejs typescript

Last synced: about 2 months ago
JSON representation

Clean, modular architecture is a particularly interesting concept... for a project that is structured, maintainable and scalable without a hitch...

Awesome Lists containing this project

README

        

# Node Server : Clean and Modular Architecture

### Author : James Brel

### Contact : [email protected]
---

logo

---

## Architecture
the architecture of each feature is based on the clean architecture of Uncle Bob which is constituted mainly of 3 layers :
- Data
- Domain
- Controllers
```
πŸ“¦features
β”— πŸ“‚say_hello_to_world
┃ ┣ πŸ“‚controllers
┃ ┣ πŸ“‚data
┃ β”— πŸ“‚domain
```

## General Folder Structure Tree
```
πŸ“¦project
┣ πŸ“‚.vscode
┃ β”— πŸ“œsettings.json
┣ πŸ“‚envs
┃ ┣ πŸ“œdev.env
┃ ┣ πŸ“œprod.env
┃ β”— πŸ“œstaging.env
┣ πŸ“‚lib
┃ ┣ πŸ“‚src
┃ ┃ ┣ πŸ“‚core
┃ ┃ ┃ ┣ πŸ“‚configs
┃ ┃ ┃ ┃ ┣ πŸ“œinversify.config.ts
┃ ┃ ┃ ┃ ┣ πŸ“œmiddle.config.ts
┃ ┃ ┃ ┃ β”— πŸ“œserver.config.ts
┃ ┃ ┃ β”— πŸ“œinit.ts
┃ ┃ ┣ πŸ“‚modules
┃ ┃ ┃ β”— πŸ“‚hello_mod
┃ ┃ ┃ ┃ β”— πŸ“‚features
┃ ┃ ┃ ┃ ┃ β”— πŸ“‚say_hello_to_world
┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚controllers
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œsay_hello_to_world_controller.ts
┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚data
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚data_source
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚impls
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œhello_to_world_impl.ts
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚interfaces
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œhello_to_world_inter.ts
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚models
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œ.gitkeep
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚reposit_impls
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œsystem_greet_the_world_reposit_impl.ts
┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚domain
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚entities
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œ.gitkeep
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣ πŸ“‚reposit_interfaces
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œsystem_greet_the_world_reposit_inter.ts
┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“‚usecases
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ β”— πŸ“œsay_hello_word_usecase.ts
┃ ┃ β”— πŸ“‚shared
┃ ┃ ┃ ┣ πŸ“‚constants
┃ ┃ ┃ ┃ ┣ πŸ“œapi.const.ts
┃ ┃ ┃ ┃ ┣ πŸ“œnumber.const.ts
┃ ┃ ┃ ┃ ┣ πŸ“œstring.const.ts
┃ ┃ ┃ ┃ β”— πŸ“œversion.const.ts
┃ ┃ ┃ ┣ πŸ“‚extensions
┃ ┃ ┃ ┣ πŸ“‚global
┃ ┃ ┃ ┃ β”— πŸ“œstring.variable.ts
┃ ┃ ┃ ┣ πŸ“‚logs
┃ ┃ ┃ ┃ β”— πŸ“œlogger.ts
┃ ┃ ┃ ┣ πŸ“‚middlewares
┃ ┃ ┃ β”— πŸ“‚services
┃ ┃ ┃ ┃ ┣ πŸ“‚images
┃ ┃ ┃ ┃ β”— πŸ“‚security
┃ β”— πŸ“œindex.ts
┣ πŸ“‚test
┃ β”— πŸ“œ.gitkeep
┣ πŸ“œ.eslintignore
┣ πŸ“œ.eslintrc
┣ πŸ“œ.gitignore
┣ πŸ“œ.prettierignore
┣ πŸ“œ.prettierrc
┣ πŸ“œbabel.config.json
┣ πŸ“œjest.config.json
┣ πŸ“œnodemon.json
┣ πŸ“œpackage.json
┣ πŸ“œreadme.md
┣ πŸ“œtsconfig.json
β”— πŸ“œtypedoc.json
```

## Usage and Configuration

After downloading or cloning the Git Repository

1. go to the **project** folder and copy all the content in your server's project

2. go into your **package.json file**, fill the following points:

- "name" : Specify the Project Name
- "description" : Specify the Project Description
- "url" : "git+url" (complete the url line with the git url of your repository)
- "author" : Specify the Project Author (Organisation name)

3. and type ***npm install*** to install all packages of Dependencies and Dev_Dependencies

---

Copyright Β© 2024 James Brel All Rights Reserved