Skip to content

codescouts-academy/clean-architecture-libraries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CodeScouts

πŸ“„ Documentation for implementing CodeScouts libraries for Frontend πŸš€

Documentation πŸ“„

Stars are welcome 😊 Report an issue πŸ›

πŸš€ Libraries

πŸ§‘β€πŸš€ Reactive store

For React βš›οΈ

npm i --save @codescouts/store

For Svelte πŸ”

npm i --save @codescouts/svelte-store

⚑ Domain Events (Agnostic)

npm i --save @codescouts/event

🀘 UI package (Resources, Permissions, Events) for React βš›οΈ

npm i --save @codescouts/ui

πŸ’‰ Dependency injection for React βš›οΈ

npm i --save @codescouts/di

πŸ§ͺ Test library (Unit and Integration)

npm i --save-dev @codescouts/test

πŸ“ƒ Starter kit template

If you are using create-react-app πŸ‘‡

npx create-react-app my-app --template @codescouts/clean-architecture-template

If you want to use Vite πŸ‘‡

npx degit codescouts-academy/react-clean-architecture my-app

πŸ‘©β€πŸ’» Project explanation

πŸ“ Recommended folder structure


    public/
    β”œβ”€β”€ favicon.png --> CodeScouts's logo
    β”œβ”€β”€ index.html --> Main html file
    β”‚
    src/
    β”œβ”€β”€ application/ Our use cases
    β”‚   β”œβ”€β”€ get-initial-value-use-case.ts --> Here we model the use cases
    β”‚   β”œβ”€β”€ increment-use-case.ts
    β”‚   └── decrement-use-case.ts
    β”œβ”€β”€ domain/ Our Business logic
    β”‚   β”œβ”€β”€ events --> Here we model the domain events
    β”‚   β”œβ”€β”€ model --> Here we model our business logic
    β”‚   β”œβ”€β”€ repository --> Here exists the domain repositories (only abstractions)
    β”‚   └── services --> Here exists the domain services (only abstractions)
    β”‚
    β”œβ”€β”€ infrastructure/ Our external services implementations
    β”‚   β”œβ”€β”€ repository --> Here we model the domain events
    β”‚   β”‚   └── CounterService.ts --> Implementation for domain abstractions
    β”‚   └── services
    β”‚       └── CounterService.ts --> Implementation for domain abstractions
    β”‚
    β”œβ”€β”€ ui/ React things
    β”‚   β”œβ”€β”€ components/ --> Stateless components
    β”‚   └── pages/
    β”‚       └── home/
    β”‚           β”œβ”€β”€ Home.tsx --> Page component (View)
    β”‚           └── useHomeViewModel.ts --> Home UI business logic (ViewModel)
    β”‚
    β”œβ”€β”€ app.tsx
    └── index.tsx

πŸ€” Contributing

If you find any errors, think there is room for improvement or simply want to contribute, you are welcome. Just fork and send us your PR πŸ™.

About

πŸ“„ CodeScouts's Clean architecture libraries for Frontend πŸ‘ŒπŸš€

Resources

Stars

Watchers

Forks