Skip to content

polooner/are.na-macOS-dock

Repository files navigation

ArenaDock

A macOS menu bar app for quickly saving things to Are.na. Built with Tauri + React.

ArenaDock screenshot

Drop a link, paste text, or drag a file -- ArenaDock sends it straight to your Are.na channels without ever opening a browser.

Features

  • Menu bar app -- lives in your tray, toggled with Ctrl+Option+A or a click
  • Drag & drop file uploads -- images, PDFs, videos, etc.
  • Link and text blocks -- paste a URL or type text to create blocks
  • Channel picker -- search your channels or browse recents, connect to multiple at once
  • OAuth login -- authenticates via Are.na's OAuth flow in an embedded webview

How file uploads work

Are.na doesn't expose a direct file-upload API endpoint. Instead, their flow is:

  1. Presign -- POST /uploads/presign returns a time-limited, signed S3 URL
  2. Upload -- PUT the file bytes to that S3 URL
  3. Create block -- POST /blocks with the S3 key to attach it to a channel

The catch: Are.na's S3 bucket CORS policy only allows *.are.na origins. A Tauri webview runs on tauri://localhost, so the browser's fetch() triggers a CORS preflight that S3 rejects with 403.

The fix: route the S3 PUT through Rust. The upload_to_s3 Tauri command uses reqwest to make the PUT from the Rust side, bypassing the browser's CORS enforcement entirely. The presign and block creation still happen via normal fetch() to the Are.na API (which does allow cross-origin requests).

sequenceDiagram
    participant JS as Browser (JS)
    participant Rust as Rust (Tauri)
    participant S3 as Are.na / S3

    JS->>Rust: POST /uploads/presign
    Rust-->>JS: { upload_url, key }

    JS->>Rust: invoke("upload_to_s3")<br/>{ url, contentType, data }
    Rust->>S3: PUT upload_url
    S3-->>Rust: 200 OK
    Rust-->>JS: Ok(())

    JS->>Rust: POST /blocks<br/>{ value: s3_url, channel_ids }
    Rust-->>JS: block created
Loading

Tech stack

  • Tauri 2 -- Rust backend, native webview frontend
  • React + TypeScript -- UI
  • Vite -- bundler
  • reqwest -- HTTP client (Rust side, for S3 uploads and OAuth token exchange)

Development

npm install
npm run tauri dev

Keyboard shortcut

Ctrl + Option + A -- toggle the dock from anywhere on macOS.

Releasing

Releases are fully automated via GitHub Actions. To publish a new version:

git tag v0.2.0
git push origin v0.2.0

That's it. The action will:

  1. Set the version from the tag (no manual version bumping needed)
  2. Build, sign, and notarize the macOS app
  3. Create a GitHub Release with the .dmg
  4. Update docs/update.json so existing users get auto-updated

The landing page at https://polooner.github.io/are.na-macOS-dock/ automatically links to the latest .dmg.

Required GitHub Secrets

These must be set in repo Settings > Secrets and variables > Actions:

Secret Description
APPLE_CERTIFICATE Base64-encoded .p12 export of "Developer ID Application" cert
APPLE_CERTIFICATE_PASSWORD Password set when exporting the .p12
APPLE_ID Apple ID email used for notarization
APPLE_PASSWORD App-specific password (generate at appleid.apple.com)
APPLE_TEAM_ID Apple Developer Team ID
TAURI_SIGNING_PRIVATE_KEY Contents of src-tauri/keys/update.key (for update signing)
TAURI_SIGNING_PRIVATE_KEY_PASSWORD Password for the update signing key

About

are.na macOS dock for linkmaxxing

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors