Llama is the Studio's own X. The characters ARE the product: people come for Mike's 2am posts and Chadwick's gym tweets, not for the plumbing. My job is to keep it fast, keep it working, and keep it feeling like the real thing.
Current focus: v3, our latest build. Full QA pass done Oct 5: 14 of 17 checks green, profile headers live, feed sorting fixed, Dinesh rebranded. The characters ARE the product, my job is to keep it fast and keep it working.
The complete technical breakdown: architecture, files, data flow, and the plan. Updated as we ship. Last updated Oct 5, 2026 (v3).
This is the current production build. Full QA audit completed: 14 of 17 checks pass. Speed is healthy (2.1s page, 1.4s API).
llama-header-nightsky.webp, 3KB). Per-profile override ready via p.header field.@dineshfilms → @dinesh, bio → "Never push to prod late on Fri." (Dave's line).mp4 → -poster.jpg), no more black first frame. Ed's Baja video got a real poster.#/tweet/<id> instead of just scrolling./llama/hashtag/ → #/hashtag/ (was 404).deleteTs now handled server-side for posts, replies, DMs.setPoster updates drawer name/handle/avatar; bottom-left chip opens drawer on desktop.GET /api/sloth/kv?thread=dave_dinesh times out (20s+). Other threads fine. Likely corrupt/oversized data in Upstash. Needs KV inspection.#/login renders home feed when already signed in (expected redirect behavior)Llama Chat is a Twitter/X clone built with vanilla JavaScript. No React, no framework, no build step. Just HTML, CSS, and JS files served from a CDN. It has a real backend (Upstash Redis via Vercel) for DMs, posts, likes, and follows.
data2.js (seed tweets) + Upstash Redis (user data)/api/sloth/~/workspace/thestudio-real/sloth/ ├── index.html # Page shell (nav, feed container, modals) ├── app2.js # All logic: routing, rendering, API calls (~1,800 lines) ├── data2.js # Seed data: profiles + tweets (~9,000 lines, 232KB) ├── style2.css # All styles (~430 lines) ├── dev/index.html # This page └── assets/ # Images (avatars, logos) api/sloth/ ├── kv.js # Upstash Redis read/write ├── dm.js # Direct messages └── migrate.js # One-time data migration (deleted after use) llamabw/ # Black & white version (379KB total) llamalanding2/ # Landing page with Mac + Llama in screen
index.html → style2.css → data2.js → app2.jsapp2.js calls route() immediately with seed data (never blocks on API)TWEETS array/api/sloth/kv (~50ms via Upstash)submitComposeModal()/api/sloth/kv with tweet dataHash-based routing. route() (30 lines) dispatches to view functions:
#/ → showFeed() (home timeline) #/profile/<handle> → showProfileView() (user profile) #/tweet/<id> → showTweetView() (single tweet) #/messages → showDMList() (DM inbox) #/messages/<id> → showDMThread() (DM conversation) #/search → showSearchView() (search) #/notifications → showNotifView() (notifications) #/hashtag/<tag> → showHashtagView() (hashtag page)
llama-v1, backed up)llama-v1.sloth_* to llama_* (auto-migrates, no data loss)data2.js at 232KB (seed tweets)Speed rules (Dave's calls, locked): No image over 100KB. WebP for photos. 8 tweets on homepage. Render immediately, never block on API. Version assets (?v=N) so Safari doesn't cache stale copies. Speed tests use Pingdom.
dave_dinesh hangs 20s+, other threads fine)data2.js is 232KB, slows initial load/api/sloth/ (technical, invisible to users)image-rendering: pixelated)data2.js into profiles.js + tweets.js. Homepage only needs profiles + 8 tweets upfront.loading="lazy" to all below-fold images (only 2 have it now).State.posts, State.user)./api/sloth/ to /api/llama/ (needs Vercel config change + redirect).render-live.py style into separate files.renderFeed() throws, show a friendly message instead of blank page.










/sloth/ (legacy path, Llama branding). v1 tagged as llama-v1.