{"id":24081509,"url":"https://github.com/beh01der/skyconf","last_synced_at":"2025-07-05T09:40:22.488Z","repository":{"id":186277952,"uuid":"674037029","full_name":"Beh01der/skyconf","owner":"Beh01der","description":"Simple REST-full service for managing structured JSON data","archived":false,"fork":false,"pushed_at":"2023-08-05T08:07:33.000Z","size":24229,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-09T23:16:53.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Beh01der.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-08-03T02:14:00.000Z","updated_at":"2023-08-04T08:20:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"241ded45-82af-46d3-a352-a8355c1f33eb","html_url":"https://github.com/Beh01der/skyconf","commit_stats":null,"previous_names":["beh01der/skyconf"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beh01der%2Fskyconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beh01der%2Fskyconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beh01der%2Fskyconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beh01der%2Fskyconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Beh01der","download_url":"https://codeload.github.com/Beh01der/skyconf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240957174,"owners_count":19884689,"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":[],"created_at":"2025-01-09T23:17:04.241Z","updated_at":"2025-02-27T00:33:13.300Z","avatar_url":"https://github.com/Beh01der.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# skyconf\n\n## Overview\n\nSimple REST-full FS-backed document storage.\\\nIt utilises REST, JSON-patch and JSONpath for data manipulation and querying.\\\nUses local file system (json files) for persistence.\n\n## Installation\n\n### Local / development\n\nClone repo\n\n```bash\ngit clone https://github.com/Beh01der/skyconf.git\n```\n\nBuild\n\n```bash\ncd skyconf\nyarn\nyarn build\n```\n\nStart\n\n```bash\nnode dist/index.js\n```\n\n### Docker\n\n```bash\ndocker run -d --name my-skyconf -p 3000:3000 beh01der/skyconf\n```\n\nMap local data directory for persistence\n\n```bash\ndocker run -d --name my-skyconf -p 3000:3000 -v ~/Tmp/my-skyconf:/app/data beh01der/skyconf\n```\n\n## Configuration\n\nConfiguration can be done by environment variables.\n\n- **SKYCONF_PORT** = `3000` - port to run service on\n- **SKYCONF_DATA_DIR** = `./data` - data directory for stored documents\n- **SKYCONF_UNSAFE_REMOVE_DIR** = `false` - when set to `true` will use `rm -rf` - like method when removing non-empty directories (will remove such directories with their content)\n\n## API\n\n### Read documents\n\n**GET `/api/v1/storage[resource path]`** - returns a single document or list of documents depending on the resource.\\\nParameters:\n\n- **jsonpath** - (optional) - jsonpath query selector. Example: `$.name`\n  \\\n  More details on jsonpath can be found here https://github.com/JSONPath-Plus/JSONPath\n\n_Example 1 - document :_\n\n```bash\ncurl -vg  http://localhost:3000/api/v1/storage/my-first-item.json\n```\n\nreturns\n\n```json\n{ \"result\": \"success\", \"doc\": { \"id\": 1, \"name\": \"Item 1\" } }\n```\n\n_Example 2 - document with jsonpath query :_\n\n```bash\ncurl -vg  http://localhost:3000/api/v1/storage/my-first-item.json?jsonpath=$.name\n```\n\nreturns\n\n```json\n{ \"result\": \"success\", \"doc\": [\"Item 1\"] }\n```\n\n_Example 3 - directory:_\n\n```bash\ncurl -vg  http://localhost:3000/api/v1/storage\n```\n\nreturns\n\n```json\n{\n  \"result\": \"success\",\n  \"isDirectory\": true,\n  \"docs\": [{ \"name\": \"my-first-item.json\" }]\n}\n```\n\n_Example 4 - error:_\n\n```bash\ncurl -vg  http://localhost:3000/api/v1/storage/items\n```\n\nreturns\n\n```json\n{\n  \"result\": \"error\",\n  \"message\": \"Entity not found\",\n  \"path\": \"/api/v1/storage/items\"\n}\n```\n\n### Create / replace document\n\n**POST `/api/v1/storage[resource path]`** - creates new document or replaces existing one. Will create missing directories if needed.\n\n_Example 1:_\n\n```bash\ncurl -v -XPOST -H 'Content-Type: application/json' -d '{\"id\": 1, \"name\":\"Item 1\"}' http://localhost:3000/api/v1/storage/my-first-item.json\n```\n\nreturns\n\n```json\n{ \"result\": \"success\", \"doc\": { \"id\": 1, \"name\": \"Item 1\" } }\n```\n\n### Update / patch documents\n\n**PATCH `/api/v1/storage[resource path]`** - updates existing document and returns result.\\\nMore details on \"json-patch\" format here https://github.com/Starcounter-Jack/JSON-Patch and https://datatracker.ietf.org/doc/html/rfc6902\n\nParameters:\n\n- **format** - (optional - default = json) - `json|json-patch` defines format of the patch\n\n_Example 1 - using json (default) format:_\n\n```bash\ncurl -vg  curl -v -XPATCH -H 'Content-Type: application/json' -d '{\"sub-items\":[]}' http://localhost:3000/api/v1/storage/my-first-item.json\n```\n\nreturns\n\n```json\n{ \"result\": \"success\", \"doc\": { \"id\": 1, \"name\": \"Item 1\", \"sub-items\": [] } }\n```\n\n_Example 2 using json-patch format:_\n\n```bash\ncurl -v -XPATCH -H 'Content-Type: application/json' \\\n  -d '[{\"op\":\"add\",\"path\":\"/sub-items/-\",\"value\":\"one\"},{\"op\":\"add\",\"path\":\"/description\",\"value\":\"Item 1 description\"}]' \\\n  http://localhost:3000/api/v1/storage/my-first-item.json?format=json-patch\n```\n\nreturns\n\n```json\n{\n  \"result\": \"success\",\n  \"doc\": {\n    \"id\": 1,\n    \"name\": \"Item 1\",\n    \"sub-items\": [\"one\"],\n    \"description\": \"Item 1 description\"\n  }\n}\n```\n\n### Removes document / directory\n\n**DELETE `/api/v1/storage[resource path]`** - removes specified document or directory.\n\n_Example 1:_\n\n```bash\ncurl -v -XDELETE http://localhost:3000/api/v1/storage/my-first-item.json\n```\n\nreturns\n\n```json\n{ \"result\": \"success\" }\n```\n\n## External resources\n\n- https://github.com/JSONPath-Plus/JSONPath\n- https://github.com/Starcounter-Jack/JSON-Patch\n- https://datatracker.ietf.org/doc/html/rfc6902\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeh01der%2Fskyconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeh01der%2Fskyconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeh01der%2Fskyconf/lists"}