Almin + CQRS example
- The user execute a UseCase from View
- Get the Domain model from Repository
- The Domain model do work about the UseCase
- Finally, Save the Domain model to Repository
- Sometimes, The UseCase notify that "State is change. Maybe".
- The View get State from Store
- Store get the Domain model from Repository
- Just in time, Store convert the Domain model to the State.
- Render the view with the state.
Do by Application Delegate by Almin
- [Do] User do UseCase#dispatch [AppUseCase]
- [Delegate] UseCaseExecutor: pipe to dispatcher
- [Delegate] Context: pipe to StoreGroup
- [Delegate] StoreGroup: pipe to Stores
- [Do] Store#onDispatch -> Store#emitChange [AppStoreGroup]
- [Delegate] StoreGroup#onChange -> Context#onChange
- [Do] Context#onChange -> User Do
npm install
npm start
# open http://localhost:8080
You can see UseCase logging with redux-devtools-extension.
Please see following for more details.
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT © azu