{"id":50493785,"url":"https://github.com/zewelor/pastesync","last_synced_at":"2026-06-02T05:03:31.965Z","repository":{"id":356530463,"uuid":"1232795449","full_name":"zewelor/pastesync","owner":"zewelor","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-17T06:03:03.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T08:18:04.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/zewelor.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-08T09:25:47.000Z","updated_at":"2026-05-17T06:03:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zewelor/pastesync","commit_stats":null,"previous_names":["zewelor/pastesync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zewelor/pastesync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewelor%2Fpastesync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewelor%2Fpastesync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewelor%2Fpastesync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewelor%2Fpastesync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zewelor","download_url":"https://codeload.github.com/zewelor/pastesync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewelor%2Fpastesync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33806995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-06-02T05:03:28.414Z","updated_at":"2026-06-02T05:03:31.956Z","avatar_url":"https://github.com/zewelor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PasteSync\n\nPasteSync is a minimal shared paste for moving text between phone and desktop.\n\n## Design Goals\n\n- exactly one shared paste per instance\n- no login, no accounts, no PIN, no database\n- no disk persistence, everything lives in process memory only\n- automatic cleanup after inactivity\n- simplest conflict model: last write wins\n- Docker-first runtime with a small Go binary and static frontend\n\n## Features\n\n- single-page UI with one `textarea`\n- autosave with a short debounce\n- live sync through Server-Sent Events\n- TTL based on the last change time\n- UI-visible paste size and TTL configuration\n- health endpoint for containers and orchestrators\n- no access logs for `/healthz`\n- multistage Docker image with distroless non-root runtime\n- browser favicon support for desktop browsers on Windows and Linux\n- Android web app icons and manifest support\n\n## Icons\n\n- Browser assets live in `web/` and are served directly by the app.\n- Raw-linkable SVG assets live in `icons/`.\n- Recommended gethomepage icon: `icons/pastesync-homepage.svg`\n\nExample raw SVG URL:\n\n`https://raw.githubusercontent.com/zewelor/pastesync/main/icons/pastesync-homepage.svg`\n\nExample gethomepage entry:\n\n```yaml\n- Utilities:\n    - PasteSync:\n        href: https://pastesync.example.com\n        description: Single shared paste\n        icon: https://raw.githubusercontent.com/zewelor/pastesync/main/icons/pastesync-homepage.svg\n        ping: https://pastesync.example.com/healthz\n```\n\n## Limitations\n\n- container restart wipes the paste\n- pod rescheduling or rollout wipes the paste\n- concurrent edits use last write wins\n- the app has no built-in auth, so public exposure should be protected at the network or ingress layer if needed\n\n## Configuration\n\n- `PORT`: listen address port, default `8080`\n- `PASTE_TTL`: inactivity timeout before the paste is cleared, default `24h`\n- `CLEANUP_INTERVAL`: optional override for cleanup checks\n- `MAX_BODY_BYTES`: request size limit for `PUT /api/paste`, default `262144`\n\nThe web UI reads `GET /api/config` to display the active TTL and body-size limit.\n\nIf `CLEANUP_INTERVAL` is not set, it is derived automatically from `PASTE_TTL`:\n\n- formula: `max(15s, min(30m, PASTE_TTL / 288))`\n- `24h` TTL becomes `5m`\n- `7d` TTL becomes `30m`\n- very short TTLs still use at least `15s`\n\nExample durations:\n\n- `24h`\n- `12h`\n- `30m`\n\n## Local Validation\n\n```bash\ndocker build --target validate .\n```\n\n## Docker\n\n```bash\ndocker build -t pastesync .\ndocker run --rm -p 8080:8080 pastesync\n```\n\nThe Dockerfile uses `go.mod` as the Go version source of truth.\n\n## Docker Compose\n\n```bash\ndocker compose up --build\n```\n\n## GitHub Actions\n\nThe repository includes a minimal workflow that builds and pushes a multi-arch image for:\n\n- `linux/amd64`\n- `linux/arm64`\n\nPublished images target `ghcr.io/zewelor/pastesync` and include `latest`, branch, tag, and `sha-*` tags.\n\n## Kubernetes\n\nThe Helm chart for Kubernetes lives in the GitOps repo under `charts/default/pastesync`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzewelor%2Fpastesync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzewelor%2Fpastesync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzewelor%2Fpastesync/lists"}