Opto3 - A Mobile CouchApp
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.
- 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
- 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.
- Install Kanso - pre-requisite is Nodejs
- Open Futon in a browser
- Create the opto3 database from the UI
- Clone this project from GitHub https://github.com/mauget/opto3-couchapp.git
- Open a command window in the project directory
kanso install-- like make or ant
kanso push http://<user>:<pw>@localhost:5984/opto3(or to your Cloudant account)
- Push the sample database:
kanso pushdata data/optometrist_sample.csv http://<user>:<pw>@localhost:5984/opto3
- Visually verify in Futon
- Replicate to your own Cloudant account, if desired (Use Futon, curl or REST client)
Alternative: Replicate Opto3 from Cloudant
- Install a local CouchDB or procure a Cloudant account.
- Clone http://mauget.cloudant.com/opto3/ choosing a method noted at http://guide.couchdb.org/draft/replication.html
- In your local machine: http://127.0.0.1:5984/opto3/_design/opto/index.html
- If using Cloudant: http://YOU.cloudant.com/opto3/_design/opto/index.html
Opto3 Has Four Panels
Clickable list of states with count of demo optometrists for each:
Clickable list of city addresses for each optometrist in the clicked state:
Details of an optometrist for a clicked address: