Indexeddb And Yii

I’ve decided to use Yii1 for the backend of a web app project since I’m familiar enough with Yii, the app is going to be offline capable and is going to be converted to an actual mobile/tablet app when its done. I’ve investigated client side storage options and out of cookies and localStorage I’ve decided to use IndexedDB (via IndexedDBShim so it’s cross browser, and IndexedDB).

See IndexedDB examples here: http://nparashuram.com/jquery-indexeddb/example/

Now my question is, has anyone done this before and if the code is open source I would love to take a look at it, basically I want to see how you pull the data stored in MySQL using Yii, in what format you get that data and how you put it in IndexedDB, using localStorage or Cookies it was all simple everything was JSON but IndexedDB I’m not sure and I’m still investigating.

Some more notes, Idea is:

User opens the app, JS checks to see if IndexedDB database exists, checks if user is signed in and his session is valid (user can have valid session for 30 days), and then if there is internet connection it starts syncing with the server (updating, adding or removing data from the server and from the local IndexedDB).

Edit: I think I figured out one side of the problem at least, using NJSON extension I can get data in JSON format from the server and then manipulate and put it in IndexedDB, haven’t thaught about updating, deleting or adding records yet.