{"id":50362356,"url":"https://github.com/zz-drop/zz-drop-server-minimal","last_synced_at":"2026-05-30T02:30:27.131Z","repository":{"id":357009332,"uuid":"1221109456","full_name":"zz-drop/zz-drop-server-minimal","owner":"zz-drop","description":"Minimal reference implementation of the zz-drop API v1. For local dev, testing, and self-hosting experiments.","archived":false,"fork":false,"pushed_at":"2026-05-12T20:15:06.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T20:39:40.498Z","etag":null,"topics":["argon2","axum","reference-implementation","rest-api","rust","self-hosted","sqlite","sqlx"],"latest_commit_sha":null,"homepage":"https://zz-drop.net","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zz-drop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-25T19:07:56.000Z","updated_at":"2026-05-12T20:15:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zz-drop/zz-drop-server-minimal","commit_stats":null,"previous_names":["gibbio/zz-drop-server-minimal","zz-drop/zz-drop-server-minimal"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zz-drop/zz-drop-server-minimal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-drop%2Fzz-drop-server-minimal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-drop%2Fzz-drop-server-minimal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-drop%2Fzz-drop-server-minimal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-drop%2Fzz-drop-server-minimal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zz-drop","download_url":"https://codeload.github.com/zz-drop/zz-drop-server-minimal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zz-drop%2Fzz-drop-server-minimal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33678270,"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-05-30T02:00:06.278Z","response_time":92,"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":["argon2","axum","reference-implementation","rest-api","rust","self-hosted","sqlite","sqlx"],"created_at":"2026-05-30T02:30:26.290Z","updated_at":"2026-05-30T02:30:27.123Z","avatar_url":"https://github.com/zz-drop.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zz-drop-server-minimal\n\nMinimal reference implementation of the zz-drop API v1.\n\nThis is **not** the production server used by `zz-drop.net`.\n\nIt is intended for:\n\n- local development\n- testing\n- self-hosting experiments\n- API compatibility validation\n\n## Status\n\nPre-alpha reference implementation. `/api/v1/info` answers,\nSQLite via sqlx-migrate is wired, the binary serves over TCP.\nAuth endpoints (`/auth/register`, `/auth/login`, two-step\nTOTP login + enroll/verify/disable) and profile endpoints\n(`/profiles`, `/profiles/{alias}/blob`) are implemented; see\nthe endpoint list below for the current surface.\n\n## Quickstart\n\n```bash\n# default: bind 127.0.0.1:8080, in-memory SQLite\ncargo run\n\n# pick a port and a persistent SQLite file\nZZDROP_BIND=127.0.0.1:9000 \\\nDATABASE_URL=sqlite:./state.db \\\n    cargo run\n\n# hit the discovery endpoint\ncurl http://127.0.0.1:8080/api/v1/info\n# → {\"api_version\":\"1\",\"implementation\":\"zz-drop-server-minimal v…\",…}\n```\n\n## Local test\n\nFor a fast end-to-end check of the full HTTP surface:\n\n```bash\n./scripts/smoke.sh\n```\n\nThe script builds the binary, spawns it on `127.0.0.1:18080` with an\nin-memory SQLite, and walks register → login → list → create →\nput_blob → get_blob → version_conflict → delete. Each step prints\n`✓` on success.\n\nTo exercise the **TUI push sub-flow** end-to-end against this\nserver, follow the walkthrough in\n[`docs/local-test.md`](docs/local-test.md).\n\nFor a small binary suitable for distribution use the `dist` profile:\n\n```bash\ncargo build --profile dist\n```\n\n## Configuration\n\n| Env var | Default | Meaning |\n|---|---|---|\n| `ZZDROP_BIND` | `127.0.0.1:8080` | TCP bind address |\n| `DATABASE_URL` | `sqlite::memory:` | sqlx connection URL (SQLite only) |\n| `ZZDROP_TOTP_KEY` | _(generated in memory)_ | Base64 of 32 random bytes; the key used to encrypt TOTP shared seeds at rest. If unset, generated at startup — TOTP enrollments do not survive a restart and a stderr warning is printed. |\n| `ZZDROP_MAX_ALIASES_FREE` | `5` | Maximum profile aliases per Free account. |\n| `ZZDROP_BLOB_MAX_BYTES` | `1048576` (1 MiB) | Hard cap on the size of an uploaded encrypted blob (per blob). |\n| `RUST_LOG` | `zz_drop_server_minimal=info,tower_http=info` | tracing filter |\n\nThe default bind is loopback. Exposing the server to a public network\nis an explicit operator decision and pulls in everything in the\n\"Warning\" section below.\n\n## Warning\n\nThis project is intentionally minimal.\n\nDo not assume it is production-ready.\n\nIf you expose it to the public internet, you are responsible for:\n\n- TLS\n- backups\n- monitoring\n- rate limiting\n- abuse handling\n- security updates\n- database hardening\n- legal compliance\n\nUse at your own risk.\n\n## Included (v1 surface, target)\n\n- API v1 compatibility\n- account login/register\n- profile alias create/list/delete\n- encrypted `profile.zz` upload/download\n- `expected_version` conflict handling\n\nCurrently implemented:\n\n- `GET  /api/v1/info`\n- `POST /api/v1/auth/register`\n- `POST /api/v1/auth/login` (two-step when TOTP is on)\n- `POST /api/v1/auth/totp/enroll` (requires Bearer token)\n- `POST /api/v1/auth/totp/verify` (activates pending enrollment)\n- `POST /api/v1/auth/totp/login` (step 2 of two-step login)\n- `POST /api/v1/auth/totp/disable` (requires password + code)\n- `GET    /api/v1/profiles` (list aliases)\n- `POST   /api/v1/profiles` (create alias; quota-checked)\n- `GET    /api/v1/profiles/{alias}/blob` (download encrypted blob)\n- `PUT    /api/v1/profiles/{alias}/blob?expected_version=N` (atomic upload)\n- `DELETE /api/v1/profiles/{alias}` (remove alias + blob)\n- `GET    /api/v1/account/email-preferences` (returns the three flags)\n- `PUT    /api/v1/account/email-preferences` (partial body; `security_events` is non-disableable at both the API contract and the DB `CHECK` constraint)\n\nThe server now covers **14/14 endpoints** of the API v1 contract.\nOperationally it is still \"minimal reference\": no TLS, no edge\nrate-limit, no backups, no production guarantees — see `SECURITY.md`.\n\n## Not included\n\n- billing\n- Pro plan\n- email flows\n- polished dashboard\n- production hardening\n- advanced abuse protection\n- operational monitoring\n\n## License\n\nLicensed under either of [Apache License 2.0](LICENSE-APACHE) or\n[MIT License](LICENSE-MIT) at your option.\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the\nApache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzz-drop%2Fzz-drop-server-minimal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzz-drop%2Fzz-drop-server-minimal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzz-drop%2Fzz-drop-server-minimal/lists"}