React Clean Architecture Template ποΈ
Stars are welcome π
Report an error π
Contact us π€
β¬οΈ Template downloading
npx degit codescouts-academy/react-clean-architecture my-app
π Install dependencies
npm i
π Start
npm run dev
- π§ͺ codescouts/test -> Jest & Vite mocking library easy to use
- π codescouts/di -> agnostic ependency injection container
- β‘οΈ codescouts/events -> agnostic library to create and handle domain events
- π codescouts/store -> reactive store to allow update ui from domain
- π©βπ» codescouts/ui -> components for events and di only for react
public/
βββ favicon.png --> CodeScouts's logo
β
src/
βββ application/ Our use cases
β βββ add-log-user-case.test --> add-log-use-case tests
β βββ add-log-use-case.ts --> Here we model the use cases
βββ domain/ Our Business logic
β βββ events --> Here we model the domain events
β βββ model --> Here we model our business logic
β βββ services --> Here exists the domain services (only abstractions)
β
βββ infrastructure/ Our external services implementations
β βββ services
β βββ LoggerService.ts
β
βββ ui/ React things
β βββ components/ --> stateless components
β βββ pages/
β βββ home/
β βββ Home.tsx --> Page component (View)
β βββ useHomeViewModel.ts --> Home UI business logic (ViewModel)
β
βββ App.tsx
βββ di.ts --> Dependency injection configuration
βββ main.tsx --> Main component loaded, referenced in index.html
If you find any mistake, you think there are things to improve or simply want to contribute, you are welcome. Just make a fork and send us your PR π.
Released under MIT by @codescouts-academy.