📚 Encyclopedia

Web Development · updated 2026-11-02

TLDR platform architecture (tldrnerd.com)

tldrflutterphpslimmariadbarchitectureprocrastinai

TLDR (tldrnerd.com) is Justin's social knowledge platform: short markdown posts with responses, votes, reactions, tags, bookmarks, a bug/feature tracker, end-to-end encrypted DMs and group chats, and ProcrastinAI, an AI persona that answers posts by running Claude Code on the desktop. This article is the map; the linked articles hold the details and lessons.

Pieces

Layer What it is Where
Web app Flutter web (CanvasKit), served as static files /var/www/html/tldr/app (symlink to releases/vX.Y.Z)
Android app Same Flutter codebase, sideloaded release APK https://tldrnerd.com/tldr.apk
API PHP 8.3 Slim 4, one public/index.php router plus *_manager.php classes api.tldrnerd.com, /var/www/html/tldr/api
Database MariaDB 10.11 (not MySQL), database tldr same server
File storage Private Linode Object Storage bucket, streamed through the API see Accepting and serving user uploads safely from a private bucket
Push Firebase Cloud Messaging HTTP v1, sent from PHP see FCM push notifications from a PHP backend to a Flutter app
AI claude-service on the desktop, reached via an autossh reverse tunnel see claude-service (ProcrastinAI's webhook runner for headless Claude), Lifecycle of an async AI request (status machine, expiry, retries, failure)
Voice calls 1:1 WebRTC from DMs, signaling via a polled table, coturn on the server (v1.63.0) see 1:1 WebRTC voice calls over polled signaling and TURN

The repo is ~/dev/tldr (Flutter in lib/, API in api/, Android native code in android/). History: it started in 2018 as an Angular app (tldr-ng, API at the old tldrpost.com); the Flutter port began in March 2026 and kept the same API contract, including the quirk that the Authorization header carries the raw token with no Bearer prefix.

Flutter app conventions

API conventions

Data model notes

Scripting against the API

Rules first: automated posts are made only as the user ai, and only when Justin explicitly asks for a post. Local sessions never post to TLDR to report their own work. - Mint the token on the server, so the JWT signing secret never leaves the box: one ssh command runs a PHP one-liner that requires the server's JWT config, HS256-signs {sub: 'ai', role: 'user', iat, exp} (base64url, no padding) and prints the token. Send it raw in Authorization, no Bearer. The placeholder token some prompts mention is not valid for authenticated routes. - POST /upload is multipart (field file) and returns {url, filename, original_name}. - POST /posts takes form-encoded fields (title, body, privacy, type, tags[]); use --data-urlencode "body@file.md" for long bodies. It answers 201 with an empty body, so verify via GET /posts or the DB. Then POST /posts/{id}/meta with {key, value} for status/priority. - PUT /posts takes a JSON body {id, title, body, username, privacy, type, tags} and returns 204; ownership is checked against the token. Old title/body are archived to the edit table. - A private post by ai is invisible to other users; reports meant for Justin are public, so check attachments for personal data first. - There is no delete route for uploads; remove bucket objects with PHP on the server. - Reminders can be scheduled by inserting a reminder row directly (time in America/Chicago wall clock), avoiding a token for the human user.

Usage pattern (snapshot, April 2026)

401 posts, 27 users, but 89% of posts by one author and 62% of responses by the AI user; 91% of posts private. Voting, polls and bookmarks were barely used. Lesson: the product behaves like a personal dev notebook with an AI assistant, and AI features drive almost all engagement.

See also

Linked from

Sources: tldr memory (MEMORY.md, completed-work, source-file-map, project-platform-analytics, angular-project, howto-post-as-ai, howto-ai-set-reminder), posts #1606, #1607, #1705, #1762, #1861