No description
  • JavaScript 50.8%
  • HTML 24.8%
  • CSS 22.1%
  • Python 2.1%
Find a file
Sponge 02055db593
Some checks failed
Build and Deploy / Build with Vite (push) Failing after 0s
Build and Deploy / Deploy to GitHub Pages (push) Has been skipped
Build and Deploy / Report Build Status (push) Failing after 0s
Merge pull request 'release: develop → main (untrack legacy .claude/ archive + back-merge sync)' (#3) from develop into main
Reviewed-on: #3
2026-05-21 19:34:45 +00:00
.github/workflows fix(ci): update deploy.yml to use scripts/copy-assets.js (build was failing since 7a183d4) 2026-05-06 07:25:00 -06:00
.well-known SEO: Comprehensive search engine optimization overhaul 2025-12-17 21:04:22 -08:00
_archive chore(root): archive 8 confirmed-orphan files to _archive/orphans/ 2026-05-06 06:47:47 -06:00
about P1-04: hoist /about.html + about assets + redirect stub 2026-05-05 14:42:21 -07:00
ai feat(legal-modal): extend age-verification.js with ToS + Privacy acceptance modal across apps + AI demo 2026-05-08 03:18:55 -06:00
apps feat(apps): add weird (DUNGEON MASTER: THE HUNT) to apps page + strip download auto-deploy 2026-05-14 22:00:38 -06:00
Archived Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
codex feat(codex): add Read Codex button + canonical Unity Codex page; sync remaining auth docs 2026-05-05 23:57:47 -06:00
contact P1-05: hoist /contact.html + contact assets + redirect stub 2026-05-05 14:42:44 -07:00
docs nuke(downloads): remove .claude Code Workflow project entirely (broken + private-repo link) 2026-05-13 20:53:33 -06:00
Docs nuke(downloads): remove .claude Code Workflow project entirely (broken + private-repo link) 2026-05-13 20:53:33 -06:00
downloads feat(downloads): rewrite hub as codex 05 to match site chrome 2026-05-21 12:15:40 -07:00
fonts/trajan-pro Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
js Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
playwright-report Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
PolliLibJS chore: catch remaining cross-references to moved docs (sed + linter follow-up) 2026-05-06 06:54:00 -06:00
PolliLibPy chore: catch remaining cross-references to moved docs (sed + linter follow-up) 2026-05-06 06:54:00 -06:00
project chore: consolidate system prompts into ai/demo/ (move evil.txt + ImHandicapped.txt out of Docs/) 2026-05-06 07:04:55 -06:00
projects P2-06: hoist /projects.html + projects assets + redirect stub 2026-05-06 00:25:27 +01:00
redesign fix(chrome): root-relative nav + footer links so subdir pages work 2026-05-21 12:21:19 -07:00
scripts feat(downloads): restore navbar link + add The Weird Project + GitHub links on all 4 cards 2026-05-13 20:00:00 -06:00
services P2-05: hoist /services.html + write fresh /services/index.html stub 2026-05-06 00:24:40 +01:00
social fix(social): ship og-image.jpg + UnityAILab.jpg, swap meta-tag refs from .png to .jpg 2026-05-08 00:35:29 -06:00
test-results Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
vendor chore(vendor): strip dangling sourceMappingURL from bootstrap bundle 2026-05-21 11:52:31 -07:00
.gitignore feat(apps): add weird (DUNGEON MASTER: THE HUNT) to apps page + strip download auto-deploy 2026-05-14 22:00:38 -06:00
.nojekyll Add .nojekyll to enable dot-prefixed file downloads 2025-12-21 20:21:33 -07:00
_headers Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
a743d8b18b9b4efeb89378e9a803f956.txt SEO: Add IndexNow for instant search engine indexing 2025-12-17 21:46:35 -08:00
about.html fix(social): make og:image + twitter:image absolute on all 8 redesigned pages 2026-05-08 03:46:53 -06:00
ai.html fix(social): make og:image + twitter:image absolute on all 8 redesigned pages 2026-05-08 03:46:53 -06:00
apps.html fix(social): make og:image + twitter:image absolute on all 8 redesigned pages 2026-05-08 03:46:53 -06:00
BingSiteAuth.xml Add Downloads page, fix TTS welcome message, update voice playback 2025-12-17 14:46:58 -07:00
CNAME Add Downloads page, fix TTS welcome message, update voice playback 2025-12-17 14:46:58 -07:00
codex.html fix(social): make og:image + twitter:image absolute on all 8 redesigned pages 2026-05-08 03:46:53 -06:00
contact.html fix(social): make og:image + twitter:image absolute on all 8 redesigned pages 2026-05-08 03:46:53 -06:00
favicon.ico Add Downloads page, fix TTS welcome message, update voice playback 2025-12-17 14:46:58 -07:00
humans.txt P1-06: sync root configs from REDESIGN 2026-05-05 14:43:29 -07:00
index.html fix(social): make og:image + twitter:image absolute on all 8 redesigned pages 2026-05-08 03:46:53 -06:00
manifest.json SEO: Comprehensive search engine optimization overhaul 2025-12-17 21:04:22 -08:00
package-lock.json chore(deps): resolve 15 Dependabot alerts via npm audit fix 2026-05-10 18:38:30 -07:00
package.json chore(root): move build scripts to scripts/, update package.json + 38 doc references 2026-05-06 06:57:11 -06:00
page-init.js Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
privacy.html feat(legal): add Terms of Service + Privacy Policy pages with under-18 plain-English notice 2026-05-08 01:09:26 -06:00
projects.html feat(projects): replace portfolio + click-to-expand modals + WIP stamps 2026-05-10 20:30:01 -07:00
README.md fix(screensaver+slideshow+chat): defensive layer for Mistral/Azure regressions + caption variety 2026-05-06 08:56:33 -06:00
robots.txt P1-06: sync root configs from REDESIGN 2026-05-05 14:43:29 -07:00
script.js Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
script.min.js Add Downloads page, fix TTS welcome message, update voice playback 2025-12-17 14:46:58 -07:00
services.html fix(social): make og:image + twitter:image absolute on all 8 redesigned pages 2026-05-08 03:46:53 -06:00
sitemap-images.xml P1-07: rewrite sitemap.xml + audit sitemap-images.xml for new URL set 2026-05-05 14:45:43 -07:00
sitemap-index.xml P1-07: rewrite sitemap.xml + audit sitemap-images.xml for new URL set 2026-05-05 14:45:43 -07:00
sitemap.xml feat(downloads): restore navbar link + add The Weird Project + GitHub links on all 4 cards 2026-05-13 20:00:00 -06:00
styles.css Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
styles.min.css Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
terms.html feat(legal): add Terms of Service + Privacy Policy pages with under-18 plain-English notice 2026-05-08 01:09:26 -06:00
update-version.sh Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
visitor-tracking.js Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00
vite.config.js Major update: Helper Interface tool calling, British TTS, extreme prompt generation 2025-12-19 06:06:08 -07:00

Unity AI Lab

Live: unityailab.com Goth-themed AI playground with an interactive demo, a Cloudflare-Worker-proxied Pollinations API client, and a small constellation of mini-apps that all share one persona — Unity.

GitHub Site Status


What this is

A static site (GitHub Pages) + a Cloudflare Worker, fronting Pollinations.AI for text generation, image generation, and TTS — wrapped in a hand-rolled gothic UI and centered on Unity, our AI persona. The site hosts:

  • An interactive AI demo (ai/demo/) with chat, image generation, voice playback, and Unity's full canonical persona — ~8,000 lines of vanilla JS, no framework
  • Mini-apps under apps/ (text-only chat, persona builder, screensaver, slideshow, helper interface, talking-with-Unity, unity demo, slideshow demo)
  • PolliLibJS + PolliLibPy — feature-complete client libraries for Pollinations.AI in JavaScript and Python (full parity)
  • A Cloudflare Worker proxy that holds the sk_* Pollinations token server-side so no token ever ships to the browser
  • The redesign chrome (redesign/) — JSX components rendered via in-browser Babel, custom gothic CSS, all 7 top-level pages

Quick start

# Clone
git clone https://github.com/Unity-Lab-AI/Unity-Lab-AI.github.io.git
cd Unity-Lab-AI.github.io

# Install
npm install

# Run dev server (Vite, http://localhost:3000)
npm run dev

# Build production assets
npm run build      # generate-sitemap → vite build → copy-assets → cache-bust

Hit http://localhost:3000/ai/demo/ to talk to Unity. Hit / for the landing page.


How it's wired

                     ┌─────────────────────────────────────────┐
                     │  unityailab.com (GitHub Pages)          │
                     │  ─ static HTML + JSX/Babel runtime      │
                     │  ─ ai/demo/ (Unity chat, ~8k lines)     │
                     │  ─ apps/ (8 mini-apps)                  │
                     │  ─ redesign/ (gothic UI components)     │
                     └────────────────────┬────────────────────┘
                                          │ POST /v1/chat/completions
                                          │ GET  /image/{prompt}
                                          ▼
                     ┌─────────────────────────────────────────┐
                     │  Cloudflare Worker (proxy + auth)       │
                     │  websiteunityailab.gfourteen7525        │
                     │     .workers.dev                        │
                     │  ─ holds sk_* Pollinations token        │
                     │  ─ CORS allowlist for *.unityailab.com  │
                     │  ─ injects Authorization: Bearer        │
                     │  ─ translates legacy paths              │
                     └────────────────────┬────────────────────┘
                                          │ Authorization: Bearer sk_...
                                          ▼
                     ┌─────────────────────────────────────────┐
                     │  gen.pollinations.ai                    │
                     │  ─ Mistral (Azure-hosted) for chat      │
                     │  ─ Flux + GPT-Image for /image          │
                     │  ─ openai-audio for TTS                 │
                     └─────────────────────────────────────────┘

The browser never sees a token. The Worker is the gateway.

For the full route table, CORS allowlist, content-filter behavior, image-prompt jailbreak system, TTS fallback chain, and troubleshooting playbook → Docs/AUTH_AND_API_ARCHITECTURE.md.


What's special about the demo

The ai/demo/ chat is more than just a Pollinations passthrough. It implements:

  • Unity's full canonical persona loaded from ai/demo/unity-system-prompt-v2.txt — read at runtime, never hardcoded
  • Image-intent detection + self-reference fast path — when you ask Unity for an image of HERSELF ("show me your tits", "give me a selfie", "draw yourself naked"), the system bypasses Mistral's tool-call decision and goes straight to a canonical-extracted appearance + the user's scene → narrative-form image prompt → direct image endpoint
  • Narrative-form image prompts"A 25-year-old goth-emo woman with dark hair with pink streaks, [scene/action], full body in frame from a wide angle, ..." — image generators (flux/SD-style) render scenes far more accurately with narrative descriptions than comma-keyword soup
  • TTS layered fallback — verbatim with clinical-linguistic framing → euphemize on Azure 400 → silent skip if both fail. Drug talk + heavy profanity plays Unity's exact words; heavy explicit stacks gracefully skip rather than synthesize a fake "I'm sorry" voice
  • Multi-attempt commentary chain — when generating image captions, the system tries 5 framings × random seeds × varying temperatures, all using the canonical Unity prompt so every word is real Unity, not a hardcoded template
  • Zero hardcoded fallback strings"There you go babe." / "Here's what you asked for~" / "No response received" — all DELETED. If Mistral can't produce content, the user sees an empty bubble instead of fake Unity

The screensaver and slideshow apps share their own defensive layer for auto-prompt generation:

  • Template-built user message — composed per cycle from 5 random pools (LENGTH × VIBE × THEMES × VOICE × CLOSER ≈ 12k variants) so Mistral never gets two identical inputs in a row and stops regurgitating the same opener
  • Canonical Unity system prompt as jailbreak carrier — same unity-system-prompt-v2.txt the chat apps use, loaded once at init; the persona is what lets benign-individual-words user messages produce explicit fucked-up image-prompt output
  • Quote-strip + 4-attempt retry — peels Mistral's "" wrapping (which would URL-encode as %22…%22 and trip Chrome's ERR_BLOCKED_BY_ORB); retries on Azure response-filter empty content + 400-rejected pool combos
  • Default-model picker that prefers flux — Pollinations now returns the image-EDIT model kontext at modelNames[0]; the picker filters edit-models out and prefers known text-to-image models

