The Gist:

A juurni of a thousand miles begins with one step. Juurni is an SPA project where I explore indexedDB. It’s a, not yet full-featured, journaling app inspired by Dyrii on iOS. I won’t go anywhere with this app, i’s just an exploration into indexedDB, its features and API. At the moment, you will need to use the developer console in order to see the journal entries. Maybe later, I will pull the entries onto the UI.

Technically speaking

According to Mozilla, “IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs. This API uses indexes to enable high-performance searches of this data. While Web Storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data. IndexedDB provides a solution.”

Moreover, “IndexedDB is a transactional database system, like an SQL-based RDBMS. However, unlike SQL-based RDBMSes, which use fixed-column tables, IndexedDB is a JavaScript-based object-oriented database. IndexedDB lets you store and retrieve objects that are indexed with a key; any objects supported by the structured clone algorithm can be stored. You need to specify the database schema, open a connection to your database, and then retrieve and update data within a series of transactions.”

I found this definition intriguing because indexedDB has the potential to push a lot of power forward in a web application. It has the potential to surface some aspects of business logic, to the client-side browser, by way of the datastore and the javascript code used to interact with it. I was able to envision use cases, where a visitor to a site can be entertained as they wait for service, say at a restaurant, a car service dealer, or even at a doctors appointment; and technically speaking, without an internet connection. I’m not sure how popular this technology is today, but the applications of indexedDB are interesting.

A Journey of a Thousand Miles

As well as it fits, that line came to me as I sat down to write this post, which is months after beginning the project. So why another diary app? I developed Juurni on a whim of frustration with every other journaling app wanting to sync your entries to a cloud repository. I understand…in order to access anytime and anywhere, the entries would nned to be stored in a central repository that all instances of the app can access. Journal entries are private in my opinion, private to a degree above technical reason. This belief is the why for this project.

Juurni…at a glance

Currently, juurni is an SPA that consists for four controls. A calendar created by YSCoder, a textbox, a text area, and a button. While I hope to enrich the user interface a bit more for my own use, I have a simultaneous urge to keep it as simple as possible. The image below is the first version of the UI, with the second image being the developer’s console showing the records stored in the indexedDB. Finally, the code can be found in the github project linked below.


The Juurni web interface.


The console showing the indexedDB entries.

The Code

Here is the code behind Juurni, a simple implementation of the indexedDB API.


Comments are closed