From 5f35041ab4923af29e4789bde539ae71349e103d Mon Sep 17 00:00:00 2001 From: randogoth Date: Sun, 7 Jun 2026 17:28:51 +0300 Subject: [PATCH] Add minimal README Co-Authored-By: Claude Sonnet 4.6 --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b93e877 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# jirorian + +Nostr-native image upload API for Cloudflare R2. + +Authenticates requests via [NIP-98](https://github.com/nostr-protocol/nips/blob/master/98.md), issues presigned R2 PUT URLs, and manages access via a custom Nostr registration event (kind `5392`). [NIP-96](https://github.com/nostr-protocol/nips/blob/master/96.md) compliant. + +## Requirements + +- Cloudflare R2 bucket with public CDN URL +- A Nostr keypair for the service identity +- A Nostr relay + +## Configuration + +All configuration is via environment variables: + +| Variable | Description | +|---|---| +| `R2_ENDPOINT` | `https://.r2.cloudflarestorage.com` | +| `R2_ACCESS_KEY_ID` | R2 access key | +| `R2_SECRET_ACCESS_KEY` | R2 secret key | +| `R2_BUCKET_NAME` | Target bucket | +| `R2_CDN_URL` | Public CDN base URL | +| `SERVICE_NOSTR_PRIVKEY` | Service Nostr private key (hex) | +| `SERVICE_RELAY_URL` | Relay to subscribe to for registrations | +| `JIRORIAN_DB` | SQLite DB path (default: `jirorian.db`) | + +## Development + +```bash +nix develop # enter dev shell with uv + virtualenv +uv run fastapi dev jirorian/main.py +``` + +## Deployment + +Packaged as a Nix flake, consumed by the NixOS host configuration as a flake input.