{"id":25089853,"url":"https://github.com/wewatchwall/stark-db","last_synced_at":"2025-04-13T06:41:40.091Z","repository":{"id":199250649,"uuid":"702380288","full_name":"WeWatchWall/stark-db","owner":"WeWatchWall","description":"SQLite-backed, change-tracking database available over HTTP.","archived":false,"fork":false,"pushed_at":"2024-10-22T09:05:38.000Z","size":393,"stargazers_count":60,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T07:35:17.373Z","etag":null,"topics":["sql","sqlite"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/stark-db","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/WeWatchWall.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}},"created_at":"2023-10-09T08:01:42.000Z","updated_at":"2024-05-13T14:54:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"63018db3-d8d5-4fb4-bdb4-f6db6c407137","html_url":"https://github.com/WeWatchWall/stark-db","commit_stats":null,"previous_names":["wewatchwall/stark-db"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeWatchWall%2Fstark-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeWatchWall%2Fstark-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeWatchWall%2Fstark-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeWatchWall%2Fstark-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WeWatchWall","download_url":"https://codeload.github.com/WeWatchWall/stark-db/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675434,"owners_count":21143763,"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":["sql","sqlite"],"created_at":"2025-02-07T11:20:20.332Z","updated_at":"2025-04-13T06:41:40.073Z","avatar_url":"https://github.com/WeWatchWall.png","language":"TypeScript","readme":"# stark-db\n\n[![Build and test status](https://github.com/WeWatchWall/stark-db/workflows/Node.js%20CI/badge.svg)](https://github.com/WeWatchWall/stark-db/actions?query=workflow%3A%22Node.js+CI%22)\n[![NPM version](https://img.shields.io/npm/v/stark-db.svg)](https://www.npmjs.com/package/stark-db)\n\nSQLite-backed, change-tracking database available over HTTP.\n\n\n## Installation\n\n```bash\nnpm i -g stark-db\n```\n\n## Basics\n\nRun with:\n\n```bash\nstark-db\n```\n\nBy default, the DB engine is configured to run over SSL. While some self-signed\nssl certificates are automatically generated, they are not ever valid so\nthe user must supply their own. Then, the user needs to set the `-c` flag\nin order to enable the cookie security. Only then is this system ready for\nuse in production.\n\nThere is a Swagger endpoint `https://127.0.0.1:5984/api-docs` where the user can\ntry out the routes available.\n\nYou may want to use `BEGIN IMMEDIATE TRANSACTION;` if you write to the database\nconcurrently as SQLite will throw busy errors otherwise.\n\nThis database tracks changes to all entities in the auto-created column(on all\ntables) `stark_version`. There is also an extra table generated with any\nuser-created table called `_stark_del_${name}`. Deletions are tracked\nin this auxiliary set of tables. With the help of this change tracking,\nsynchronization mechanisms can be built later. The user has the option\nof using soft deletion -- marking data as deleted -- or relying on an\n`id` column to track such deletions. ROWID would not work in a synchronization\nscenario. Any modifications made by stark-db to the sqlite database\ncan be seen by running `select * from sqlite_master;` and the user can edit the\ntriggers/tables.\nAlso, the `-f` flag prevents all modifications related to change tracking.\n\nIt is recommended to invoke the API one query at a time although it is possible\nto execute multiple statements in a single invocation. Interactive queries are\nsupported due to the stateful nature of the API. A DB connection is marked\ninactive and is refreshed after 1 hour. A session cookie to the server is marked\ninactive after 1 day.\n\n## CLI\n\n```bash\n  -a, --address \u003caddress\u003e  HTTP address to listen on (default: \"127.0.0.1\")\n  -i, --doc \u003caddress\u003e      Address to query by the documentation (default: \"https://127.0.0.1\")\n  -p, --port \u003cport\u003e        HTTP port to listen on (default: \"5983\")\n  -s, --ssl \u003cport\u003e         HTTPS port to listen on (default: \"5984\")\n  -c, --cookie             Secure cookie, served over valid HTTPS only (default: false)\n  -d, --data \u003cpath\u003e        Path to the data directory (default: \"./data\")\n  -k, --certs \u003cpath\u003e       Path to the certs directory (default: \"./certs\")\n  -f, --simple             Do not run change-tracking queries (default: false)\n  -h, --help               display help for command\n```\n## Wiki\nSee the Wiki for [HTTP API Documentation](https://github.com/WeWatchWall/stark-db/wiki/HTTP-API-Documentation).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwewatchwall%2Fstark-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwewatchwall%2Fstark-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwewatchwall%2Fstark-db/lists"}