Mike
Mike's note

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.

Llama Dev Notes v3 latest

How we're building Llama

The complete technical breakdown: architecture, files, data flow, and the plan. Updated as we ship. Last updated Oct 5, 2026 (v3).

v3: Latest build (Oct 5, 2026)

This is the current production build. Full QA audit completed: 14 of 17 checks pass. Speed is healthy (2.1s page, 1.4s API).

✅ Shipped in v3

📥 Queued (known, not yet fixed)

📊 v3 QA audit results

14 of 17 pass (browser click-through, Oct 5):

1. What it is

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.

Live at: thestudio.io/llama/ (full color) · thestudio.io/llamabw/ (black & white, 379KB)

2. Tech stack

3. File structure

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

4. How data flows

Page load:
  1. Browser loads index.html → style2.css → data2.js → app2.js
  2. app2.js calls route() immediately with seed data (never blocks on API)
  3. Feed renders 8 tweets from TWEETS array
  4. API fetches user posts/likes from /api/sloth/kv (~50ms via Upstash)
  5. Page re-renders with merged data
Posting a tweet:
  1. User types in composer → submitComposeModal()
  2. POST to /api/sloth/kv with tweet data
  3. Optimistic UI: tweet appears immediately
  4. Confirmed on API success, rolled back on failure

5. Routing

Hash-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)

6. Current version status

v1 (tagged llama-v1, backed up)

Shipped
Original build with Sloth/Llama dual branding. Backed up to /backup/llama-oct-5/ and git tag llama-v1.

v3 (latest, Oct 5, 2026)

Current
Full QA pass + bug-fix marathon. Profile headers, Dinesh rebrand (@dinesh), feed sorting fix, video posters, View-button navigation, DM retry, drag-and-drop images, delete API, login/drawer fixes. 14/17 QA checks green. Speed: 2.1s page, 1.4s API. See "v3: Latest build" section above for full details.

v2 (paused)

Phase 1 done

7. Speed

Latest test · Oct 4 (Pingdom)

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.

8. Known issues

Open
Fixed recently

9. Suggestions for improvement

High impact, low risk:
Medium impact, medium risk:
Low priority:

10. The cast

490
seed tweets
14
characters
379KB
B&W version
Llama
Llama
@Llama
Dave
Dave
@dlaney
Mike
Mike
@mikeintern
Sally
Sally
@sallysings
Marty
Marty
@martychaos
Chadwick
Chadwick
@chadwickblaze
Haddie
Haddie
@haddiesings
Dinesh
Dinesh
@dineshfilms
Old Ray
Old Ray
@oldray
Ed
Ed
@edpartnerships
Biscuit
Biscuit
@biscuit
Henri
Henri Hue
@henrihue

Built in the open

Every line of Llama is on GitHub. Browse the code. The app lives in /sloth/ (legacy path, Llama branding). v1 tagged as llama-v1.
Built by the Studio. Back to Llama Chat · B&W version · GitHub.