Skip to content

feat: Add API Keys and Image Uploads support to Plummer dashboard/api - #7

Open
kiyarose wants to merge 1 commit into
mainfrom
jules-feat-plummer-apikeys-images-9932901083538209952
Open

feat: Add API Keys and Image Uploads support to Plummer dashboard/api#7
kiyarose wants to merge 1 commit into
mainfrom
jules-feat-plummer-apikeys-images-9932901083538209952

Conversation

@kiyarose

Copy link
Copy Markdown
Member

This PR introduces two major features to Plummer:

  1. API Keys Management & Authentication:

    • Adds a new "API Keys" section to the admin dashboard allowing administrators to generate, view, and revoke API keys with granular permissions (create, read, update, delete) and optional expiry/host scoping.
    • Updates checkApiKeyAuth to seamlessly intercept and enforce Bearer tokens on /api/* endpoints. Token hashes are stored in KV using a apikey:<host>:<id> format, while the user uses an id.secret string allowing O(1) KV lookup.
    • All management endpoints like /api/keys strictly require core administrative Basic Auth.
  2. Image Link Hosting & Uploads:

    • Adds an isImage toggle onto the link creation form in the admin dashboard, shifting the input to a file upload while disabling unnecessary fields like the destination URL.
    • Link payload creation is extended to handle multipart/form-data, ensuring a hard size limit of 5MB.
    • Image bytes are isolated and safely stored in the LINKIVERSE KV store mapped by image:<host>:<slug>.
    • The primary router correctly streams KV image data out with proper Content-Type mapping instead of forwarding requests to guest if type: 'image' is encountered.
    • src/index.js background scheduled link purge correctly cleans up any leftover KV image data when tombstoned images are purged.

PR created automatically by Jules for task 9932901083538209952 started by @kiyarose

Co-authored-by: kiyarose <75678535+kiyarose@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
plummer 951bcac Commit Preview URL

Branch Preview URL
Aug 13 2026, 01:41 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant