{"id":21155260,"url":"https://github.com/nlfmt/stormdb","last_synced_at":"2025-07-09T11:31:36.275Z","repository":{"id":144927481,"uuid":"616709957","full_name":"nlfmt/stormdb","owner":"nlfmt","description":"Simple but feature-rich JSON database for NodeJS. Supports custom class serialization and deserialization, advanced querying, and more.","archived":false,"fork":false,"pushed_at":"2024-02-03T01:51:13.000Z","size":122,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-06T17:57:58.272Z","etag":null,"topics":["database","electron","javascript","json","node","nodejs","orm","typesafety","typescript"],"latest_commit_sha":null,"homepage":"","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/nlfmt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-03-20T23:26:01.000Z","updated_at":"2024-08-31T01:25:30.000Z","dependencies_parsed_at":"2024-02-03T01:34:11.042Z","dependency_job_id":null,"html_url":"https://github.com/nlfmt/stormdb","commit_stats":null,"previous_names":["nlfmt/json-db"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2Fstormdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2Fstormdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2Fstormdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2Fstormdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlfmt","download_url":"https://codeload.github.com/nlfmt/stormdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225537771,"owners_count":17485092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","electron","javascript","json","node","nodejs","orm","typesafety","typescript"],"created_at":"2024-11-20T11:16:55.950Z","updated_at":"2025-07-09T11:31:36.258Z","avatar_url":"https://github.com/nlfmt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Storm DB\nA **S**imple **T**ypescript **ORM** for NodeJS. Supports custom class serialization and deserialization, advanced querying, and more.\n\n## Disclaimer\n### Pros\nStormDB is a good choice for projects, that need a simple typesafe database, that works out of the box. \\\nSince all the data is stored in JSON (or a format of your choice), you dont have to set up anything like a server. \\\nStormDB can be used in any project you wish, as it is very lightweight.\n\n### Cons\nStormDB is **NOT** a good choice to store large amounts of data, as it loads the entire database into memory. \\\nIt is also not suitable for applications that need very fast data access. Even though StormDB is quite fast, as the data is stored in memory, \\\nit doesnt do any querying optimizations, like indexing.\n\n\n## Quickstart\n1. Install StormDB `npm install @nlfmt/stormdb`\n2. Install packages for you validation library, here are some examples:\n   - `npm install zod @typeschema/zod`\n   - `npm install valibot @typeschema/valibot`\n3. Initialize the database\n```ts\nimport StormDB from '@nlfmt/stormdb';\nimport { z } from 'zod';\n\nconst userModel = z.object({\n  name: z.string(),\n  age: z.number(),\n});\n\nconst db = StormDB({ user: userModel }, { storage: \"db.json\" });\n```\n4. Use the querying API\n```ts\n// Add a user\nlet usr = await db.user.create({ name: \"John\", age: 20 });\n\n// Get a user\nusr = await db.user.findById(usr._id);\nusr = await db.user.find({ name: \"John\" });\n\n// Update a user\nusr = await db.user.updateById(usr._id, { age: 21 });\nusr = await db.user.update({ name: \"John\" }, { age: 21 });\n\n// Delete a user\nawait db.user.deleteById(usr._id);\n```\n## Examples\nFor more examples, check out the `examples` folder.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlfmt%2Fstormdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlfmt%2Fstormdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlfmt%2Fstormdb/lists"}