-
Notifications
You must be signed in to change notification settings - Fork 2
Overall Flow
The developer decides when his app is ready. Does a kanso push into the Garden Market.
When the user clicks on install from an app in the Garden Market, they will be prompted for their dashboard url (if the garden does not already know it), or to sign up to a dashboard.
The user will enter
https://your.dashboard.com
The garden then redirects locations to:
https://your.dashboard.com/install?app_src=https://garden.com/app/12345
If the user does not have a dashboard, the garden will provide a list of dashboard providers. When the user selects one, they will be forwarded like this:
https://dashboard.com/somepath/newuser?app_src=https://garden.com/app/12345
The dashboard provider will be responsible for having a simple signup page. It should enforce new users to provide their email address as a username. After the dashboard provider collects information they require, they should provision a couch instance for the user, and then they will need to install the dashboard couchapp into that instance. Then they should redirect to that instance:
https://your.dashboard.com/install?app_src=https://garden.com/app/12345
The user will now be on their Garden Dashboard install screen. They will be presented with a message asking confirmation if they want to install the app with name {{app_name}} from {{app_src}}.
During this time, a jsonp request will be made back to the Garden Market. It will look like this:
https://garden.com/app/12345/json
an the response will be a json object:
{"kanso":{"config":{"name":"wiki","version":"0.0.1","description":"A general-purpose wiki for CouchDB","long_description":"A wiki is a website created by its users. It allows any user to make additions or changes to the site, and can help to keep content up-to-date and relevant.\u000a\u000aUsed by the Kanso project for documentation, this Wiki uses an extended version of Markdown for editing pages and features syntax highlighting and page history. Edit's can be attributed to a user and their changes to a page highlighted.","url":"https://github.com/kanso/wiki","categories":["productivity"],"attachments":["icons","images"],"icons":{"16":"icons/wiki_icon_16.png","48":"icons/wiki_icon_48.png","96":"icons/wiki_icon_96.png","128":"icons/wiki_icon_128.png"},"promo_images":{"small":"images/promo_small.png"},"screenshots":["images/screenshot1.png","images/screenshot2.png","images/screenshot3.png"],"dependencies":{"wiki-core":null,"wiki-theme-default":null,"attachments":null},"minify":false},"build_time":"2012-01-23T21:32:21Z","push_time":"2012-01-23T21:32:25Z","pushed_by":"caolan"},"open_path":"/_rewrite/","style":"design-doc","db_src":"http://garden.iriscouch.com/garden/_design/garden/_rewrite/_db","doc_id":"wiki"}
This provides the needed information for the Garden Dashboard to begin replication. Once this jsonp response is received, the buttons Install And Cancel will be presented. If the user clicks Cancel, they will be taken back to the Garden Market App screen. If they click install, the following happens:
- The dashboard will create a new db on the local couch. It will be called 'angry-todos'.
- A one time pull replication will be initiated from the app_db to the a local db.
- A entry will be placed in the _replication db based on the replication.market_to_dashboard property.
- After the above completes, the user will be presented with links either to the new application, or back to the garden market app screen.
The Garden Sync provides a way to get the hosted dashboard and application onto local devices. This will include windows/mac/linux and iOS/Android.