{"id":17870145,"url":"https://github.com/williamragstad/lavastore-deno","last_synced_at":"2026-04-20T04:02:51.466Z","repository":{"id":57675638,"uuid":"470167522","full_name":"WilliamRagstad/LavaStore-Deno","owner":"WilliamRagstad","description":"LavaStore is a flexible and scalable local database for Deno 🦕","archived":false,"fork":false,"pushed_at":"2022-03-15T14:22:24.000Z","size":661,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T01:44:14.257Z","etag":null,"topics":["database","document","documentdb","localstorage"],"latest_commit_sha":null,"homepage":"https://deno.land/x/lavastore","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WilliamRagstad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-15T13:16:58.000Z","updated_at":"2022-03-15T14:23:08.000Z","dependencies_parsed_at":"2022-09-26T20:41:38.415Z","dependency_job_id":null,"html_url":"https://github.com/WilliamRagstad/LavaStore-Deno","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/WilliamRagstad/LavaStore-Deno","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamRagstad%2FLavaStore-Deno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamRagstad%2FLavaStore-Deno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamRagstad%2FLavaStore-Deno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamRagstad%2FLavaStore-Deno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WilliamRagstad","download_url":"https://codeload.github.com/WilliamRagstad/LavaStore-Deno/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamRagstad%2FLavaStore-Deno/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32032302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","document","documentdb","localstorage"],"created_at":"2024-10-28T10:12:24.842Z","updated_at":"2026-04-20T04:02:51.438Z","avatar_url":"https://github.com/WilliamRagstad.png","language":"TypeScript","funding_links":["http://paypal.me/williamragstad"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/WilliamRagstad/LavaStore-Deno/main/assets/logo.png\" width=\"250px\"/\u003e\n    \u003ch1\u003eLavaStore \u003ccode\u003eDeno\u003c/code\u003e\u003c/h1\u003e\n    \u003cp\u003eA flexible and scalable local database for the web\u003c/p\u003e\u003cbr\u003e\n    \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/workflow/status/WilliamRagstad/LavaStore-Deno/Deno?style=flat-square\u0026color=yellow\"\u003e\n    \u003cimg alt=\"GitHub release\" src=\"https://img.shields.io/github/release/WilliamRagstad/LavaStore-Deno?style=flat-square\u0026color=f70\"/\u003e\n    \u003cbr/\u003e\n    \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/last-commit/WilliamRagstad/LavaStore-Deno?style=flat-square\u0026color=f70\"\u003e\n    \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/contributors/WilliamRagstad/LavaStore-Deno?style=flat-square\u0026color=f60\"\u003e\n    \u003cimg alt=\"Deno\" src=\"https://img.shields.io/badge/deno-1.18.0+-yellow.svg?style=flat-square\"/\u003e\n    \u003cbr/\u003e\n\u003c/div\u003e\n\n## About\n\nLavaStore is a flexible and scalable local database for web development. It uses\na document-oriented data model to store persistent data safely with our built-in\npowerful storage structure. This is the latest version for the Deno runtime\nported from NPM.\n\nView the project on [Deno.land](https://deno.land/x/lavastore) or\n[GitHub](https://github.com/WilliamRagstad/LavaStore-Deno).\n\n## Featurs\n\n- **Easy to learn**\n- Intuitive **data modeling structure** inspired from\n  [Firestore](https://firebase.google.com/docs/firestore/data-model)\n  _(Firebase)_\n- Simple and **readable** API\n\n### Third-party extensions\n\n- Query Language Support\n  - [LavaStore QL](https://github.com/WilliamRagstad/LavaStore-QL) *(official)\n- ~~Asynchronous~~ (in-progress)\n\n## Usage\n\n**Documents** contains **sub-collections** and **fields** _(data)_, and\n**Collections** contains **sub-documents**.\n\nAlways start with creating a `new LavaStore('my_store')` class and give it a\nunique ID. The next step is to either setup a store document and collection\nstructure using either the `InsurePath()` method, or chained `Add()` methods.\nAlternatively, use `SetPath()` if you already have data to store in a specific\nsubdocument.\n\nThe image below is an example of an Firestore structure which is easily\nreplicable locally using LavaStore.\n\n![Structure](assets/structure.png)\n\nHere, **spotify** is a document containing no data but a **users** collection,\nwhere user-related data might be stored between sessions.\n\n### Data model\n\nThe way we store data using LavaStore is heavily inspired by the **Cloud\nFirestore** data model.\n\n\u003e Unlike a SQL database, there are no tables or rows. Instead, you store data in\n\u003e _documents_, which are organized into _collections_.\n\u003e\n\u003e Each _document_ contains a set of key-value pairs. Cloud Firestore is\n\u003e optimized for storing large collections of small documents.\n\u003e\n\u003e All documents must be stored in collections. Documents can contain\n\u003e _subcollections_ and nested objects, both of which can include primitive\n\u003e fields like strings or complex objects like lists.\n\nRead more about\n[structuring data](https://firebase.google.com/docs/firestore/manage-data/structure-data)\nand [data modeling](https://firebase.google.com/docs/firestore/data-model) from\nthe Firebase documentation.\n\n## Examples\n\nThe code below initializes a new LavaStore document root called `app`. When\nfirst running this code in the browser, we'll see a empty object being logged,\nbut after a reload it contains the data `{ value: \"Test\" }`.\n\n```typescript\n// TypeScript\nimport { LavaStore } from \"https://deno.land/x/lavastore/mod.ts\";\n\nconst AppDocument = new LavaStore(\"app\");\n\nconsole.log(AppDocument.Get());\n\nAppDocument.Set({\n  value: \"Test\",\n});\n```\n\nThe true power of\n\n## Specification\n\n| Description  | Value |\n| ------------ | ----- |\n| Package Size | 24 kB |\n| Semi-colons  | ~80   |\n\n### Public API\n\n#### LavaStore\n\nThis is a regular [**LSDocument**](#LSDocument) with the only exception that it\nstrictly must be root of a Document/Collection tree.\n\n#### LSDocument\n\n```typescript\nclass LSDocument {\n  id: string;\n  parent: LSCollection | undefined;\n  Collection(id: string): LSCollection | undefined;\n  Contains(id: string): boolean;\n  Add(collection: LSCollection): void;\n  Remove(id: string): void;\n  InsurePath(path: string | string[]): void;\n  Load(): void;\n  Save(): void;\n  Set(data: object): void;\n  Get(): object;\n  HasData(): boolean;\n  SetPath(path: string | string[], data: object): void;\n  GetPath(path: string | string[]): object;\n  CollectionPath(path: string | string[]): LSCollection;\n  DocumentPath(path: string | string[]): LSDocument;\n  PassTo(callback: ((data: object) =\u003e any)): void;\n}\n```\n\n#### LSCollection\n\n```typescript\nclass LSCollection {\n  id: string;\n  parent: LSDocument | undefined;\n  Contains(id: string): boolean;\n  Document(id: string): LSDocument | undefined;\n  Add(document: LSDocument): void;\n  Remove(id: string): void;\n}\n```\n\n## Want to help?\n\nAll help is very much appreciated! You can fork the repo right now and start\nbuilding your own modified version right away, and if you happen to create\nsomething interesting and useful, don't hesitate to file a pull request!\n\n### Sponsor this project\n\nYou can also help by supporting the project financially, all gifts are\nappreciated with great reverence and gratitude.\n\nDeveloper: [paypal.me/williamragstad](http://paypal.me/williamragstad)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamragstad%2Flavastore-deno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamragstad%2Flavastore-deno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamragstad%2Flavastore-deno/lists"}