Create an App React with clean architecture and Typescript. Jest, styled components and webpack 5 with federation module for microfrontend already configured.
npm install -g react-clean-architecture-cli
or
yarn global add react-clean-architecture-cli
npx react-clean-architecture-cli my-app
or
react-clean-architecture my-app
or
react-clean-architecture
and insert app name
It will create a directory called my-app
inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
my-app
├── node_modules
├── __mocks__
│ ├── emptyFileMock.js
│ └── setupTest.js
├── package.json
├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .prettierrc
├── jest.config.js
├── tsconfig.json
├── webpack.config.js
├── public
│ └── index.html
└── src
├── @types
│── domain
│ ├── models
│ └── usecases
├── infrastructure
│ ├── http
│ │ ├── __tests__
│ │ ├── implementation
│ │ ├── inMemory
│ │ ├── models
│ │ └── index.ts
│ └── cache
│ ├── __tests__
│ ├── dtos
│ ├── implementation
│ ├── models
│ └── index.ts
├── presentation
│ ├── __tests__
│ ├── assets
│ ├── components
│ ├── hooks
│ ├── pages
│ ├── App.tsx
│ └── index.tsx
├── shared
│ └── Either.ts
└── usecases
cd my-app
Inside the newly created project, you can run some built-in commands:
Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.
The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console.
Runs the test.
Runs the test and generate coverage.
Runs the test watcher in an interactive mode.
Builds the app for production to the dist
folder.
Your app is ready to be deployed.
This project is licensed under the MIT License.
Development by: andrecoelho.dev | Software Engineer