Sandstorm News

Packaging Laverna: localStorage within Sandstorm

By Jason Paryani - 12 Mar 2015

Last week, I packaged Laverna for Sandstorm and added it to the app list. You can now use this open source note-taking app from any Sandstorm instance with one click. In this post, I explain how a purely client-side note-taking app integrates with Sandstorm for storage.

From the Laverna devs:

Laverna is a JavaScript note-taking web application with a Markdown editor and encryption support. It’s built to be an open source alternative to Evernote.

Laverna is a fully client side app and typically stores all its data in IndexedDB/localStorage. In the case of the Sandstorm package, we configure the app to use localStorage and mirror any updates to localStorage to disk using a simple REST backend. On app start, we query the backend, and restore all the keys to localStorage.

Unfortunately (or maybe fortunately), there’s no way to monkey-patch the built-in localStorage to support this since it allows you to set keys by doing normal property access, ie. with localStorage.KEY or localStorage[KEY]. Javascript provides no way to shim over that, at least until ES6 proxies are widely implemented.

It’s also worth noting that the backend is a very lightweight C++ server that uses the raw Sandstorm API. The backend’s only jobs are to serve the index.html, handle GET/POST/PUT/DELETE requests to allow fetching/persisting the localStorage keys, and provide one GET endpoint that lists all the keys that have been stored. Its memory footprint is incredibly small, which makes it ideal for Sandstorm. You can check out the source here.

Within Laverna, it was surprisingly easy to add the automatic synchronizing. It took very little work to wire it up. You can see exactly how it works by reading my changes. If there’s some interest, let me know by emailing [email protected], and I can think about writing a nice looking wrapper around localStorage that would handle this seamlessly.

If you want to test this out, you can try Laverna on the Sandstorm demo; look at the network inspector tab in your browser as it runs.

Testing Sandstorm apps

By Asheesh Laroia - 11 Mar 2015

Have you ever wanted to try out new apps for Sandstorm before they make their way to the app list? Apps always need testing, and you can help.

Historically, the packaging process has been somewhat opaque – the App Committee would vote on apps, and new apps would magically appear in the app list. If an app’s author packages their own project, it seems to arrive all at once app list.

The truth is, someone tests these apps to make sure they work properly. App packagers have been emailing people privately to find testers.

I’m opening that testing up to the community with some new documentation.

Anyone who uses Sandstorm can test out new Sandstorm apps and features! Consider it our open beta program.

Check out the new testing doc, and subscribe to sandstorm-dev so you can hear about cool apps that are almost ready!

Postcards from Boston & Chicago

By Asheesh Laroia - 05 Mar 2015

I was recently traveling to Boston for the MIT Mystery Hunt and to Chicago to see my favorite band’s last show. While in town, I thought it’d be nice to meet up with Sandstorm fans. Here’s us!

In Boston, at Clover Food Lab:

In Chicago, at La Brasa Roja:

If I’m traveling again, I’ll drop a line to the mailing list – one more good reason to subscribe!

Give a talk; use this kit!

By Asheesh Laroia - 27 Feb 2015

Have you been wanting to give a Sandstorm lightning talk, but haven’t found time to put together slides? To make that easier, I made a speaker kit!

It has slides, notes, and advice so you can give a talk that explains the “what” and “why” of Sandstorm, and for showcasing an app of your choice on the Sandstorm Demo.

Where should I give my talk?

Anywhere there’s a local software meetup, or Linux users group, or tech group within your company or university, there are people who want to learn about Sandstorm.

For a programming meetup, attendees would be especially interested if you demo Sandstorm with an app on their platform. For a Node meetup, think EtherCalc. For Python (or data scientists!), think IPython Notebook. For Ruby, GitLab. For Rust, Acronymy. For Meteor, Telescope. (Check out the Sandstorm app list if you need more ideas!)

If you work with physicists or mathematicians, show them ShareLaTeX.

If you attend a tech conference, a Linux users group or other open source-oriented meetup, they’ll be captivated by the why and what of Sandstorm: easy web app self-hosting, with no config files or environment variables.

Get in touch

The speaker kit will get you started, and if you want practice, or coaching, or help promoting your talk, I’d love to hear from you. I also want to send you stickers! Write me an email at [email protected]!

And thanks to all the people who worked on the “Intro to Meteor” Speaker Kit – Alice Yu, Cesar Chen, Miroslav Hibler, Robert Dickert, and others – for writing a clear, inviting document that inspired me.

Hacker Slides: open source presentation app

By Asheesh Laroia - 17 Feb 2015

Last Thursday, Jack Singleton published a totally new app, designed for Sandstorm: Hacker Slides.

He explains:

You can write markdown on the left, and preview your presentation on the right.

Here is what it looks like. Click the image to try it on the Sandstorm demo:

Hacker Slides relies on the Sandstorm APIs, which means Jack never had to write code to handle user login, access control, or handling multiple documents.

He’s generously made it open source and published it on the Sandstorm App List, so you can install it with one click on your self-hosted Sandstorm instance.