/FolderForge

npm package to create a folder template

Primary LanguageJavaScript

Welcome to our project!

Overview

This project pretends to be an npm package to create a folder structure for a node typescript server using expressJS implementing clean architecture

How to use it

run npx folderforge start-project to create the base structure of the project then you'll be able to add modules using npx folderforge add-module -n <module-name>

Example

  1. npx folderforge start-project
  2. npx folderforge add-module -n users
  3. npx folderforge add-module -n products
  4. npx folderforge add-module -n orders

Folder Structure

This will be the result

  • src
    • core
      • config
      • middlewares
      • modules
      • routing
      • services
    • modules
      • users
        • data
          • datasource
            • pg_data_source.ts
          • interfaces
            • customer_data_source.ts
          • utils
        • domain
          • models
            • customer_model.ts
          • repositories
            • customer_repositories.ts
            • customer_repository_implementation.ts
        • presentation
          • customer_middlewares.ts
          • customer_router.ts
          • index.ts
      • ...

  • node_modules
  • package-lock.json
  • package.json
  • tsconfig.json

TODOs

  • Implement CustomError types
  • Implement presentation layer

Colaborators

Happy Coding!