Opto3 is a small CouchDB application entirely hosted within CouchDB. It uses JQuery Mobile to serve a single-page mobile application that presents a four-panel drill-down to find an optometrist in a desired US location
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
data
images
lib
packages
scripts
templates
cities.png
details.png
index.html
kanso.json
readme.md
splash.png
states.png

readme.md

Opto3 - A Mobile CouchApp

What

Opto3 is a small CouchDB application entirely hosted within CouchDB. It uses JQuery Mobile to serve a single-page mobile application that presents a four-panel drill-down to find an optometrist in a desired US location. The sample data originated from a MaxMind GeoLite freely downloadable CSV at http://dev.maxmind.com/geoip/geolite.

Try the demo at http://mauget.cloudant.com/opto3/_design/opto/index.html or hit http://bit.ly/UsMO0z in a mobile device.

The application build environment is Kanso. Opto3 is coded entirely in JavaScript. The Opto3 code consists of:

  • two CouchDB map/reduce view functions,
  • two CouchDB list functions,
  • one CouchDB show function,
  • three handlebars templates,
  • a small controller that mediates UI events with DB views given to list and show CouchDB functions through the CouchDB REST API,
  • and index.html - a JQuery Mobile single-page that defines four panels

Install from GitHub

  1. Install CouchDb or use a CouchDB cloud at Cloudant
    • It's a good habit to create an admin user ID and password -- lower right in Futon.
  2. Install Kanso - pre-requisite is Nodejs
  3. Open Futon in a browser
    • Create the opto3 database from the UI
  4. Clone this project from GitHub https://github.com/mauget/opto3-couchapp.git
  5. Open a command window in the project directory
    • Execute: kanso install -- like make or ant
    • Execute: kanso push http://<user>:<pw>@localhost:5984/opto3 (or to your Cloudant account)
  6. Push the sample database: kanso pushdata data/optometrist_sample.csv http://<user>:<pw>@localhost:5984/opto3
  7. Visually verify in Futon
  8. Replicate to your own Cloudant account, if desired (Use Futon, curl or REST client)

Alternative: Replicate Opto3 from Cloudant

  1. Install a local CouchDB or procure a Cloudant account.
  2. Clone http://mauget.cloudant.com/opto3/ choosing a method noted at http://guide.couchdb.org/draft/replication.html

Execution

Opto3 Has Four Panels

  1. Splash screen:

    Splash

  2. Clickable list of states with count of demo optometrists for each:

    States

  3. Clickable list of city addresses for each optometrist in the clicked state:

    Cities

  4. Details of an optometrist for a clicked address:

    Details

Lou Mauget lmauget@keyholesoftware.com