Files: 484bd0ad26fdc6bfbd07fdf41b9038ec595bde0d / README.md
catstack
work in progress
modular framework for data-driven real-time apps
made by Enspiral Root Systems
inspired by ahdinosaur/mad-science-handbook
concepts
tools
- node
- when in this directory run
nvm use
which will use the version ofnode
specified in our .nvmrc.
- when in this directory run
- packages
- install with
npm install -g npm@3
- to install a package, run
npm install --save my-favorite-package
- install with
scripts
install
generate new project
catstack gen:project
start
dev
starts development environment
catstack start:dev
prod
starts production environment
catstack start
test
runs tests
catstack test
test:spec
runs tape tests
can optionally take a glob
npm run test -- './todos/**/*.test.js'
default glob is ./**/*.test.js
lint
checks for standard style
can optionally take a glob
npm run lint -- './todos/**/*.js'
default glob is ./**/*.js
ignoring node_modules
format
converts to standard if possible
can optionally take a glob
npm run format -- './**/*.js'
default glob is ./**/*.js
ignoring node_modules
db:clean
directory structure
/config/
/config/index.js
/config/${ NODE_ENV }.js
/${ domain }/
- tests are any files that end in
.test.js
domain overview
in contrast to frameworks like Rails which split our app into directories for each "type" of file (models, views, controllers), our app is split into directories for each conceptual domain, where each domain contains the various types of files within that domain.
each domain directory may contain any of:
state.js
: exports initial store stateactions/*.js
: exports store actionseffects/*.js
: exports effectsgetters.js
: exportsreselect
getterspages/*.js
: exports routed viewselements/*.js
: exports presentation viewshelpers/*.js
: exports helper functionsservice.js
: exportsvas
service
/${ domain }/state.js
/${ domain }/actions/*.js
/${ domain }/effects/*.js
/${ domain }/getters.js
/${ domain }/pages/*.js
/${ domain }/elements/*.js
/${ domain }/service.js
FAQ
how do i do relations between models?
implement them in your getters.js
file as selectors.
in the future, we should extract common relations into helper creators.
Built with git-ssb-web