A flexible local file-based JSON database
The datamodel of the database is based on JSON and supports both complex and nested object structures as well as relations as used in a relational database.
Both worlds can be mixed for optimal ease and flexibility.
The database is stored on your local filesystem which by first sight can seem counter-intuitive but has the following benefits:
The schema is an easy to edit JSON file which makes it simple to add or change fields as the project evolves.
Parts of an existing JSON structure can easily be edited where only the parts which require editing needs to be defined in the schema. Fields not defined in the schema will be left as is.
Example of a schema.json
schema definition file and a books.json
collection file from a books database.
{
"name": "Books",
"collections": [
{
"name": {
"singular": "book",
"plural": "books"
},
"fields": [
{
"propName": "title",
"title": "Title",
"type": "text",
"required": true
}, {
"propName": "totalSales",
"title": "Total Sales",
"type": "number",
"required": true
}, {
"propName": "author",
"title": "Author",
"type": "relation",
"targetCollection": {
"name": "authors",
"titleField": "name",
"inversedByPropName": "books"
}
}
]
}, {
"name": {
"singular": "author",
"plural": "authors"
},
"fields": [...]
}
]
}
{
"lastInsertId": 46,
"entries": [
{
"title": "Lord of the Rings",
"totalSales": 150000000,
"author": 100003,
"_meta": {
"created": 1697533822531,
"edited": 1697533822531
},
"id": 44
},
{
"title": "To Kill a Mockingbird",
"totalSales": 40000000,
"author": 100004,
"_meta": {
"created": 1697533984507,
"edited": 1697533984507
},
"id": 45
},
{
"id": 46,
"title": "Gone with the Wind",
"totalSales": 30000000,
"author": 100005,
"_meta": {
"created": 1697534102826,
"edited": 1697620854879
}
}
]
}