Files: 2701b2aa389b3a8acde4ec8c6b2ffe3b13cc49a4 / README.md
5143 bytesRaw
business-stack
work in progress
real-world, production-quality stack for Craftworks
stack
- task runner: npm scripts
- client bundler: browserify
- es6/jsx transform: babelify
- css transform: cssify and css-modules-require-hook
- configuration: evalify
- bulk require: bulkify
- utility functions: ramda
- directory structure:
/config/
/config/defaults.js
/config/{ NODE_ENV }.js
/app/
- symlink
/app
to/node_modules/app
/app/package.json
/app/client.js
/app/server.js
/app/reducer.js
/app/routes.js
/app/thing/model.js
/app/thing/service.js
/app/thing/client.js
/app/thing/routes.js
/app/thing/actions.js
/app/thing/reducer.js
/app/thing/getters.js
/app/thing/components/thing-list.js
/app/thing/components/thing-list.css
/app/thing/spec/components/thing-list.js
/app/thing/index.feature
/app/thing/steps.js
/app/list-view/index.js
- only do relative requires if within module
- otherwise, always require top-down (
require('app/things/model')
).
- symlink
- data model: tcomb
- database: knex
- data validator: tcomb-validator
- api service: feathers-knex
- api authentication: feathers-authentication
- api transport: primus
- api client: feathers-client
- client async actions: redux-thunk
- client action creators: redux-tcomb
- client action types: create-action-types
- client action store: redux
- client reducers: redux-tcomb
- client getters: reselect
- client router: redux-router
- client views: react
- client forms: tcomb-form
- test specs: ava
- test features: cuke-tap
- generators: plop
micro-services
TODO split into micro-services based on mad-science-stack
TODO write docs about what is a micro-service
app modules
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 module, where each module contains the various types of files within that module.
each module directory may contain any of:
index.js
: exports all the below exports from the modulemodels/*.js
: exportstcomb
modelsconstants.js
: exports constants (such as redux action types)actions.js
: exports redux actionsreducer.js
: exports redux reducerroutes.js
: exportsfunction (store) { return <ReactRouter.Route /> }
getters.js
: exportsreselect
getters for use in containers'connect
containers/*.js
: exports smart componentconnect
ed withreact-redux
components/*.js
: exports dumb componentcomponents/*.css
: exports css modules for respective componentservice.js
: exportsfeathers
service (recommended to usefeathers-knex
andfeathers-tcomb
)client.js
: exportsfeathers-client
Built with git-ssb-web