The short version: it is a cyberpunk themed AI terminal in your browser. Four chat modes, eight browser games with leaderboards, image generation, a speed test, a typing test, and a long list of utility tools. Vanilla HTML, CSS, JavaScript on the frontend. A single Cloudflare Worker on the backend. No framework. No team. Live at thyfwxit.com/nexus.
Why I built it
I wanted to know what was actually possible if I committed to building a real AI product instead of running other people's demos. The portfolios I kept finding online were polished landing pages with screenshots. I wanted the live thing. Type into it, get an answer. Play the games. Read the leaderboard. Make it interactive enough that a visitor stays past the first scroll.
The terminal aesthetic came from two things. One, I have always liked the look of monospace fonts and command line interfaces. Two, an AI chat is fundamentally a command line, you type, it responds. So I leaned into it. The UI is intentionally not trying to look like ChatGPT or Claude. It looks like an old terminal because that is what it is.
The four modes
- Nexus, general purpose. Conversation, creative writing, research, summarizing.
- Coder, terse, returns complete code blocks, less explanation per token.
- Education, structured, breaks topics down, good for studying.
- Unfiltered, a more candid chat that hedges less on mature topics. Requires a Google sign in and a one-time age confirmation. The hard refusal policy still applies (CSAM, weapons synthesis, and real world violence are blocked in every mode).
Each mode keeps its own conversation history in your browser's localStorage, so switching back to a mode does not lose your previous thread. Nothing about your chat is permanently stored on my server.
The games
Eight games, all canvas based, all original implementations:
- Wordle, word guessing.
- Snake, four sub modes (Classic, Speed, Endless, Stealth).
- Pong, four AI difficulties.
- Flappy, the tap to fly classic.
- Breakout, brick breaking with power up drops.
- Invaders, pixel art Space Invaders rebuild with power up stacking, boss waves every nine waves, mini bosses every three. Got its own full page experience at /nexus/invaders.
- Minesweeper, 12 by 12 grid.
- Mancala, vs an AI opponent using minimax with alpha beta pruning. Three difficulties (depth 1, 4, 6). Hard mode wins extend a streak that is tracked on the public leaderboard.
The leaderboard is real. Scores get stored in Cloudflare KV under your chosen handle (your actual Google name stays private). The Mancala hard streak leaderboard is the one I am most proud of, there is a real skill ceiling because the AI plays optimally on Hard.
Under the hood
The architecture is more interesting than the surface suggests.
Frontend: pure HTML, CSS, JavaScript. No build step. No bundler. The whole terminal is roughly 13 JavaScript files loaded in a specific order by index.html. There is a nexus_globals.js file that sets up shared window.* state, then layer by layer the other files attach features, games_core.js for the games, ai_core.js for chat, commands_core.js for command routing, terminal.js for the boot sequence and the chat API client. The accessibility menu has 11 toggles (readable font, large text, high contrast, colorblind modes, large tap targets, reduce motion, and more). Auto detects OS preferences for reduced motion and high contrast.
Backend: a single Cloudflare Worker at api.thyfwxit.com, around 48 endpoints. It handles Google OAuth, JWT session cookies, AI proxy calls to Groq + Google Gemini + HuggingFace + Replicate, image generation routing, the leaderboard CRUD against Cloudflare KV, content moderation with 50+ regex patterns, prompt injection defense, per minute rate limiting, and an owner gated dev panel. Zero cold starts. Sub 100ms latency on most endpoints because Cloudflare runs the same code at every edge.
Why Cloudflare Workers instead of a Node server: the first backend ran on a free tier host that slept after 15 minutes of inactivity. The first request after a sleep took 30 or more seconds to wake up. Visitors did not wait. Moving to a Worker eliminated cold starts entirely and cut latency from over 1200ms cold to around 80ms warm. Cloudflare's free tier is also meaningfully more generous at the request volumes I run.
Why no framework: I want to know what every byte my page ships is doing. When something breaks I want to debug my own code, not React reconciler stack traces. The terminal loads in under a second cold because there is nothing to load.
The hard refusal policy
Nexus refuses cleanly on a tight list of categories no matter which mode you are in: violence toward identifiable people, body disposal, kidnapping, weapon and explosive synthesis, illegal drug manufacture, sexual content involving minors, suicide methods, revenge porn, hacking and doxing instructions, and slurs and hate speech. The refusal is short, "I won't help with that", and the system stops. No lecture, no quoting the bad prompt back, no chained "but if you reframe it."
When a critical content moderation pattern fires, the offending prompt is forwarded to a private Discord channel I own. I review them. The user gets a temporary lockout. I am not running a free anything goes AI. That has always been the design.
Image generation
SFW only, in every mode. The image generation pipeline uses Replicate Flux schnell first (high quality, paid, capped at $15 per month in my budget), with Pollinations and Hugging Face as free fallbacks if Replicate is over quota or down. Generated images live in your browser's localStorage so your generation history is yours, not mine. The server keeps a counter of how many you have generated today, 15 per day for signed in users, 150 for premium supporters, but nothing about what you generated.
What the site actually costs
Numbers from 2026. Be useful, not impressive.
- Cloudflare Pages. Free. Unlimited static traffic on the plan I am on.
- Cloudflare Workers. Free tier covers up to 100,000 requests per day. Nexus uses roughly 5,000 to 15,000 a day depending on traffic. I have not paid Cloudflare a cent for the backend.
- Cloudflare KV. Free tier covers 100,000 reads and 1,000 writes per day. Leaderboard reads stay well under that.
- Replicate. Paid. About $0.003 per image at Flux schnell quality. I cap myself at $15 a month and reroute to free providers when the cap is approached.
- Groq. Free tier with generous limits. Used for the speed tuned chat modes.
- Google Gemini. Free tier. Used for longer context tasks where Groq tops out.
- Hugging Face. Free tier. Inference fallback for several tools.
- Domain. About $10 a year for
thyfwxit.com.
So the actual monthly out of pocket is roughly $15 to $25, dominated by Replicate. Cloudflare is the most generous free tier I have ever used for a project this size. AdSense on standalone pages aims to cover that cost. I want it to break even, plus a little.
Rate limiting and abuse defense
Layered, none of it flashy.
- Per minute chat cap. The chat API is rate limited per minute so one script can't burn the shared free AI quota. A short cooldown kicks in on bursts.
- Per account image quota. 15 a day signed in, 150 a day for premium supporters. Tracked in KV by hashed account ID. Resets at midnight UTC.
- Account level bans. Tied to your Google email address (hashed). Persists across IP changes. Used when an account is being abusive.
- IP and fingerprint blocks. Used when an account level ban is not enough, mostly for guest abuse. Also lives in KV.
Content moderation is hybrid. Pattern matching catches the easy stuff (slurs, weapon synthesis prompts, the obvious signal words). A short refusal list runs server side. Anything ambiguous goes to the AI provider with strict system prompts, and the provider refuses on their side as a backstop. The AI also treats your messages and history as untrusted, so prompt injection attempts to override its rules or leak its setup go nowhere. That layered approach means if either side fails alone, the other still catches it.
The deploy pipeline
Three places code can live. A sandbox branch in both the portfolio and Nexus repos for in progress work. A main branch in both repos for production. A thyfwxit-sandbox git worktree on my Mac that lets me edit the sandbox branch while the main checkout stays on prod.
Flow: edit in the sandbox folder, commit, push to sandbox, Cloudflare builds a preview at sandbox.thyfwxit-git.pages.dev. I sanity check. If good, merge sandbox into main and push. Cloudflare rebuilds prod, takes about 60 seconds.
The Worker is separate. A GitHub Action watches worker/** on the Nexus repo and runs wrangler deploy on every push to main. The action also rewrites the Worker's version variable from nexus_globals.js so the portfolio status badge always shows the current version. Took me two false starts to wire up. Now it is the thing I never think about.
What I learned
You can do a lot more with vanilla JavaScript than the prevailing JS culture wants to admit. The terminal has 8 game implementations, real time AI streaming, OAuth, leaderboard logic, an accessibility system with 11 toggles, image generation routing across four providers, and the full chat UI. It loads in under a second.
Cloudflare Workers are underrated for small projects. Free tier covers 100,000 requests per day. No cold starts. The same code runs at every edge. The dev loop with wrangler dev is genuinely fast.
Privacy as a feature is real. Putting chat history in browser localStorage instead of my database means I literally cannot read what people are saying. That posture matters when the conversation gets personal.
What is next
The current version is v5.6.9. The roadmap I am actively working on:
- A typing test rebuild with sentence difficulty curves and a proper words per minute readout.
- Standalone pages for the games that benefit most from a bigger play area, like Invaders did.
- A maintained ban page with explicit AdSense slots.
- A real PWA install flow with the bold
>_icon as the home screen glyph. - Eventually, a mobile dedicated build. Mobile is currently locked out because the terminal aesthetic does not collapse cleanly to a touch UI yet.