From a5f067e5a69baf580d37358d6dbf139cf0b0b298 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Tue, 23 Dec 2025 12:29:33 -0500 Subject: [PATCH] feat: upgrade to gemini-2.0-flash-exp-image-generation model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use dedicated image generation model for better quality - Add enhanced prompt instructions for better text rendering - Use IMAGE-only responseModality for cleaner output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- app/api/zine/generate-page/route.ts | 18 ++++-- ...sletter-across-all-myco-themed-websites.md | 59 +++++++++++++++++++ ...sletter-across-all-myco-themed-websites.md | 24 -------- ...testing-newsletter-signups-on-all-sites.md | 56 ++++++++++++++++++ 4 files changed, 129 insertions(+), 28 deletions(-) create mode 100644 backlog/completed/task-1 - Integrate-newsletter-across-all-myco-themed-websites.md delete mode 100644 backlog/tasks/task-1 - Integrate-newsletter-across-all-myco-themed-websites.md create mode 100644 backlog/tasks/task-2 - Manual-testing-newsletter-signups-on-all-sites.md diff --git a/app/api/zine/generate-page/route.ts b/app/api/zine/generate-page/route.ts index 1bfec6b..606daea 100644 --- a/app/api/zine/generate-page/route.ts +++ b/app/api/zine/generate-page/route.ts @@ -130,6 +130,7 @@ async function generateImageWithGemini( } // Gemini image generation via RunPod US proxy (bypasses geo-restrictions) +// Uses gemini-2.0-flash-exp-image-generation for best quality with text rendering async function generateWithRunPodGeminiProxy( prompt: string, apiKey: string, @@ -138,7 +139,16 @@ async function generateWithRunPodGeminiProxy( ): Promise { const runpodUrl = `https://api.runpod.ai/v2/${endpointId}/runsync`; - console.log("Calling Gemini via RunPod proxy..."); + // Enhanced prompt for better text rendering + const enhancedPrompt = `${prompt} + +CRITICAL TEXT RENDERING INSTRUCTIONS: +- Any text in the image must be spelled correctly and legibly +- Use clean, readable typography appropriate to the style +- Avoid distorted or warped letters +- Text should be integrated naturally into the design`; + + console.log("Calling Gemini (gemini-2.0-flash-exp-image-generation) via RunPod proxy..."); const response = await fetch(runpodUrl, { method: "POST", @@ -149,18 +159,18 @@ async function generateWithRunPodGeminiProxy( body: JSON.stringify({ input: { api_key: apiKey, - model: "gemini-2.0-flash-exp", + model: "gemini-2.0-flash-exp-image-generation", contents: [ { parts: [ { - text: `Generate an image: ${prompt}`, + text: enhancedPrompt, }, ], }, ], generationConfig: { - responseModalities: ["TEXT", "IMAGE"], + responseModalities: ["IMAGE"], }, }, }), diff --git a/backlog/completed/task-1 - Integrate-newsletter-across-all-myco-themed-websites.md b/backlog/completed/task-1 - Integrate-newsletter-across-all-myco-themed-websites.md new file mode 100644 index 0000000..11768f7 --- /dev/null +++ b/backlog/completed/task-1 - Integrate-newsletter-across-all-myco-themed-websites.md @@ -0,0 +1,59 @@ +--- +id: task-1 +title: Integrate newsletter across all myco-themed websites +status: Done +assignee: ['@claude'] +created_date: '2025-12-04 10:23' +completed_date: '2025-12-23' +labels: [newsletter, infrastructure] +dependencies: [] +priority: medium +--- + +## Description + + +Set up consistent newsletter integration across all myco-themed sites and related properties. Using Listmonk (self-hosted) with custom newsletter-api for immediate welcome emails. + + +## Acceptance Criteria + +- [x] #1 Newsletter service selected and configured (Listmonk + newsletter-api) +- [x] #2 mycofi.earth has newsletter signup +- [x] #3 mycopunk.xyz has newsletter signup +- [x] #4 Subscriber lists unified or properly segmented (8 separate lists) + + +## Notes + +Newsletter integration completed for all 8 sites: +- MycoFi (mycofi.earth) +- Compost Capitalism (compostcapitalism.xyz) +- Trippin (trippinballs.lol) +- Undernet (undernet.earth) +- Psilo Cybernetics (psilo-cyber.net/ics) +- rSpace (rspace.app) +- Post-Appitalism (post-appitalism.app) +- Alltornet (alltor.net) + +### Implementation Details + +- **Newsletter Service**: Listmonk v5.1.0 (self-hosted at newsletter.jeffemmett.com) +- **API Layer**: Custom FastAPI newsletter-api service handles subscription + immediate welcome email +- **Welcome Messages**: Each site has unique on-brand welcome message +- **Opt-in**: Single opt-in (immediate subscription, no confirmation required) + +### Welcome Messages by Site + +| Site | Message | +|------|---------| +| MycoFi | "Merge in to the mesh. The mycelium remembers." | +| Compost Capitalism | "Welcome to the heap. Decomposition takes time." | +| Trippin | "The doors are open. Keep trippin'." | +| Undernet | ">_> UnderNet Access Granted. You're part of the underground now." | +| Psilo Cybernetics | "Welcome to a more adaptive future. The network grows." | +| rSpace | "Welcome to (you)rSpace. See you there." | +| Post-Appitalism | "Welcome to the post-app era. Big things loading..." | +| Alltornet | "Connect to the Alltor.net. Something's emerging." | + +All repos pushed and API tested successfully on 2025-12-23. diff --git a/backlog/tasks/task-1 - Integrate-newsletter-across-all-myco-themed-websites.md b/backlog/tasks/task-1 - Integrate-newsletter-across-all-myco-themed-websites.md deleted file mode 100644 index 4895b7d..0000000 --- a/backlog/tasks/task-1 - Integrate-newsletter-across-all-myco-themed-websites.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: task-1 -title: Integrate newsletter across all myco-themed websites -status: To Do -assignee: [] -created_date: '2025-12-04 10:23' -labels: [] -dependencies: [] -priority: medium ---- - -## Description - - -Set up consistent newsletter integration (likely Buttondown or similar) across all myco-themed sites: mycofi.earth, mycopunk.xyz, and any related properties. Ensure unified subscriber list and consistent branding. - - -## Acceptance Criteria - -- [ ] #1 Newsletter service selected and configured -- [ ] #2 mycofi.earth has newsletter signup -- [ ] #3 mycopunk.xyz has newsletter signup -- [ ] #4 Subscriber lists unified or properly segmented - diff --git a/backlog/tasks/task-2 - Manual-testing-newsletter-signups-on-all-sites.md b/backlog/tasks/task-2 - Manual-testing-newsletter-signups-on-all-sites.md new file mode 100644 index 0000000..b004971 --- /dev/null +++ b/backlog/tasks/task-2 - Manual-testing-newsletter-signups-on-all-sites.md @@ -0,0 +1,56 @@ +--- +id: task-2 +title: Manual testing newsletter signups on all sites +status: To Do +assignee: ['@jeff'] +created_date: '2025-12-23' +labels: [newsletter, testing, qa] +dependencies: [] +priority: high +--- + +## Description + + +Manually test the newsletter signup flow on all 8 websites to verify the user experience works correctly end-to-end. API testing passed, but need human verification of the actual site forms and welcome emails. + + +## Acceptance Criteria + +- [ ] #1 Test mycofi.earth newsletter signup - verify form works and welcome email received +- [ ] #2 Test compostcapitalism.xyz newsletter signup +- [ ] #3 Test trippinballs.lol newsletter signup +- [ ] #4 Test undernet.earth newsletter signup +- [ ] #5 Test psilo-cyber.net/ics newsletter signup +- [ ] #6 Test rspace.app newsletter signup +- [ ] #7 Test post-appitalism.app newsletter signup +- [ ] #8 Test alltor.net newsletter signup +- [ ] #9 Verify welcome email content matches expected messages +- [ ] #10 Check that success message displays correctly on each site + + +## Notes + +### Test Procedure +1. Visit each site's newsletter signup section +2. Enter a real email address +3. Click Subscribe +4. Verify success message appears on site +5. Check email inbox for welcome email +6. Verify welcome email has correct branding/message + +### Expected Welcome Messages + +| Site | Expected Message | +|------|------------------| +| MycoFi | "Merge in to the mesh. The mycelium remembers." | +| Compost Capitalism | "Welcome to the heap. Decomposition takes time." | +| Trippin | "The doors are open. Keep trippin'." | +| Undernet | ">_> UnderNet Access Granted. You're part of the underground now." | +| Psilo Cybernetics | "Welcome to a more adaptive future. The network grows." | +| rSpace | "Welcome to (you)rSpace. See you there." | +| Post-Appitalism | "Welcome to the post-app era. Big things loading..." | +| Alltornet | "Connect to the Alltor.net. Something's emerging." | + +### API Testing Results (2025-12-23) +All 8 newsletter APIs tested successfully via curl. Subscribers created and welcome emails triggered.