<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jesse James Wheeler Jr.</title>
    <description>The latest articles on DEV Community by Jesse James Wheeler Jr. (@thesweetlord).</description>
    <link>https://dev.to/thesweetlord</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3946965%2F1a0c2a1c-fbff-4de5-a93f-70e34ad663d8.jpeg</url>
      <title>DEV Community: Jesse James Wheeler Jr.</title>
      <link>https://dev.to/thesweetlord</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thesweetlord"/>
    <language>en</language>
    <item>
      <title>BetAGracevI</title>
      <dc:creator>Jesse James Wheeler Jr.</dc:creator>
      <pubDate>Sat, 23 May 2026 01:34:46 +0000</pubDate>
      <link>https://dev.to/thesweetlord/betagracevi-3i7o</link>
      <guid>https://dev.to/thesweetlord/betagracevi-3i7o</guid>
      <description>&lt;p&gt;BetaGrace vI&lt;/p&gt;

&lt;p&gt;GitHub TypeScript Node Tests&lt;/p&gt;

&lt;p&gt;BetaGrace AI is an independent, open-source software project. It is not affiliated, associated, authorized, endorsed by, or in any way officially connected with any commercial logistics or trading entities. 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. Github coderaph inspired by github.com/colbymchenry/codegraph&lt;br&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;/p&gt;

&lt;p&gt;ORIGIN STORY:&lt;br&gt;
Reached with no prior coding experience, no ControlNet, no custom datasets, and a free Pollinations endpoint.&lt;br&gt;
Configuration lost -&amp;gt; Realization of gold-standard text-to-image adherence -&amp;gt; Three weeks of chasing ghost code -&amp;gt; Rebuilt build nearest to Aug 2 state -&amp;gt; Returned stronger than the original peak. 4 months over a 9 month period of development.&lt;/p&gt;

&lt;p&gt;High-Density Constraint-Locking Evaluation&lt;/p&gt;

&lt;p&gt;20 / 27 canonical concepts passed (74.1%) 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. This document is subject to change and scrutiny. I am only one developer.&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;/p&gt;

&lt;p&gt;Benchmark package: IMAGE BENCHMARK README · master report · 27-prompt table · passing images · failed images · public image logs&lt;/p&gt;

&lt;p&gt;What is BetaGrace?&lt;/p&gt;

&lt;p&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;/p&gt;

&lt;p&gt;8 AI Modes&lt;/p&gt;

&lt;p&gt;Mode    Description&lt;br&gt;
Standard    Balanced writing and general-purpose assistant&lt;br&gt;
Flesh Architect Dark, intense, body-horror and gothic creative writing&lt;br&gt;
Sanctuary   Safe, gentle, protective tone for sensitive topics&lt;br&gt;
Advanced Reasoning  Deep structured thinking for complex questions&lt;br&gt;
Autonomous  Multi-step task execution without hand-holding&lt;br&gt;
Video Generator Cinematic storyboard → frame generation → FFmpeg MP4 assembly&lt;br&gt;
Code Graph  Paste code → live SVG force-directed dependency graph (JS/TS/Python)&lt;br&gt;
Academic Research   70×7 pipeline: Guard Loop → 7-section paper, written and downloaded independently&lt;br&gt;
Smart Toggles&lt;/p&gt;

&lt;p&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;/p&gt;

&lt;p&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;/p&gt;

&lt;p&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;/p&gt;

&lt;p&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;/p&gt;

&lt;p&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;/p&gt;

&lt;p&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;/p&gt;

&lt;p&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;/p&gt;

&lt;p&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;"Delete All My Data" 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;/p&gt;

&lt;p&gt;Access via Settings → Admin tab with your ADMIN_TOKEN:&lt;/p&gt;

&lt;p&gt;Panel   Function&lt;br&gt;
Learning Health Dashboard   Live DB counts for learning data, long-term memory, anti-cascade proof. Auto-refreshes every 30s&lt;br&gt;
GDPR Deletion Requests  All Art. 17 requests with session IDs, timestamps, user messages. One-click Mark Complete / Processing / Failed&lt;br&gt;
Session Consent Lookup  Look up any session's consent record and cookie preferences by session ID&lt;br&gt;
Tech Stack&lt;/p&gt;