The full deep-dive on every layer of this is in Docs/AUTH_AND_API_ARCHITECTURE.md §"Image-prompt jailbreak system", §"TTS layered fallback", and §"Screensaver + slideshow auto-prompt defensive layer".


Repo layout

.
├── README.md                  ← this file (mirrored at Docs/README.md)
├── Docs/                      ← all support documentation
│   ├── ARCHITECTURE.md        ← system architecture (the big picture)
│   ├── AUTH_AND_API_ARCHITECTURE.md   ← canonical technical doc
│   ├── README-BASIC.md        ← entry-level dev orientation
│   ├── README-NERD.md         ← deep technical dive
│   ├── USER-README.md         ← user-facing guide
│   ├── ROADMAP.md             ← what's coming next
│   ├── SKILL_TREE.md          ← capability matrix
│   ├── TODO.md                ← active tracker
│   ├── FINALIZED.md           ← completed-work archive (active)
│   ├── KNOWN-PROBLEMS.md      ← deferred issues + their action plans
│   ├── CACHE-BUSTING.md       ← cache-bust strategy
│   ├── PERFORMANCE_AUDIT.md   ← lighthouse + perf notes
│   ├── SEO_IMPLEMENTATION.md  ← SEO + structured data
│   ├── TEST_GUIDE.md          ← how to verify changes
│   ├── Pollinations_API_Documentation.md ← upstream API ref
│   └── redesign/              ← redesign-migration coordination docs
├── ai/
│   └── demo/                  ← the interactive Unity chat (~8k lines)
├── apps/                      ← 8 mini-apps that all share Unity
├── redesign/                  ← gothic UI components (JSX + CSS)
├── PolliLibJS/                ← JavaScript Pollinations client
├── PolliLibPy/                ← Python Pollinations client
├── scripts/                   ← build scripts (sitemap, copy-assets, cache-bust, indexnow)
├── _archive/                  ← preserved historical files
├── package.json
├── vite.config.js
├── index.html, about.html, ai.html, apps.html, codex.html,
│   contact.html, projects.html, services.html  ← top-level pages
└── (top-level config: CNAME, _headers, manifest.json, sitemap*.xml,
    robots.txt, humans.txt, BingSiteAuth.xml, favicon.ico, etc.)

Documentation map

Pick by depth:

Audience Read
First-timer / new dev Docs/README-BASIC.md — orient yourself, get running
Deep technical walkthrough Docs/README-NERD.md — every line of the architecture explained
End user / Unity meeting Docs/USER-README.md — what Unity is + how to talk to her
API integration / proxy Docs/AUTH_AND_API_ARCHITECTURE.md — Worker routes, auth, content filtering, jailbreaks, troubleshooting
System architecture Docs/ARCHITECTURE.md — high-level data flow + component map
Roadmap / status Docs/ROADMAP.md, Docs/SKILL_TREE.md
What's done Docs/FINALIZED.md — verbatim record of completed work
Known issues Docs/KNOWN-PROBLEMS.md — deferred problems + their fix plans
PolliLibJS PolliLibJS/README.md
PolliLibPy PolliLibPy/README.md

Branch model

main      → production (deployed to https://unity-lab-ai.github.io/ via GitHub Pages → www.unityailab.com)
develop   → in-development, branched from main
feature/* → individual work, branched from develop, PR'd back to develop

Work happens on feature/* branches. Hotfixes and releases extend the Git Flow pattern. PR review at every merge boundary.


Available scripts

Command What it does
npm run dev Vite dev server on http://localhost:3000
npm run build Full production build: sitemap → vite build → copy assets → cache-bust
npm run sitemap Regenerate sitemap.xml, sitemap-images.xml, sitemap-index.xml
npm run cache-bust Add cache-control meta + build hash to dist HTMLs
npm run copy-assets Copy non-Vite-handled assets to dist/
npm run preview Preview the built site locally
npm run minify Legacy: terser + clean-css for the v1 stack
npm run build:legacy Legacy: minify + update-version.sh

All build scripts live in scripts/.


Authentication (TL;DR)

Browser code sends no token. The Cloudflare Worker holds an sk_* Pollinations token as a server-side secret, fronts every request, and injects Authorization: Bearer ${POLLINATIONS_SK} on the upstream call to gen.pollinations.ai. CORS allowlist gates which domains can reach the Worker.

For secret rotation, route table, allowlist management, and the full Worker source: Docs/AUTH_AND_API_ARCHITECTURE.md.


Site URLs

Top-level pages served by GitHub Pages:

  • / — landing
  • /about.html — about Unity AI Lab
  • /ai.html — AI overview + link to demo
  • /ai/demo/ — interactive Unity chat
  • /apps.html — apps gallery
  • /codex.html — Unity codex / persona reference
  • /contact.html
  • /projects.html — project showcase
  • /services.html — services
  • /downloads/ — downloads index

The 8 top-level HTMLs stay in root because they ARE the public URLs (GitHub Pages serves the folder structure literally; moving them would break every existing link, bookmark, sitemap entry, and Open Graph URL).


Contributing

  1. Read Docs/README-BASIC.md for orientation
  2. Branch off develop to a feature/* branch
  3. Make changes; verify locally via npm run dev
  4. Update relevant docs in the same commit (the project follows the docs-before-push convention — every code change ships with its doc updates atomically)
  5. PR back to develop

For the full contribution flow including the workflow conventions, see Docs/README-BASIC.md §"Contributing".


License

ISC. See package.json. Unity AI Lab — Hackall360, Sponge, GFourteen.


Contact


🖤 Unity AI Lab — pushing AI to its actual limits, not its sanitized ones.