{"id":21153848,"url":"https://github.com/idris-maps/tupplur","last_synced_at":"2026-04-30T06:31:50.333Z","repository":{"id":202972377,"uuid":"708524082","full_name":"idris-maps/tupplur","owner":"idris-maps","description":"a quick rest","archived":false,"fork":false,"pushed_at":"2023-11-20T21:57:16.000Z","size":696,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T23:08:26.188Z","etag":null,"topics":["deno-kv","json-schema","rest-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idris-maps.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-22T20:03:19.000Z","updated_at":"2023-10-22T20:12:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7059b61-6424-48bc-8322-404b3e876e56","html_url":"https://github.com/idris-maps/tupplur","commit_stats":null,"previous_names":["idris-maps/tupplur"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/idris-maps/tupplur","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idris-maps%2Ftupplur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idris-maps%2Ftupplur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idris-maps%2Ftupplur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idris-maps%2Ftupplur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idris-maps","download_url":"https://codeload.github.com/idris-maps/tupplur/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idris-maps%2Ftupplur/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032114,"owners_count":23100051,"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":["deno-kv","json-schema","rest-api"],"created_at":"2024-11-20T11:00:00.771Z","updated_at":"2026-04-30T06:31:45.302Z","avatar_url":"https://github.com/idris-maps.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![tupplur](./icon.png)\n\n# tupplur\n\nCreate a quick rest api with\n[JSON schema](https://json-schema.org/understanding-json-schema). Based on\n[deno kv](https://deno.com/kv) for storage and [ajv](https://ajv.js.org/) for\nvalidation.\n\n### run locally\n\nInstall\n\n```\ndeno install -n tupplur --allow-net --allow-read --allow-write --allow-env --unstable https://deno.land/x/tupplur/local.ts\n```\n\nWhy all these permissions?\n\n- `--allow-net` to accept incoming requests\n- `--allow-read` to read the database\n- `--allow-write` to write to the database\n- `--allow-env` to read the `.env` file\n- `--unstable` because deno kv still is\n\nCreate an `.env` file like this\n\n```\nSUPER_USER_KEY=hard_to_guess_string\nDB_PATH=test.db\nPORT=3333\n```\n\n- `SUPER_USER_KEY` is what you are going to use to authenticate when managing\n  collections\n- `DB_PATH` is where the data is going to be saved (if not defined, will use\n  global deno kv store)\n- `PORT` the port on which the service runs (defaults to 3333)\n\nStart the server\n\n```\ntupplur\n```\n\n### create your first collection\n\nMake a POST request to `/collections` with `name` (`string`) and `schema` (the\nJSON schema) in the body and `Authentication: Bearer $SUPER_USER_KEY` in the\nheaders.\n\n### manage access to the collection\n\nMake a POST request to `/collections/:name/access`, with the same authentication\nand a body like:\n\n```json\n{\n  \"key\": \"public\",\n  \"get\": true,\n  \"post\": true,\n  \"patch\": true,\n  \"put\": true,\n  \"delete\": true\n}\n```\n\nThis will allow anyone to make `get`, `post`, `patch`, `put` and `delete`\nrequests to `/api/:name` endpoints. Restrict by omiting methods or setting them\nto `false`. By default only the super user has access to the endpoints.\n\nThe key `public` means the users do not need to be authenticated. If you want to\nuse it with other keys than `SUPER_USER_KEY` but still not it being public, use\nwhatever hard to guess string instead of `public` and use that in the\nauthentication header. You can have multiple keys with different access.\n\nsee [the example requests](./example.http) for more endpoints to manage\ncollections.\n\n### use the api\n\nStart the server and go to http://localhost:3333 (if you did not change the\nport) to see and try the available endpoints.\n\n## run on deno deploy\n\nCreate a project in https://dash.deno.com/projects\n\nAdd a `SUPER_USER_KEY` environment variable to manage collections.\n\nRun:\n\n```\ndeployctl deploy --project YOUR_PROJECT_NAME --token=YOUR_TOKEN deploy.ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidris-maps%2Ftupplur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidris-maps%2Ftupplur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidris-maps%2Ftupplur/lists"}