Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
235322b
Fix: allow all proxied hosts in Vite dev server config
outlaw-dame Mar 23, 2026
2d88348
Fix auth: add ActivityPods stack + pod provider URL to sign-in/up forms
outlaw-dame Mar 23, 2026
4b4f5eb
feat(frontend): replace boxicons with platform-adaptive icon system; …
May 6, 2026
9ce9fdf
Add hosted Bluesky AppView client
May 8, 2026
0c92a90
Use hosted AppView for AT profile hydration
May 8, 2026
2214bfb
refactor(api): introduce elysiaCompat helpers for Elysia v1.4 API
May 8, 2026
4dd0659
feat(api): add media_attachments table + posts idempotency columns
May 8, 2026
98a0fb3
feat(api): media attachment service, upload routes, and pod uploadMedia
May 8, 2026
e43aa55
feat(api): post attachments and client-key idempotency
May 8, 2026
69ec390
feat(api): wire media plugins, register media translations and types
May 8, 2026
7ef3fe7
refactor(api): atBridge Elysia v1.4 compat + AT source posture clarif…
May 8, 2026
138cd50
chore(api): bump drizzle-orm to 0.45 and drizzle-kit to 0.31
May 8, 2026
8d995c1
chore(infra): gate legacy fedify-sidecar harness, harden api dockerfi…
May 8, 2026
e48adac
feat(frontend): PWA manifest, platform capabilities, mobile web-app meta
May 8, 2026
54d4bf5
feat(frontend): media composer + feed/thread UX, klipy, i18n, types
May 8, 2026
979d839
chore(frontend): misc updates — auth UI, local db, workers, router, s…
May 8, 2026
339d096
feat(api/link-preview): add Safe Browsing + tighten SSRF guards
May 8, 2026
5226f57
feat(api): close DNS-rebind + AP-actor SSRF gaps with secureFetch
May 8, 2026
8af7e10
merge(outlaw/master): reconcile fork-only auth/dev config changes
May 8, 2026
5ab06ad
fix(ci): align bun lockfile and route status typing for Elysia context
May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@ AT_BRIDGE_RETENTION_MAX_BATCHES_PER_RUN=8
AT_BRIDGE_RETENTION_AT_POSTS_DAYS=30
AT_BRIDGE_RETENTION_AT_RECORDS_DAYS=14
AT_BRIDGE_RETENTION_INACTIVE_RECORDS_DAYS=3
AT_BRIDGE_RETENTION_DRY_RUN=false
AT_BRIDGE_RETENTION_DRY_RUN=false
# --- Safe Browsing (link preview malicious-URL guard) ----------------------------
# Optional Google Safe Browsing v5alpha1 API key. When unset, link previews are
# fetched without the threat-intel check (open). Preferred name; SAFE_BROWSING_API_KEY
# is also accepted as a fallback for parity with ActivityPods backend / Fedify sidecar.
GOOGLE_SAFE_BROWSING_API_KEY=
# Set to 1 to block (rather than allow) URLs when the Safe Browsing call errors.
SAFE_BROWSING_FAIL_CLOSED=0
124 changes: 113 additions & 11 deletions api/bun.lock

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions api/drizzle/0015_media_attachments.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
-- Durable media attachment lifecycle for pod-first uploads.
-- Source binaries remain in the user's ActivityPods pod; this table stores
-- Memory-local upload state, ActivityPub attachment metadata, and processed
-- media references when they become available.

CREATE EXTENSION IF NOT EXISTS pgcrypto;--> statement-breakpoint

ALTER TABLE "posts"
ADD COLUMN IF NOT EXISTS "client_post_key" varchar(128),
ADD COLUMN IF NOT EXISTS "client_post_request_hash" varchar(64);--> statement-breakpoint

CREATE UNIQUE INDEX IF NOT EXISTS "posts_author_client_key_unique_idx"
ON "posts" ("author_id", "client_post_key")
WHERE "client_post_key" IS NOT NULL;--> statement-breakpoint

CREATE TABLE IF NOT EXISTS "media_attachments" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"user_id" integer NOT NULL,
"post_id" integer,
"state" text DEFAULT 'uploading' NOT NULL,
"kind" text NOT NULL,
"source_url" text,
"source_media_type" varchar(120) NOT NULL,
"source_size" integer NOT NULL,
"original_filename" text,
"alt_text" text,
"focus_x" integer,
"focus_y" integer,
"blurhash" varchar(128),
"width" integer,
"height" integer,
"duration_ms" integer,
"preview_url" text,
"thumbnail_url" text,
"canonical_url" text,
"gateway_url" text,
"filebase_cid" varchar(256),
"digest_multibase" varchar(256),
"error_code" varchar(64),
"error_message" text,
"expires_at" timestamp with time zone,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT "media_attachments_user_id_users_id_fk"
FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action,
CONSTRAINT "media_attachments_post_id_posts_id_fk"
FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON DELETE no action ON UPDATE no action,
CONSTRAINT "media_attachments_state_check"
CHECK ("state" IN ('uploading', 'uploaded', 'processing', 'ready', 'failed', 'expired', 'deleted')),
CONSTRAINT "media_attachments_kind_check"
CHECK ("kind" IN ('image', 'gif', 'video', 'audio', 'unknown')),
CONSTRAINT "media_attachments_size_check"
CHECK ("source_size" > 0),
CONSTRAINT "media_attachments_focus_x_check"
CHECK ("focus_x" IS NULL OR ("focus_x" >= -1000000 AND "focus_x" <= 1000000)),
CONSTRAINT "media_attachments_focus_y_check"
CHECK ("focus_y" IS NULL OR ("focus_y" >= -1000000 AND "focus_y" <= 1000000))
);--> statement-breakpoint

CREATE INDEX IF NOT EXISTS "media_attachments_user_state_idx"
ON "media_attachments" ("user_id", "state");--> statement-breakpoint

CREATE INDEX IF NOT EXISTS "media_attachments_user_post_idx"
ON "media_attachments" ("user_id", "post_id");--> statement-breakpoint

CREATE INDEX IF NOT EXISTS "media_attachments_expires_at_idx"
ON "media_attachments" ("expires_at");
7 changes: 7 additions & 0 deletions api/drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@
"when": 1777896060000,
"tag": "0014_chat_pod_commit_projection",
"breakpoints": true
},
{
"idx": 15,
"version": "7",
"when": 1777896120000,
"tag": "0015_media_attachments",
"breakpoints": true
}
]
}
Loading
Loading