~bigbes/memestudio · parade

main · last commit 25 days ago · 45ojfkig

← Back to the parade

memestudio-d65 Fetch Imgflip templates once on first server start Past Stand

status: closed P1 feature @Eugene Blikh
bd reopen memestudio-d65
Created byEugene Blikh
Ownerbigbes@gmail.com
Created2026-07-19T22:34:41Z
Started2026-07-19T22:34:45Z
Updated2026-07-19T22:46:14Z
Closed2026-07-19T22:46:14Z
Description
Move Imgflip template acquisition out of the image/build path. On the first server start, launch a non-blocking Go job that fetches the Imgflip catalog and image bytes into SQLite; subsequent starts reuse the stored templates without contacting Imgflip. Update the template-serving path, packaging, documentation, and tests to match.
Design
Add SQLite templates plus a singleton import-completion row. Startup launches an Imgflip importer goroutine; it downloads the catalog and bounded image bodies concurrently, then commits usable templates and the completion marker in one transaction. GET /api/templates returns 202 + Retry-After until that marker exists and a manifest-shaped response afterward; GET /api/templates/{id} serves the stored blob. The browser renders immediately and polls the API in the background, while static-only hosting keeps its built-in placeholders. Remove the Docker network-fetch stage and the obsolete generator.
Acceptance criteria
The server starts without waiting for Imgflip; an empty database triggers one background import; imported template metadata and image bytes persist in SQLite; a populated database does not refetch on restart; the UI can load templates through the server; builds no longer fetch or bundle generated templates; relevant Go and frontend tests/build checks pass.

Depends on

No outgoing dependencies.

Depended on by

Nothing depends on this issue.

No comments.

Close reason

Implemented asynchronous first-start Imgflip import into SQLite, local template APIs, browser readiness polling, build-stage removal, documentation, and restart/failure tests.
  • Eugene Blikh created the issue · 2026-07-20T01:34:40Z
  • Eugene Blikh claimed · 2026-07-20T01:34:44Z
  • Eugene Blikh updated design to Add SQLite templates plus a singleton import-completion row. Startup launches an Imgflip importer goroutine; it downloads the catalog and bounded image bodies concurrently, then commits usable templates and the completion marker in one transaction. GET /api/templates returns 202 + Retry-After until that marker exists and a manifest-shaped response afterward; GET /api/templates/{id} serves the stored blob. The browser renders immediately and polls the API in the background, while static-only hosting keeps its built-in placeholders. Remove the Docker network-fetch stage and the obsolete generator. · 2026-07-20T01:37:07Z
  • Eugene Blikh closed the issue · 2026-07-20T01:46:14Z
    Implemented asynchronous first-start Imgflip import into SQLite, local template APIs, browser readiness polling, build-stage removal, documentation, and restart/failure tests.
