{"id":21530708,"url":"https://github.com/kon14/shiftpaste","last_synced_at":"2026-05-16T23:06:40.605Z","repository":{"id":263483820,"uuid":"876951330","full_name":"kon14/ShiftPaste","owner":"kon14","description":"A pastebin service focused on editable snippets with persistent links 📋.","archived":false,"fork":false,"pushed_at":"2024-11-24T13:00:48.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T06:26:37.615Z","etag":null,"topics":["api","pastebin","postgres","qrcode","rust","sql","swagger"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kon14.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":"2024-10-22T20:35:43.000Z","updated_at":"2024-11-24T13:00:52.000Z","dependencies_parsed_at":"2024-11-19T05:32:15.770Z","dependency_job_id":null,"html_url":"https://github.com/kon14/ShiftPaste","commit_stats":null,"previous_names":["kon14/shiftpaste"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kon14%2FShiftPaste","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kon14%2FShiftPaste/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kon14%2FShiftPaste/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kon14%2FShiftPaste/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kon14","download_url":"https://codeload.github.com/kon14/ShiftPaste/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244094266,"owners_count":20397020,"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":["api","pastebin","postgres","qrcode","rust","sql","swagger"],"created_at":"2024-11-24T02:09:50.349Z","updated_at":"2026-05-16T23:06:35.571Z","avatar_url":"https://github.com/kon14.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n\u003cbr\u003e\n\u003ca href=\"https://github.com/kon14/ShiftPaste\" target=\"_blank\"\u003e\n    \u003ch1\u003eShiftPaste 📋\u003c/h1\u003e\n\u003c/a\u003e\nA pastebin service focused on editable snippets with persistent links.\n\u003c/div\u003e\n\n\u003chr /\u003e\n\nShiftPaste is a flexible backend solution for creating, managing, and sharing editable snippets.\u003cbr /\u003e\nWith a primary emphasis on content updates, ShiftPaste provides users with persistent links that allow the associated data to be modified without breaking the original link.\u003cbr /\u003e\nThis dynamic approach ensures that snippets remain accessible even as their content evolves.\n\nShiftPaste also supports QR code generation for seamless sharing and retrieval, making it an ideal choice for anyone needing a robust, adaptable snippet storage service.\n\n---\n\n## Building 🔨 \u003ca name=\"building\"\u003e\u003c/a\u003e\n\n``` bash\n# Build ShiftPaste\ndocker build -t shiftpaste .\n```\n\n## Running 💻 \u003ca name=\"running\"\u003e\u003c/a\u003e\n\n``` bash\n# Configure PostgreSQL (user: postgres, db: postgres)\ndocker run --name shiftpaste-postgres -p 5432:5432 -e POSTGRES_DB=\"shiftpaste\" -e POSTGRES_HOST_AUTH_METHOD=\"trust\" -d postgres\n\n# Apply DB Migrations (requires SQLX CLI)\nDATABASE_URL=\"postgres://postgres@localhost:5432/shiftpaste\" sqlx migrate run\n\n# Run ShiftPaste\ndocker run --name=shiftpaste -p 4000:4000 \\\n-e DATABASE_URL=\"postgres://postgres@host.docker.internal:5432/shiftpaste\" \\\n-e API_BASE_URL=\"http://localhost:4000\" \\\n-e AUTH_JWT_SECRET=\"7h3 c4k3 15 4 l13\" \\\n-d shiftpaste\n\n# Navigate to Swagger UI (on Linux)\nxdg-open \"http://localhost:4000/swagger/\"\n```\n\n---\n\n## Environment Variables 📃 \u003ca name=\"env-vars\"\u003e\u003c/a\u003e\n\n|              Variable              | Description                                                                                                                                                                                                          | Required |         Default          |            Example             |\n|:----------------------------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:------------------------:|:------------------------------:|\n|           `DATABASE_URL`           | The connection string URL for your PostgreSQL database.                                                                                                                                                              |  `True`  |            —             | `postgres://localhost:5432/db` |\n|             `API_PORT`             | The port to be used by the HTTP server.                                                                                                                                                                              | `False`  |          `4000`          |             `8080`             |\n|           `API_BASE_URL`           | A public URL pointing to the backend API's root path.                                                                                                                                                                |  `True`  |            —             |   `https://foo.bar.baz/api`    |\n|       `APP_SNIPPET_VIEW_URL`       | A public URL pointing to the frontend app's snippet preview page.\u003cbr /\u003eMay be used to customize snippet redirections.\u003cbr /\u003eFrontend app is expected to handle `GET` requests at `$APP_SNIPPET_VIEW_URL/:snippet_id`. | `False`  | `$API_BASE_URL/snippets` | `https://foo.bar.baz/snippets` |\n|             `RUST_LOG`             | Specifies the desired logging level.\u003cbr /\u003eRefer to the [env_logger](https://docs.rs/env_logger/latest/env_logger/) documentation for details.                                                                        | `False`  |         `error`          |             `info`             |\n|         `AUTH_JWT_SECRET`          | The secret to be used for JWT authentication token encoding/decoding.                                                                                                                                                |  `True`  |            —             |      `7h3 c4k3 15 4 l13`       |\n| `AUTH_ACCESS_TOKEN_DURATION_SECS`  | Duration for authentication access token validity (in seconds).                                                                                                                                                      | `False`  |   `5 * 60` (5 minutes)   |             `300`              |\n| `AUTH_REFRESH_TOKEN_DURATION_SECS` | Duration for authentication refresh token validity (in seconds).                                                                                                                                                     | `False`  |  `24 * 60 * 60` (1 day)  |            `86400`             |\n\n---\n\n## Local Development 👨🏻‍🔬 \u003ca name=\"local-dev\"\u003e\u003c/a\u003e\n\nThe following section assumes your environment contains an installation of the [Rust development toolchain](https://www.rust-lang.org/tools/install).\n\n``` bash\n# Prepare Git Hooks\nlefthook install\n\n# Install the SQLX CLI\ncargo install sqlx-cli --no-default-features --features postgres\n```\n\n``` bash\n# Apply DB Migrations\nDATABASE_URL=\"postgres://postgres@localhost:5432/shiftpaste\" sqlx migrate run\n\n# Build ShiftPaste\ncargo build\n\n# Run ShiftPaste\nDATABASE_URL=\"postgres://postgres@localhost:5432/shiftpaste\" \\\nAPI_BASE_URL=\"http://localhost:4000\" \\\nAUTH_JWT_SECRET=\"7h3 c4k3 15 4 l13\" \\\ncargo run\n\n# Navigate to Swagger UI (on Linux)\nxdg-open \"http://localhost:4000/swagger/\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkon14%2Fshiftpaste","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkon14%2Fshiftpaste","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkon14%2Fshiftpaste/lists"}