&lt;p&gt;Layer   Technology&lt;br&gt;
Frontend    React 18 + Vite + TypeScript&lt;br&gt;
Styling Tailwind CSS + shadcn/ui (Radix UI)&lt;br&gt;
State   Zustand + TanStack Query&lt;br&gt;
Backend Express + TypeScript (tsx)&lt;br&gt;
Database    PostgreSQL 14+ via Drizzle ORM&lt;br&gt;
AI / Text   OpenRouter + Local Synthesis&lt;br&gt;
AI / Images Pollinations Flux API&lt;br&gt;
Video   FFmpeg (ffmpeg-static, no install required)&lt;br&gt;
Email   nodemailer (SMTP — optional, graceful skip when unconfigured)&lt;br&gt;
Auth    Session-based with fingerprint fallback&lt;br&gt;
Routing Wouter (client), Express (server)&lt;br&gt;
Quick Start&lt;/p&gt;

&lt;p&gt;Prerequisites&lt;/p&gt;

&lt;p&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;/li&gt;
&lt;/ol&gt;

&lt;p&gt;git clone &lt;a href="https://github.com/thesweetlord/BetAGracevI.git" rel="noopener noreferrer"&gt;https://github.com/thesweetlord/BetAGracevI.git&lt;/a&gt;&lt;br&gt;
cd betagrace&lt;br&gt;
npm install&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Configure environment&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;cp .env.example .env&lt;br&gt;
Edit .env — the three required values:&lt;/p&gt;

&lt;p&gt;DATABASE_URL=postgresql://user:password@localhost:5432/betagrace&lt;br&gt;
SESSION_SECRET=&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;a href="mailto:admin@yourdomain.com"&gt;admin@yourdomain.com&lt;/a&gt;&lt;br&gt;
SMTP_FROM=&lt;a href="mailto:noreply@yourdomain.com"&gt;noreply@yourdomain.com&lt;/a&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;/li&gt;
&lt;/ol&gt;

&lt;p&gt;npx drizzle-kit push&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start the server&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;npm run dev&lt;br&gt;
Open &lt;a href="http://localhost:5000" rel="noopener noreferrer"&gt;http://localhost:5000&lt;/a&gt; — you'll see the age verification screen, then the full platform.&lt;/p&gt;

&lt;p&gt;Running Tests&lt;/p&gt;

&lt;h1&gt;
  
  
  Fast mode (78 tests, ~23s) — skips long-polling artifact waits
&lt;/h1&gt;

&lt;p&gt;npm run test:fast&lt;/p&gt;

&lt;h1&gt;
  
  
  Full suite (includes artifact polling and may take several minutes)
&lt;/h1&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;/p&gt;

&lt;p&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;/p&gt;

&lt;p&gt;Session&lt;/p&gt;

&lt;p&gt;Method  Endpoint    Description&lt;br&gt;
POST    /api/session    Create or retrieve session&lt;br&gt;
POST    /api/session/verify-age Set 18+ verification flag&lt;br&gt;
GET /api/session/status Get current session state&lt;br&gt;
Chat&lt;/p&gt;

&lt;p&gt;Method  Endpoint    Description&lt;br&gt;
POST    /api/chat   Send message — all 8 modes supported&lt;br&gt;
GET /api/chat/stream    SSE streaming chat&lt;br&gt;
Academic Artifact Builder&lt;/p&gt;

&lt;p&gt;Method  Endpoint    Description&lt;br&gt;
POST    /api/academic/artifact/build    Start 70×7 job → {jobId} in &amp;lt;1s&lt;br&gt;
GET /api/academic/artifact/status/:jobId    Poll build progress&lt;br&gt;
Image &amp;amp; Video&lt;/p&gt;

