{"id":20858112,"url":"https://github.com/thenextlvl-net/arkitektonika","last_synced_at":"2025-04-16T01:57:03.730Z","repository":{"id":216323494,"uuid":"741040498","full_name":"TheNextLvl-net/Arkitektonika","owner":"TheNextLvl-net","description":"A lightweight alternative to the original Arkitektonika but with more API routes","archived":false,"fork":false,"pushed_at":"2025-04-15T03:45:30.000Z","size":387,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-16T01:56:45.040Z","etag":null,"topics":["arkitektonika","fastasyncworldedit","fawe","file-upload","intellectualsites","json","minecraft","nbt","plotsquared","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Java","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/TheNextLvl-net.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},"funding":{"github":["TheNextLvl-net","NonSwag"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-01-09T15:21:33.000Z","updated_at":"2025-04-15T03:45:26.000Z","dependencies_parsed_at":"2024-09-10T09:55:05.026Z","dependency_job_id":"03015b8e-10a5-4f4c-97dd-62b6bbfd33a9","html_url":"https://github.com/TheNextLvl-net/Arkitektonika","commit_stats":null,"previous_names":["nonswag/arkitektonika"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNextLvl-net%2FArkitektonika","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNextLvl-net%2FArkitektonika/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNextLvl-net%2FArkitektonika/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNextLvl-net%2FArkitektonika/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheNextLvl-net","download_url":"https://codeload.github.com/TheNextLvl-net/Arkitektonika/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183108,"owners_count":21226141,"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":["arkitektonika","fastasyncworldedit","fawe","file-upload","intellectualsites","json","minecraft","nbt","plotsquared","rest-api"],"created_at":"2024-11-18T04:44:45.323Z","updated_at":"2025-04-16T01:57:03.710Z","avatar_url":"https://github.com/TheNextLvl-net.png","language":"Java","funding_links":["https://github.com/sponsors/TheNextLvl-net","https://github.com/sponsors/NonSwag"],"categories":[],"sub_categories":[],"readme":"# Arkitektonika\n\n\u003cp\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/IntellectualSites/Assets/main/standalone/Arkitektonika/Arkitektonika.png\" width=\"150\"\u003e\n\u003c/p\u003e\n\n---\n\nThe original resource by IntellectualSites can be found [here](https://github.com/IntellectualSites/Arkitektonika)\n\nArkitektonika is a REST repository for NBT data. It accepts uploads of valid NBT data and stores them in a local folder\nwhile accounting for its metadata in a local sqlite database. ~Optionally, uploaded files can be expired based on the\nconfigurable age by running the prune script~. Files can always be deleted via their deletion key.\n\n## To Run\n\n### With Docker\n\n```sh\ngit clone https://github.com/TheNextLvl-net/Arkitektonika.git \u0026\u0026\ncd Arkitektonika \u0026\u0026\ndocker compose up\n```\n\n### From scratch\n\n```sh\ngit clone https://github.com/TheNextLvl-net/Arkitektonika.git \u0026\u0026\ncd Arkitektonika \u0026\u0026\n./gradlew shadowJar \u0026\u0026\njava -jar $(find build/libs/ -name \"*.jar\" -print -quit)\n```\n\n## Configuration\n\n```json\n{\n  \"port\": 3000,\n  \"prune\": 1800000,\n  \"maxSchematicSize\": 1000000,\n  \"allowedOrigin\": \"*\",\n  \"limiter\": {\n    \"windowMs\": 60000,\n    \"delayAfter\": 30,\n    \"delayMs\": 500\n  }\n}\n```\n\n\u003e [!WARNING]\n\u003e the `limiter` is not implemented yet\n\n| Config Key         | Description                                                                                                                |\n|--------------------|----------------------------------------------------------------------------------------------------------------------------|\n| port               | on which port should the application bind                                                                                  |\n| prune              | defines how old records must be to be deleted by the prune script (in ms)                                                  |\n| maxSchematicSize   | maximum size of schematic files to be accepted (in bytes)                                                                  |\n| limiter.windowMs   | the frame of the limiter (after what duration should the limit gets reset)                                                 |\n| limiter.delayAfter | After how many requests during windowMs should delayMs be applied                                                          |\n| limiter.delayMs    | How many ms should the request take longer. Formula: `currentRequestDelay = (currentRequestAmount - delayAfter) * delayMs` |\n\n## File structure:\n\n```\ndata\n├── config.json\n└── database.db\n```\n\n`config.json` holds the user configuration data \u003cbr\u003e\n`database.db` holds the required data for each schematic \u003cbr\u003e\n~~`schematics`  holds all schematic file data~~\n\n### Routes\n\nAll routes will be available at the exposed port (e.g. `localhost:3000`).\n\n### Get files as base64\n\n**GET `INSTANCE_URL/base64/{download_key}`**: get the file bytes as base64 encoded string\n\n```sh\ncurl --request GET 'http://localhost:3000/base64/db6186c8795740379d26fc61ecba1a24'\n```\nresponse:\n\n| Code | Meaning                            |\n|------|------------------------------------|\n| 200  | Success                            |\n| 404  | File was not found in the database |\n| 500  | A server error occurred            |\n\nresponse body: `base64 string`\n\n### Get file size\n\n**GET `INSTANCE_URL/size/{download_key}`**: get the file size\n\n```sh\ncurl --request GET 'http://localhost:3000/size/db6186c8795740379d26fc61ecba1a24'\n```\nresponse:\n\n| Code | Meaning                            |\n|------|------------------------------------|\n| 200  | Success                            |\n| 404  | File was not found in the database |\n| 500  | A server error occurred            |\n\nsuccess body: `43554` (in bytes)\n\n### Get file expiration\n\n**GET `INSTANCE_URL/expiration/{download_key}`**: get the file expiration date\n\n```sh\ncurl --request GET 'http://localhost:3000/expiration/db6186c8795740379d26fc61ecba1a24'\n```\n\nresponse:\n\n| Code | Meaning                            |\n|------|------------------------------------|\n| 200  | Success                            |\n| 404  | File was not found in the database |\n| 500  | A server error occurred            |\n\nsuccess body: `2717940582741` (in millis)\n\n### Set file expiration\n\n**PUT `INSTANCE_URL/expiration/{delete_key}/{expiration}`**: set the file expiration date\n\n```sh\ncurl --request PUT 'http://localhost:3000/expiration/11561161dffe4a1298992ce063be5ff9/2717940582741'\n```\n\nresponse:\n\n| Code | Meaning                            |\n|------|------------------------------------|\n| 200  | Expiration updated                 |\n| 404  | File was not found in the database |\n| 500  | A server error occurred            |\n\n### Upload a file\n\n**POST `INSTANCE_URL/upload`**: send your file as multipart/form-data; example:\n\n```sh\ncurl --request POST 'http://localhost:3000/upload' --form 'schematic=@/path/to/plot.schem'\n```\n\nresponse:\n\n| Code | Meaning                                       |\n|------|-----------------------------------------------|\n| 200  | File was of valid NBT format and was accepted |\n| 400  | File was not of valid NBT format              |\n| 413  | File payload was too large and rejected       |\n| 500  | Upload failed                                 |\n\nsuccess body:\n\n```json\n{\n  \"download_key\": \"db6186c8795740379d26fc61ecba1a24\",\n  \"delete_key\": \"11561161dffe4a1298992ce063be5ff9\",\n  \"expiration_date\": 1717940582741\n}\n```\n\nThe download key allows you to download the file, and the delete key lets you delete it. Share the `download_key`, but\nnot the `delete_key`.\n\n### Rename a file\n\n**PUT `INSTANCE_URL/rename/{deletion_key}/{name}`**: rename a file with the given `deletion_key` ; example:\n\n```sh\ncurl --request PUT 'http://localhost:3000/rename/11561161dffe4a1298992ce063be5ff9/renamed-plot.schem'\n```\n\nresponse:\n\n| Code | Meaning                            |\n|------|------------------------------------|\n| 200  | File was successfully renamed      |\n| 404  | File was not found in the database |\n\n### Download a file\n\n**GET `INSTANCE_URL/download/{download_key}`**: download a file with the given `download_key`; example:\n\n```sh\ncurl --request GET 'http://localhost:3000/download/db6186c8795740379d26fc61ecba1a24'\n```\n\nThe response for this is in the form of status codes only.\n\n| Code | Meaning                                                                                |\n|------|----------------------------------------------------------------------------------------|\n| 200  | File was found, prospective download would succeed                                     |\n| 404  | File was not found in the database                                                     |\n| 410  | File metadata is in accounting table, but file is not on disk or already expired       |\n| 500  | An internal server error occurred due to corrupted metadata (missing data in database) |\n\nOn success, the file is sent as an attachment for download to the browser / requester.\n\n### Delete a file\n\n**DELETE `PUBLIC_URL/delete/{delete_key}`**: delete a file with the given `delete_key`; example:\n\n```sh\ncurl --request DELETE 'http://localhost:3000/delete/11561161dffe4a1298992ce063be5ff9'\n```\n\nThe response for this is in the form of status codes only.\n\n| Code | Meaning                                                                                |\n|------|----------------------------------------------------------------------------------------|\n| 200  | File was found, prospective deletion would succeed                                     |\n| 404  | File was not found in the database                                                     |\n| 410  | File metadata is in accounting table, but file is not on disk or already expired       |\n| 500  | An internal server error occurred due to corrupted metadata (missing data in database) |\n\nOn success, the file is deleted and the record is marked as expired in the database. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenextlvl-net%2Farkitektonika","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenextlvl-net%2Farkitektonika","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenextlvl-net%2Farkitektonika/lists"}