dmc-autostore is a Lua module which makes saving JSON-style application and game data painlessly easy because it uses NO API !.

When the app starts you are given an empty "magic" Lua table. You add and remove data in it as you need. Any modifications made anywhere in the data structure will save those changes to JSON. Super simple? Yes ! Super awesome? Definitely !!

It's Full of Awesome!

AutoStore works by tying into some deep Lua "magic" to know when changes to the data structure have taken place. There are a couple of awesome things to mention:

  • First, this functionality is available anywhere in the data structure, no matter how deeply nested it is.

    So the entire JSON structure is supercharged with magic. See an example data structure below.

  • Second, you never have to think about saving data, or duplicate any code for saving data, or ever think about data storage again.

    Just write to the data structure and changes are saved when they need to be.

  • Third, when your app is architected using objects, you can give each object a reference to its little "branch" of the data structure.

    Then the object can read and write to its small part of the structure and AutoStore will manage the storage part for you.


There are several examples located in the repo under examples/.



This module can be freely downloaded from

Simply click on the image to the right

Module Documentation

dmc-autostore API

Details of the API for dmc-autostore.

dmc-autostore Documentation

Here is the full documentation for dmc-autostore.

Getting Started - dmc-autostore

Get up-and-running quickly using dmc-autostore.

Example Data Structure

This is a real-world example of a data structure from one of my applications in the App Store. The entire thing is actively watching for changes!

Imagine that with a key/value storage solution! :)

Shape Monster Data Structure