Ddoc Lab 1.8β

Create couchapps and CouchDB design docs right in your browser. Being online or offline.

Jan Collaert I, Distillatio
Use it right here – for free.
All your projects are stored in this particular browser internal DB.
 
Run Ddoc Lab
Download Ddoc Lab as a JSON,
copy-paste it in your Futon – and use Ddoc Lab inside your own CouchDB as a local couchapp.  
Get JSON
Use it as a part of your product.
We provide support, sources, build tools and documentation.
 
Contact us

Screenshot of Ddoc Lab editing itself. Click to zoom.

What is Ddoc Lab

Ddoc Lab is a missing tool in CouchDB universe. It’s a specialized IDE for authoring, validating, building and publishing couchapps and design docs. With Ddoc Lab you need nothing but browser to compose a couchapp. 

Ddoc Lab supports includes, code minification, remote sources fetching and comprehesive post-processing capabilities.

Ddoc Lab is noBackend offline-first app. It means once you open it, you can edit and persist your projects regardless of your web connection. Thanks PouchDB for it.

Main concept

Ddoc Lab holds your projects as JSON docs with attaches. They all are stored in your local browser internal DB, that can be in sync with remote Couch.

Each Ddoc Lab project is a set of text or binary items. Text items are typed – they can be JS, JSON, HTML, CSS, markdown, less or just plain text. “Typed” means syntax highlighting, validation, compression, appropriate conversion to JSON and so on.

For each item you assign the path – a place for an item in a final build. So to make a view you just assign a path like .views.myView.map to your item. To put your code as an attachment you just assign path like /js/myscript.js.

How it builds

When you click to Couch button, your project is resolved into a single JSON and merged with remote CouchDB doc. The term ‘merged’ means if there already exist remote doc, your local project only replaces branches, defined in the project. Other branches of a remote doc are kept untouched.

In the background – source code with include directives. In preview popup all includes are resolved. Click to zoom.

Include directives

Each item can include other items. To include other item textually, just type {{/path/toitem.js}} – and this directive is replaced with full text of toitem.js on build.

You can surely configure any item to be unpublishable – to guarantee your code fragment only builds as an include, not a standalone attachment or ddoc branch.

Remote fetching

Item can be a pointer to external resource – like http request. If you fetch JSON, you can also define a path inside this resource to pick. Fetched docs are cached inside a project.

Post-processing

Each text item can have own javascript post-processor. It‘s a user-defined function, that takes item‘s string representation, manipulates it, and returns another string.

Useful feature for transforming remote data or checking local.

Other features

Pre-build. Ddoc Lab can pre-build both entire doc or any item – and show you the result. Or list of all errors, if any. Also you can view all dependencies and dependents of an item.

Import ddocs. You can import any existing CouchDB doc or ddoc, and it will be split into items+paths on import. Non-binary attachments become editable.

Download result. You can download your couchapp both as a .json file or as a .tar archive in one click.

How to use

Full-featured version of Ddoc Lab is available right here. We does not store any of your docs, they all persist in your browser – so no registration needed. To understand better what is what, open doc Demo project from the editor‘s right pane.

Also you can download Ddoc Lab as a single JSON, that you can put into your CouchDB and have Ddoc Lab in place.

Comparison with other solutionsDdoc LabPython CouchappCouchDB BootstrapErica
BackendCouchDBPythonNode.js
Erlang OTP
Interactive browser dev environment...✔︎


✔︎
 ...with offline mode✔︎



Supports multiple target DBs per session✔︎
✔︎
Can merge with existing ddoc✔︎


Incremental build✔︎


Includes✔︎


External resources inclusion✔︎


Code/data transformers/postprocessors✔︎


Can import existing ddoc ✔︎   
Remote DB config and user management

✔︎
Well documented

✔︎
Can build from git repo    ✔︎
Can build itself✔︎


Run Ddoc Lab

© 2015 ermouth. Ddoc Lab was created in cloudwall.me online IDE. Terms and acknowledgements.