<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged text2image</title>
<link>https://coderlegion.com/tag/text2image</link>
<description>Powered by Question2Answer</description>
<item>
<title>BetaGracevI</title>
<link>https://coderlegion.com/25418/betagracevi</link>
<description>&lt;p&gt;BetaGrace vI&lt;br&gt;
(&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/thesweetlord/BetaGraceVI_GOLDEN&quot;&gt;https://github.com/thesweetlord/BetaGraceVI_GOLDEN&lt;/a&gt;) TypeScript Node [Tests&lt;br&gt;
BetaGrace vI is a full-stack AI agent platform designed for adult creative writing, multi-modal generation (text, image, video), and deep narrative exploration. Built on TypeScript, React, Express, and PostgreSQL — runs entirely on free-tier AI providers.&lt;/p&gt;
&lt;p&gt;Current Version: 4.3 — May 27, 2026 Test Status: npm run test:fast — 76/78 smoke tests passing (97.4%); 2 local-synthesis debug retrieval checks currently return 401 Unauthorized.&lt;/p&gt;
&lt;p&gt;Image Generation Benchmark&lt;br&gt;
High-Density Constraint-Locking Evaluation&lt;br&gt;
19/ 27 canonical concepts passed (70.37%) under strict zero-tolerance visual verification.&lt;/p&gt;
&lt;p&gt;This public benchmark tests whether an image-generation system can hold a dense set of precise, verifiable constraints at once, including laterality, exact text placement and material, dual lighting temperatures, micro-details, and object states. One missing or unverifiable critical constraint is a FAIL; aspect ratio is excluded from the pass/fail metric.&lt;/p&gt;
&lt;p&gt;The result applies to the documented prompts, endpoints, attempt budgets, and visual verification rules. It does not claim that the underlying image model was modified or retrained, universal superiority across prompts or model versions, or statistical dominance from the small head-to-head sample.&lt;br&gt;
This is still being worked on by me and will be finalized for release once I go through the logs.&lt;/p&gt;
&lt;p&gt;Benchmark package: IMAGE BENCHMARK.zip README · master report · 27-prompt table · passing images · failed images · public image logs&lt;/p&gt;
&lt;p&gt;What is BetaGrace?&lt;br&gt;
BetaGrace is an AI agent platform with 8 specialized writing modes, a cinematic video generation pipeline, a 7-section academic paper builder, image generation with 42 mix-and-match style descriptors, code graph intelligence, a full GDPR compliance layer (Art. 17 + Art. 20), and an in-app admin dashboard — all running as a single self-contained server you can deploy anywhere.&lt;/p&gt;
&lt;p&gt;It runs entirely on free-tier AI providers (OpenRouter + Local Synthesis). No paid API keys are required to get started.&lt;/p&gt;
&lt;p&gt;Features&lt;br&gt;
8 AI Modes&lt;br&gt;
ModeDescription&lt;br&gt;
StandardBalanced writing and general-purpose assistant&lt;br&gt;
Flesh ArchitectDark, intense, body-horror and gothic creative writing&lt;br&gt;
SanctuarySafe, gentle, protective tone for sensitive topics&lt;br&gt;
Advanced ReasoningDeep structured thinking for complex questions&lt;br&gt;
AutonomousMulti-step task execution without hand-holding&lt;br&gt;
Video GeneratorCinematic storyboard → frame generation → FFmpeg MP4 assembly&lt;br&gt;
Code GraphPaste code → live SVG force-directed dependency graph (JS/TS/Python)&lt;br&gt;
Academic Research70×7 pipeline: Guard Loop → 7-section paper, written and downloaded independently&lt;br&gt;
Smart Toggles&lt;br&gt;
Faith Enhancement — adds spiritual voice and grace-forward imagery to responses&lt;br&gt;
Advanced Reasoning — deeper, structured thinking in any mode&lt;br&gt;
AI Provider Chain (fully free)&lt;br&gt;
Requests cascade through providers until one succeeds:&lt;/p&gt;
&lt;p&gt;OpenRouter — primary, fastest&lt;br&gt;
Local Synthesis Engine — always available, zero external dependencies&lt;br&gt;
70×7 Academic Artifact Builder&lt;br&gt;
Type /full [topic] in chat or click the Write Artifact toolbar button&lt;br&gt;
DuckDuckGo Guard Loop validates the topic before any writing begins&lt;br&gt;
7-section paper generated in the background — no proxy timeouts&lt;br&gt;
Live progress bar: Section X/7 —  updated every 3 seconds&lt;br&gt;
Completed paper downloads as a Markdown file&lt;br&gt;
Artifacts persisted to PostgreSQL — survive server restarts&lt;br&gt;
Video Generation Pipeline&lt;br&gt;
Storyboard hydration engine generates 10–20 cinematically distinct scenes&lt;br&gt;
Each frame individually prompted with unique shot angles, lighting, atmosphere, and seed&lt;br&gt;
FFmpeg assembles frames into a streaming MP4 (H.264, CRF 23, fast preset)&lt;br&gt;
Real-time storyboard preview with scene captions during processing&lt;br&gt;
Automatic cleanup of temp frames after assembly&lt;br&gt;
Full mobile support (iOS + Android)&lt;br&gt;
Image Generation&lt;br&gt;
Pollinations Flux API — no key required for basic use&lt;br&gt;
42 mix-and-match style descriptors — 150+ effective style combinations&lt;br&gt;
Hand-validation loop with up to 3 auto-retries for anatomical correctness&lt;br&gt;
High / ultra quality options&lt;br&gt;
Code Graph Panel&lt;br&gt;
Paste any JS, TypeScript, or Python snippet&lt;br&gt;
SVG force-directed graph renders live in the browser using Graphology&lt;br&gt;
Nodes = files/classes/functions, edges = import/call relationships&lt;br&gt;
Works on mobile (pinch-zoom recommended for large graphs)&lt;br&gt;
Memory &amp;amp; Learning System&lt;br&gt;
Per-session parallel learning engine analyzes writing patterns in real time&lt;br&gt;
Long-term semantic compression stores insights across sessions&lt;br&gt;
Anti-cascade protocol: learning data survives session deletion (ON DELETE SET NULL)&lt;br&gt;
All memory stored in PostgreSQL — persists across restarts&lt;br&gt;
Admin endpoint: GET /api/health/learning (requires ADMIN_TOKEN)&lt;br&gt;
Retrieval debug endpoint: POST /api/synthesis/test-retrieval lets you inspect the top local BM25/fallback matches and scores without affecting normal chat behavior&lt;br&gt;
Privacy &amp;amp; GDPR Compliance&lt;br&gt;
GDPR Article 20 — Right to Data Portability&lt;/p&gt;
&lt;p&gt;One-click ZIP export from Settings → Data tab — 6 JSON files + README.txt&lt;br&gt;
Files: session.json, conversations.json, messages.json, consent.json, learning_data.json, long_term_memory.json&lt;br&gt;
GDPR Article 17 — Right to Erasure&lt;/p&gt;
&lt;p&gt;Formal deletion request form in Settings → Data tab (reason + optional message)&lt;br&gt;
Request logged to DB, admin email notification via configurable SMTP&lt;br&gt;
30-day processing window with status tracking (pending → processing → completed)&lt;br&gt;
Instant Self-Service Deletion&lt;/p&gt;
&lt;p&gt;&quot;Delete All My Data&quot; button hard-deletes everything immediately via cascade&lt;br&gt;
Additional&lt;/p&gt;
&lt;p&gt;COPPA-compliant 18+ age verification gate&lt;br&gt;
30-day rolling retention auto-purge (based on last interaction, not session creation)&lt;br&gt;
12-month consent record auto-purge&lt;br&gt;
6-category granular cookie consent&lt;br&gt;
Full Privacy Policy and Terms of Service served as API endpoints&lt;br&gt;
In-App Admin Panel&lt;br&gt;
Access via Settings → Admin tab with your ADMIN_TOKEN:&lt;/p&gt;
&lt;p&gt;PanelFunction&lt;br&gt;
Learning Health DashboardLive DB counts for learning data, long-term memory, anti-cascade proof. Auto-refreshes every 30s&lt;br&gt;
GDPR Deletion RequestsAll Art. 17 requests with session IDs, timestamps, user messages. One-click Mark Complete / Processing / Failed&lt;br&gt;
Session Consent LookupLook up any session's consent record and cookie preferences by session ID&lt;br&gt;
Tech Stack&lt;br&gt;
LayerTechnology&lt;br&gt;
FrontendReact 18 + Vite + TypeScript&lt;br&gt;
StylingTailwind CSS + shadcn/ui (Radix UI)&lt;br&gt;
StateZustand + TanStack Query&lt;br&gt;
BackendExpress + TypeScript (tsx)&lt;br&gt;
DatabasePostgreSQL 14+ via Drizzle ORM&lt;br&gt;
AI / TextOpenRouter + Local Synthesis&lt;br&gt;
AI / ImagesPollinations Flux API&lt;br&gt;
VideoFFmpeg (ffmpeg-static, no install required)&lt;br&gt;
Emailnodemailer (SMTP — optional, graceful skip when unconfigured)&lt;br&gt;
AuthSession-based with fingerprint fallback&lt;br&gt;
RoutingWouter (client), Express (server)&lt;br&gt;
Quick Start&lt;br&gt;
Prerequisites&lt;br&gt;
Node.js 20+&lt;br&gt;
PostgreSQL 14+ (or a free hosted instance — Neon, Supabase, Railway)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clone &amp;amp; install&lt;br&gt;
git clone &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/thesweetlord/BetAGracevI.git&quot;&gt;https://github.com/thesweetlord/BetAGracevI.git&lt;/a&gt;&lt;br&gt;
cd betagrace&lt;br&gt;
npm install&lt;/li&gt;
&lt;li&gt;Configure environment&lt;br&gt;
cp .env.example .env&lt;br&gt;
Edit .env — the three required values:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;DATABASE_URL=postgresql://user:password@localhost:5432/betagrace&lt;br&gt;
SESSION_SECRET=&amp;lt;generate: node -e &quot;console.log(require('crypto').randomBytes(32).toString('hex'))&quot;&amp;gt;&lt;br&gt;
ADMIN_TOKEN=&lt;br&gt;
DEV_PASSWORD=&lt;br&gt;
Everything else is optional. The app works fully without any paid API keys.&lt;/p&gt;
&lt;p&gt;Optional — for better AI performance:&lt;/p&gt;
&lt;p&gt;POLLINATIONS_API_KEY=your_key_here&lt;br&gt;
Optional — for GDPR Art. 17 email alerts:&lt;/p&gt;
&lt;p&gt;ADMIN_EMAIL=&lt;em&gt;Emails are not allowed&lt;/em&gt;&lt;br&gt;
SMTP_FROM=&lt;em&gt;Emails are not allowed&lt;/em&gt;&lt;br&gt;
SMTP_HOST=smtp.yourdomain.com&lt;br&gt;
SMTP_PORT=587&lt;br&gt;
SMTP_USER=your_smtp_username&lt;br&gt;
SMTP_PASS=your_smtp_password&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set up the database&lt;br&gt;
npx drizzle-kit push&lt;/li&gt;
&lt;li&gt;Start the server&lt;br&gt;
npm run dev&lt;br&gt;
Open &lt;a rel=&quot;nofollow&quot; href=&quot;http://localhost:5000&quot;&gt;http://localhost:5000&lt;/a&gt; — you'll see the age verification screen, then the full platform.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Running Tests&lt;/p&gt;
&lt;h2 id=&quot;fast-mode-78-tests-23s-skips-long-polling-artifact-waits&quot;&gt;Fast mode (78 tests, ~23s) — skips long-polling artifact waits&lt;/h2&gt;
&lt;p&gt;npm run test:fast&lt;/p&gt;
&lt;h2 id=&quot;full-suite-includes-artifact-polling-and-may-take-several-minutes-&quot;&gt;Full suite (includes artifact polling and may take several minutes)&lt;/h2&gt;
&lt;p&gt;npm run test&lt;br&gt;
The fast suite covers: all 8 AI modes, full session lifecycle, SSE streaming, artifact builder pipeline, video mode guards, code graph analysis, memory system, guardrails (injection + oversized message), privacy endpoints (export/delete/anti-cascade), admin token auth, GDPR flows, feature toggles, concurrent session isolation, session edge cases, max-token validation, and database schema checks. The current run passes 76 of 78 checks; the two failures are local-synthesis debug retrieval checks receiving 401 Unauthorized.&lt;/p&gt;
&lt;p&gt;Project Structure&lt;br&gt;
betagrace/&lt;br&gt;
├── client/                              # React + Vite frontend&lt;br&gt;
│   └── src/&lt;br&gt;
│       ├── components/&lt;br&gt;
│       │   ├── ChatInterface.tsx        # Main chat UI (~2,050 lines)&lt;br&gt;
│       │   ├── CodeGraphPanel.tsx       # SVG code graph renderer&lt;br&gt;
│       │   ├── ModeSelector.tsx         # AI mode switcher&lt;br&gt;
│       │   └── ...&lt;br&gt;
│       └── pages/&lt;br&gt;
│           ├── Dashboard.tsx            # Main app page&lt;br&gt;
│           └── Settings.tsx             # Settings + Admin panel (1,399 lines)&lt;br&gt;
├── server/&lt;br&gt;
│   ├── routes.ts                        # All API endpoints (6,659 lines)&lt;br&gt;
│   ├── ai.ts                            # Multi-provider AI orchestration&lt;br&gt;
│   ├── academic-research-engine.ts      # 70x7 Artifact Builder + Guard Loop&lt;br&gt;
│   ├── guardrails.ts                    # Content safety layer (1,175 lines)&lt;br&gt;
│   ├── storage.ts                       # Data access layer (1,133 lines)&lt;br&gt;
│   ├── email.ts                         # SMTP email service (GDPR Art. 17)&lt;br&gt;
│   ├── video-engine-hydration.ts        # Storyboard + scene hydration&lt;br&gt;
│   ├── synthesis-engine.ts              # Memory synthesis system&lt;br&gt;
│   ├── parallel-learning.ts             # Behavioral pattern engine&lt;br&gt;
│   └── code-graph-analyzer.ts          # JS/TS/Python graph builder&lt;br&gt;
├── shared/&lt;br&gt;
│   └── schema.ts                        # Drizzle ORM schema (10 tables)&lt;br&gt;
├── smoke-tests.ts                       # Integration smoke-test suite&lt;br&gt;
├── BETAGRACE_REPORT.md                  # Full technical &amp;amp; operational report&lt;br&gt;
├── CAPABILITY_LIST.md                   # Feature reference&lt;br&gt;
├── compatibility-list.md                # Browser, Node, DB, email compatibility&lt;br&gt;
├── CHANGELOG.md                         # Version history&lt;br&gt;
├── CONTRIBUTING.md                      # Setup guide for contributors&lt;br&gt;
└── .env.example                         # All environment variables documented&lt;br&gt;
API Overview&lt;br&gt;
Session&lt;br&gt;
MethodEndpointDescription&lt;br&gt;
POST/api/sessionCreate or retrieve session&lt;br&gt;
POST/api/session/verify-ageSet 18+ verification flag&lt;br&gt;
GET/api/session/statusGet current session state&lt;br&gt;
Chat&lt;br&gt;
MethodEndpointDescription&lt;br&gt;
POST/api/chatSend message — all 8 modes supported&lt;br&gt;
GET/api/chat/streamSSE streaming chat&lt;br&gt;
Academic Artifact Builder&lt;br&gt;
MethodEndpointDescription&lt;br&gt;
POST/api/academic/artifact/buildStart 70×7 job → {jobId} in &amp;lt;1s&lt;br&gt;
GET/api/academic/artifact/status/:jobIdPoll build progress&lt;br&gt;
Image &amp;amp; Video&lt;br&gt;
MethodEndpointDescription&lt;br&gt;
POST/api/generate-imageGenerate image&lt;br&gt;
POST/api/videoQueue video generation job&lt;br&gt;
GET/api/video-status/:jobIdPoll video job status&lt;br&gt;
GET/api/video/:filenameStream completed MP4&lt;br&gt;
Privacy (GDPR)&lt;br&gt;
MethodEndpointDescription&lt;br&gt;
GET/api/privacy/export-dataExport full session JSON (Art. 20)&lt;br&gt;
GET/api/privacy/export-data/zipDownload ZIP archive (Art. 20)&lt;br&gt;
POST/api/privacy/delete-dataHard-delete session + all data instantly&lt;br&gt;
POST/api/privacy/deletion-requestSubmit formal Art. 17 erasure request&lt;br&gt;
GET/api/privacy/deletion-requestGet current session's request status&lt;br&gt;
Admin (requires X-Admin-Token header)&lt;br&gt;
MethodEndpointDescription&lt;br&gt;
GET/api/health/learningLearning system metrics&lt;br&gt;
GET/api/admin/deletion-requestsList all Art. 17 requests&lt;br&gt;
PATCH/api/admin/deletion-requests/:idUpdate request status&lt;br&gt;
GET/api/admin/consent-auditSession consent lookup&lt;br&gt;
Synthesis / Local Memory Debug&lt;br&gt;
MethodEndpointDescription&lt;br&gt;
GET/api/synthesis/statsLive BM25/local synthesis engine stats&lt;br&gt;
POST/api/synthesis/test-retrievalRead-only debug: inspect top retrieved memory records + scores for a query&lt;br&gt;
POST/api/synthesis/distillForce a distillation pass (prune + reindex)&lt;br&gt;
Example retrieval debug request:&lt;/p&gt;
&lt;p&gt;curl -X POST &lt;a rel=&quot;nofollow&quot; href=&quot;http://localhost:5000/api/synthesis/test-retrieval&quot;&gt;http://localhost:5000/api/synthesis/test-retrieval&lt;/a&gt; \&lt;br&gt;
  -H &quot;Content-Type: application/json&quot; \&lt;br&gt;
  -d '{&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;userMessage&quot;: &quot;how does the admin panel memory system work?&quot;,
&quot;systemPrompt&quot;: &quot;You are BetaGrace vI in STANDARD mode.&quot;,
&quot;mode&quot;: &quot;standard&quot;,
&quot;k&quot;: 5
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  }'&lt;br&gt;
This endpoint is read-only. It does not generate chat output, mutate sessions, or change stored memories. It only shows which local memory records the synthesis engine would retrieve and how they scored.&lt;/p&gt;
&lt;p&gt;Health&lt;br&gt;
MethodEndpointDescription&lt;br&gt;
GET/api/healthServer + DB health check&lt;br&gt;
GET/api/privacy-policyFull privacy policy text&lt;br&gt;
GET/api/terms-of-serviceFull terms of service text&lt;br&gt;
Full API reference: see BETAGRACE_REPORT.md&lt;/p&gt;
&lt;p&gt;Security&lt;br&gt;
8-layer middleware stack (CORS, body limit 50kb, security headers, HTTPS enforce, cache-control, concurrency limiter 1,000 req, 120s timeout, rate limiter 100 req/60s)&lt;br&gt;
4-layer guardrail system (perimeter defense, age check, jailbreak detection, content filtering)&lt;br&gt;
ADMIN_TOKEN ships blank — forks cannot use a preset default&lt;br&gt;
DEV_PASSWORD ships blank — /api/dev/push-to-code disabled in production&lt;br&gt;
Zero hardcoded credentials anywhere in source&lt;br&gt;
Contributing&lt;br&gt;
See CONTRIBUTING.md for the full setup guide and PR process.&lt;/p&gt;
&lt;p&gt;License&lt;br&gt;
BetaGrace vI is free software released under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). Copyright (C) 2026 Jesse J. Wheeler Jr.&lt;/p&gt;
&lt;p&gt;You may use, modify, and distribute this software under the terms of the AGPL-3.0. Any derivative work or hosted service built on BetaGrace must also be released under the same license. See the LICENSE file for the full text.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/25418/betagracevi</guid>
<pubDate>Wed, 26 Aug 2026 08:33:27 +0000</pubDate>
</item>
</channel>
</rss>