🐱 see also catstack, dogstack's smarter, slimmer, more cunning partner in crime
- provides generators for scaffolding apps made of popular libraries
- abstracts away the app plumbing that you don't want to write again, and let's you focus on features
- prescribes enough opinion to reduce friction for your team
- is omakase, modules are hand-picked by expert chefs to deliver a consistent taste throughout
- gives prescriptive opinions for how to structure production-scale apps, to reduce friction for your team
- dogstack.herokuapp.com: dogstack/example deployed to heroku
starts development server
dog dev server
starts production server
dog server
runs ava
tests
can optionally take a glob
dog test -- './todos/**/*.test.js'
default glob is ./**/*.test.js
ignoring node_modules
checks for standard style
can optionally take a glob
dog lint -- './todos/**/*.js'
default glob is ./**/*.js
ignoring node_modules
export configuration for the feathers
server
services
: an array of functions that will be run withserver.configure(service)
example:
// server.js
export default {
services: [
require('./agents/service')
require('./accounts/service'),
require('./authentication/service'),
require('./profiles/service'),
require('./relationships/service')
]
}
// agents/service.js
import feathersKnex from 'feathers-knex'
export default function () {
const app = this
const db = app.get('db')
const name = 'dogs'
const options = { Model: db, name }
app.use(name, feathersKnex(options))
app.service(name).hooks(hooks)
}
const hooks = {
before: {},
after: {},
error: {}
}
export configuration for the redux
store:
updater
: a function of shapeaction => state => nextState
, combined from each topic usingredux-fp.concat
epic
: a function of shape(action$, store, { feathers }) => nextAction$
, combined from each topic usingcombineEpics
middlewares
: an array of functions of shapestore => next => action
enhancers
: an array of functions of shape `createStore => createEnhancedStore
// store.js
import updater from './updater'
import epic from './epic'
const middlewares = []
const enhancers = []
export default {
updater,
epic,
middlewares,
enhancers
}
export configuration for fela
fontNode
: query selector string or dom node to render app fontstheme
: object passsed to<FelaThemeProvider theme={theme} />
setup
: function of shape(renderer) => {}
// style.js
export default {
fontNode: '#app-fonts',
theme: {
colorPrimary: 'green',
colorSecondary: 'blue'
},
setup: (renderer) => {
renderer.renderStatic(
{ fontFamily: 'Lato' },
'html,body,#app'
)
renderer.renderFont('Lato', [
'https://fonts.gstatic.com/s/lato/v11/qIIYRU-oROkIk8vfvxw6QvesZW2xOQ-xsNqO47m55DA.woff'
])
}
}
export configuration for feathers
client
services
: export an array of functions that will be run withclient.configure(plugin)
// client.js
export default {
services: []
}
export configuration for root React component
appNode
: query selector string or dom node to render app contentstyleNode
: query selector string or dom node to render app styles
// root.js
export default {
appNode: '#app',
styleNode: '#app-styles',
}
export React routes
TODO this is not yet standardized, at the moment depends on your Layout.
export layout React component, which accepts routes
as props
TODO this is not yet standardized