Almin.js provide Flux/CQRS patterns for JavaScript application
JavaScript CSS HTML
Latest commit 8655902 Oct 4, 2016 @azu azu 0.9.1

README.md

Almin.js Build Status

Almin.js logo

Sauce Test Status

Flux/CQRS patterns for JavaScript application.

Write code thinking :)

Why?

Now, We can implement web application with Flux or Redux etc...

But, I often hear the story that is "Control flow of Flux/Redux is cool, but where to implement domain logic."

I think that the people skip to Flux/Redux from MV* pattern.

MV* --> ( HOLE ) --> Flux/Redux(CQRS+EventSourcing)

Almin.js aim to fill the HOLE between MV* and Flux/Redux.

Feature

Almin provide some pattern, is not framework.

  • Testable
  • Scalable
  • Responsibility Layers patten - well-known as DDD(Domain-Driven Design)/CQRS

Almin is a implementation of Read/Write Stack Architecture that is well-known as Flux/CQRS.

Installation

npm install almin

You'll also need a Promise polyfill for older browsers.

npm install es6-promise

Usage

📝 Please See https://almin.js.org/ for details.

What is Almin?

Almin provide Flux/CQRS patterns for JavaScript application.

It aim to create scalable app.

Overview of almin-architecture

The above figure is overview of Almin architecture that is similar to CQRS(Command Query Responsibility Segregation).

But, Almin is not framework, provide only these components

  • Dispatcher
  • Context
  • UseCase
  • Store
  • StoreGroup

Other components like Domain, Repository and State are written by you!

Of course, Almin help you to write other components.

Also, You may notice that these components are similar to Flux architecture.

Almin is also a flux implementation library. 👍

Almin Flux Redux
Dispatcher Dispatcher store.dispatch
Context Container Middleware/React Redux
UseCase ActionCreator Actions
Store Store Store
StoreGroup Container combineReducers
(State) Store Reducer
(Domain)
(Repository)

📝 State, Domain and Repository is optional on Almin, because the best for these components is vary based on application.

Almin has not perfect solution for an application, but we can write code thinking.

We are going to learn two architecture(Flux/CQRS) using Almin :)

Table of Contents

Truly Table of Contents is here ⬅️

Examples

Real Examples

Welcome to pull request!

Running Tests

Running Tests in Node.js

npm test

Running Tests in Browser

npm run test:browser

Running Tests in Sauce Labs

# Need "~/.zuulrc" for using Sauce Labs
npm run test:saucelabs

Building Docs

npm run build:docs
# preview
npm run start:docs

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT