Dayvan

An adventurer is never told how. Like the cold embrace of space, the emptiness of choice is an adventurer's only comfort. Be it the cosmos, a canvas or code, the greatest stories are told by those who find a path where this is none. Dayvan is an adventurer's tool for writing CouchApps.

You can write your app and Dayvan will take care of hosting it on CouchDB. It collects all your app's assets and Couch functions (views, validations etc.) and pushes them up to a database. Infact, this site is hosted with Dayvan and CouchDB (the code).

To get started, go to your project and type

gem install dayvan
dvn init

This creates a CouchApp.

dvn push

Your app has now been pushed up to Couch. Everything in the public directory is uploaded as attachments. Dayvan doesn't bundle assets or impose any sort of template on how you write your CouchApp. All that it asks is that you put your final site in the public directory.

Views go in the views directory and should be written in CoffeeScript. CoffeeScript is an efficient way of writing JavaScript.

Both the map and reduce functions for a view go in the same file:

map: (doc) ->
  emit null, "true"

reduce: (key, values, rereduce) ->
  return values.length

The validation policy is also to be written in CoffeeScript and is at config/validation.coffee.

More design documents can be added in config/APPNAME.yaml. You can also specify database user/password authentication there as well.

Please heed that are aspects of Couch which Dayvan doesn't support yet, such as shows, lists and update functions. These will come later.