Stored rows — what this pane was built from, as read
issues 1 row
id memestudio-d65
content_hash 93edcb7d20f77d0441dc0cff0f2c4aac04d9d9cff51c13a4d8499383f35519aa
title Fetch Imgflip templates once on first server start
description Move Imgflip template acquisition out of the image/build path. On the first server start, launch a non-blocking Go job that fetches the Imgflip catalog and image bytes into SQLite; subsequent starts reuse the stored templates without contacting Imgflip. Update the template-serving path, packaging, documentation, and tests to match.
design Add SQLite templates plus a singleton import-completion row. Startup launches an Imgflip importer goroutine; it downloads the catalog and bounded image bodies concurrently, then commits usable templates and the completion marker in one transaction. GET /api/templates returns 202 + Retry-After until that marker exists and a manifest-shaped response afterward; GET /api/templates/{id} serves the stored blob. The browser renders immediately and polls the API in the background, while static-only hosting keeps its built-in placeholders. Remove the Docker network-fetch stage and the obsolete generator.
acceptance_criteria The server starts without waiting for Imgflip; an empty database triggers one background import; imported template metadata and image bytes persist in SQLite; a populated database does not refetch on restart; the UI can load templates through the server; builds no longer fetch or bundle generated templates; relevant Go and frontend tests/build checks pass.
notes
status closed
priority 1
issue_type feature
assignee Eugene Blikh
estimated_minutes NULL
created_at 2026-07-19T22:34:41Z
created_by Eugene Blikh
owner bigbes@gmail.com
updated_at 2026-07-19T22:46:14Z
closed_at 2026-07-19T22:46:14Z
closed_by_session
external_ref NULL
spec_id
compaction_level 0
compacted_at NULL
compacted_at_commit NULL
original_size NULL
sender
ephemeral 0
wisp_type
pinned 0
is_template 0
mol_type
work_type
source_system
metadata �{}
source_repo
close_reason Implemented asynchronous first-start Imgflip import into SQLite, local template APIs, browser readiness polling, build-stage removal, documentation, and restart/failure tests.
event_kind
actor
target
payload
await_type
await_id
timeout_ns 0
waiters
hook_bead
role_bead
agent_state
last_activity NULL
role_type
rig
due_at NULL
defer_until NULL
no_history 0
started_at 2026-07-19T22:34:45Z
is_blocked 0
events 4 rows
id 019f7c84-6a6c-7ae1-b162-4434fde2b04d
issue_id memestudio-d65
event_type created
actor Eugene Blikh
old_value
new_value
comment NULL
created_at 2026-07-20T01:34:40Z
id 019f7c84-7a01-738e-a8e6-6fb6374156c3
issue_id memestudio-d65
event_type claimed
actor Eugene Blikh
old_value {"id":"memestudio-d65","title":"Fetch Imgflip templates once on first server start","description":"Move Imgflip template acquisition out of the image/build path. On the first server start, launch a non-blocking Go job that fetches the Imgflip catalog and image bytes into SQLite; subsequent starts reuse the stored templates without contacting Imgflip. Update the template-serving path, packaging, documentation, and tests to match.","acceptance_criteria":"The server starts without waiting for Imgflip; an empty database triggers one background import; imported template metadata and image bytes persist in SQLite; a populated database does not refetch on restart; the UI can load templates through the server; builds no longer fetch or bundle generated templates; relevant Go and frontend tests/build checks pass.","status":"open","priority":1,"issue_type":"feature","owner":"bigbes@gmail.com","created_at":"2026-07-19T22:34:41Z","created_by":"Eugene Blikh","updated_at":"2026-07-19T22:34:41Z"}
new_value {"assignee":"Eugene Blikh","status":"in_progress"}
comment NULL
created_at 2026-07-20T01:34:44Z
id 019f7c86-a85e-714c-8d19-6b79458a8816
issue_id memestudio-d65
event_type updated
actor Eugene Blikh
old_value {"id":"memestudio-d65","title":"Fetch Imgflip templates once on first server start","description":"Move Imgflip template acquisition out of the image/build path. On the first server start, launch a non-blocking Go job that fetches the Imgflip catalog and image bytes into SQLite; subsequent starts reuse the stored templates without contacting Imgflip. Update the template-serving path, packaging, documentation, and tests to match.","acceptance_criteria":"The server starts without waiting for Imgflip; an empty database triggers one background import; imported template metadata and image bytes persist in SQLite; a populated database does not refetch on restart; the UI can load templates through the server; builds no longer fetch or bundle generated templates; relevant Go and frontend tests/build checks pass.","status":"in_progress","priority":1,"issue_type":"feature","assignee":"Eugene Blikh","owner":"bigbes@gmail.com","created_at":"2026-07-19T22:34:41Z","created_by":"Eugene Blikh","updated_at":"2026-07-19T22:34:45Z","started_at":"2026-07-19T22:34:45Z"}
new_value {"design":"Add SQLite templates plus a singleton import-completion row. Startup launches an Imgflip importer goroutine; it downloads the catalog and bounded image bodies concurrently, then commits usable templates and the completion marker in one transaction. GET /api/templates returns 202 + Retry-After until that marker exists and a manifest-shaped response afterward; GET /api/templates/{id} serves the stored blob. The browser renders immediately and polls the API in the background, while static-only hosting keeps its built-in placeholders. Remove the Docker network-fetch stage and the obsolete generator."}
comment NULL
created_at 2026-07-20T01:37:07Z
id 019f7c8f-0068-7232-85eb-172abbb41071
issue_id memestudio-d65
event_type closed
actor Eugene Blikh
old_value
new_value Implemented asynchronous first-start Imgflip import into SQLite, local template APIs, browser readiness polling, build-stage removal, documentation, and restart/failure tests.
comment NULL
created_at 2026-07-20T01:46:14Z