&lt;p&gt;Method  Endpoint    Description&lt;br&gt;
POST    /api/generate-image Generate image&lt;br&gt;
POST    /api/video  Queue video generation job&lt;br&gt;
GET /api/video-status/:jobId    Poll video job status&lt;br&gt;
GET /api/video/:filename    Stream completed MP4&lt;br&gt;
Privacy (GDPR)&lt;/p&gt;

&lt;p&gt;Method  Endpoint    Description&lt;br&gt;
GET /api/privacy/export-data    Export full session JSON (Art. 20)&lt;br&gt;
GET /api/privacy/export-data/zip    Download ZIP archive (Art. 20)&lt;br&gt;
POST    /api/privacy/delete-data    Hard-delete session + all data instantly&lt;br&gt;
POST    /api/privacy/deletion-request   Submit formal Art. 17 erasure request&lt;br&gt;
GET /api/privacy/deletion-request   Get current session's request status&lt;br&gt;
Admin (requires X-Admin-Token header)&lt;/p&gt;

&lt;p&gt;Method  Endpoint    Description&lt;br&gt;
GET /api/health/learning    Learning system metrics&lt;br&gt;
GET /api/admin/deletion-requests    List all Art. 17 requests&lt;br&gt;
PATCH   /api/admin/deletion-requests/:id    Update request status&lt;br&gt;
GET /api/admin/consent-audit    Session consent lookup&lt;br&gt;
Synthesis / Local Memory Debug&lt;/p&gt;

&lt;p&gt;Method  Endpoint    Description&lt;br&gt;
GET /api/synthesis/stats    Live BM25/local synthesis engine stats&lt;br&gt;
POST    /api/synthesis/test-retrieval   Read-only debug: inspect top retrieved memory records + scores for a query&lt;br&gt;
POST    /api/synthesis/distill  Force a distillation pass (prune + reindex)&lt;br&gt;
Example retrieval debug request:&lt;/p&gt;

&lt;p&gt;curl -X POST &lt;a href="http://localhost:5000/api/synthesis/test-retrieval" rel="noopener noreferrer"&gt;http://localhost:5000/api/synthesis/test-retrieval&lt;/a&gt; \&lt;br&gt;
  -H "Content-Type: application/json" \&lt;br&gt;
  -d '{&lt;br&gt;
    "userMessage": "how does the admin panel memory system work?",&lt;br&gt;
    "systemPrompt": "You are BetaGrace vI in STANDARD mode.",&lt;br&gt;
    "mode": "standard",&lt;br&gt;
    "k": 5&lt;br&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;/p&gt;

&lt;p&gt;Method  Endpoint    Description&lt;br&gt;
GET /api/health Server + DB health check&lt;br&gt;
GET /api/privacy-policy Full privacy policy text&lt;br&gt;
GET /api/terms-of-service   Full terms of service text&lt;br&gt;
Full API reference: see BETAGRACE_REPORT.md&lt;/p&gt;

&lt;p&gt;Security&lt;/p&gt;

&lt;p&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;/p&gt;

&lt;p&gt;See CONTRIBUTING.md for the full setup guide and PR process.&lt;/p&gt;

&lt;p&gt;License&lt;/p&gt;

&lt;p&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;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/thesweetlord"&gt;@thesweetlord&lt;/a&gt;&lt;br&gt;
thesweetlordJesse James Wheeler Jr.&lt;br&gt;
Languages&lt;/p&gt;

&lt;p&gt;TypeScript&lt;br&gt;
86.4%&lt;br&gt;
Python&lt;br&gt;
11.2%&lt;br&gt;
JavaScript&lt;br&gt;
1.3%&lt;br&gt;
CSS&lt;br&gt;
0.6%&lt;br&gt;
Makefile&lt;br&gt;
0.2%&lt;br&gt;
HTML&lt;br&gt;
0.2%&lt;br&gt;
Other&lt;br&gt;
0.1%&lt;/p&gt;

</description>
      <category>multistack</category>
      <category>cohesivecode</category>
      <category>text2image</category>
      <category>possiblebenchmark</category>
    </item>
  </channel>
</rss>
