{"id":28641576,"url":"https://github.com/tbdsux/minidb","last_synced_at":"2026-04-28T00:32:58.909Z","repository":{"id":136174410,"uuid":"368514270","full_name":"tbdsux/minidb","owner":"tbdsux","description":"a simple flat-files json database","archived":false,"fork":false,"pushed_at":"2021-07-11T14:56:12.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T01:36:21.703Z","etag":null,"topics":["flat-file","flat-file-db","flat-json","go","go-json","json","jsondb","mini-json","minidb","simpledb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbdsux.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-18T12:04:04.000Z","updated_at":"2021-10-30T03:18:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"662b5956-1397-4bf8-a095-b5163e0f883c","html_url":"https://github.com/tbdsux/minidb","commit_stats":null,"previous_names":["theboringdude/minidb"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/tbdsux/minidb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fminidb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fminidb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fminidb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fminidb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbdsux","download_url":"https://codeload.github.com/tbdsux/minidb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbdsux%2Fminidb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32361477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["flat-file","flat-file-db","flat-json","go","go-json","json","jsondb","mini-json","minidb","simpledb"],"created_at":"2025-06-12T21:13:13.059Z","updated_at":"2026-04-28T00:32:58.904Z","avatar_url":"https://github.com/tbdsux.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minidb\n\n[![Test Status](https://github.com/TheBoringDude/minidb/workflows/Test/badge.svg)](https://github.com/TheBoringDude/minidb/actions)\n\na simple multi-flat-files json database\n\nThis has a really weird structure and api and **I know it :happy:**\n\n## Install\n\n```bash\ngo get -u github.com/TheBoringDude/minidb\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/TheBoringDude/minidb\"\n)\n\nfunc main() {\n\tdb := mindb.New('db')\n\n    fmt.Println(db)\n}\n\n```\n\nAll operations are just appending and setting in a `map[string]interface{}` or `append([]interface{}, interface{})`.\n\nIn all operations, it writes to the json file. I think it is not a good idea?\n\n#### Full Doc: https://pkg.go.dev/github.com/TheBoringDude/minidb\n\n### MiniDB\n\nIt takes a directory and manages all files within it. It is better only to use this when trying to manage multiple json files.\n\nNew files are created with a **`random uuid`** using [**`ksuid`**](https://github.com/segmentio/ksuid) so each file created by the library is unique.\n\n#### NOTE: this creates many json files in a specified directory\n\n```go\ndb := minidb.New(\"dirfolder\")\n\n// db.Keys(\"key\"), nested minidbs\n// db.Collections(\"key\"), a json collections, []\n// db.Store(\"key\"), a simple json key-value store (not meant with nested maps)\n\ncols := db.Collections(\"posts\")\ncols.Push(map[string]string{\n    \"title\": \"Hello World\",\n    \"content\": \"This is just something, maybe a content or not. I don't know how it works though.\",\n})\n\n// multiple elements is possible\ncols.Push(100, 20, \"sample\", false, []int{1,2,3,4,5})\n\nfmt.Println(cols)\n```\n\n### MiniCollections\n\nA simple collections json db file.\n\n```go\ndb := minidb.NewCollections(\"cols.json\")\ndb.Push(1)\n\nfmt.Println(1)\n```\n\n### MiniStore\n\nA simple key-value store json db file.\n\n```go\ndb := minidb.NewStore(\"store.json\")\ndb.Set(\"key\", \"value\")\n\nfmt.Println(db.GetString(\"key\"))\n```\n\n## TODO\n\n- Improve concurrency support.\n- fixes, improvements\n- more changes..\n- ...future development\n\n##\n\n#### \u0026copy; 2021 | [License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbdsux%2Fminidb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbdsux%2Fminidb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbdsux%2Fminidb/lists"}