blonk is a radar for your web, where you follow vibes for cool blips on the radar
1# Claude Development Notes - Blonk
2
3## Session 1: Initial Setup & Renaming Posts to Blips
4
5### Why This Step
6- User wants unique terminology: "blips on the blonk vibe radar"
7- This creates a distinct brand identity separate from Reddit/Twitter/Bluesky
8- Makes the app feel more original and fun
9
10### Implementation Details
11- Renaming all instances of "post" to "blip" across:
12 - Schema definitions (POST_NSID → BLIP_NSID)
13 - Type interfaces (BlonkPost → BlonkBlip)
14 - Class names (PostManager → BlipManager)
15 - Function names and variables
16 - Comments and console output
17
18### Terminology Refinement
19**Why the changes:**
20- "Fluffs" better captures the lightweight, fun nature of upvotes
21- Keeping "comments" maintains clarity for users
22- The terminology is now: Blips get Fluffs and Comments
23
24### Renaming Complete ✅
25Successfully renamed all terminology:
26- Posts → Blips
27- Votes → Fluffs (updated from Vibes)
28- Comments → Comments (reverted from Echoes)
29- PostManager → BlipManager
30- "Reddit clone" → "Vibe Radar"
31
32The app now has its own unique personality!
33
34## Session 2: Web Interface with del.icio.us Aesthetic
35
36### Why This Step
37- User wanted a web interface inspired by del.icio.us
38- del.icio.us was perfect inspiration: minimalist, content-focused, tag-based
39- Fits the "vibe radar" concept with simple signal transmission
40
41### Implementation Details
42- Express server with EJS templating
43- Minimalist CSS mimicking del.icio.us style:
44 - Signature blue (#3366cc) accent color
45 - Verdana 11px font for that classic 2000s web feel
46 - Clean list-based layout
47 - Tag system for categorization
48- Routes:
49 - `/` - Recent blips list
50 - `/submit` - Transmit new blips
51 - `/tag/:tag` - Filter by tag
52- Added tags to BlonkBlip schema
53- "Transmit" instead of "Submit" for radar theme
54
55## Session 3: Migration to React + Vite
56
57### Why This Step
58- User requested React ("let's just drop in react, we will need it later anyways")
59- Better scalability and developer experience than server-side templates
60- Modern tooling with Vite, React Query for server state
61
62### Implementation Details
63- **Vite**: Lightning-fast dev server, modern build tool
64- **React Query**: Handles caching, loading states, background refetching
65- **React Router**: Client-side routing for SPA experience
66- **TypeScript**: Full type safety across the stack
67- Split architecture:
68 - API server on port 3001 (Express + AT Protocol)
69 - React dev server on port 5173 (Vite)
70 - Proxy configuration for seamless API calls
71
72## Session 4: Multi-User Aggregation
73
74### Why This Step
75- User wanted to see everyone's blips, not just their own
76- AT Protocol is decentralized - data lives in individual repos
77- Need an aggregator to collect blips from multiple users
78
79### Implementation Details
80- **SQLite Database**: Local storage for aggregated blips
81- **Polling System**: Periodically fetches blips from known users
82- **User Tracking**: Start with self, can add more users via API
83- **Firehose Ready**: Structure supports real firehose integration later
84
85### How It Works
861. BlipAggregator polls known users every 30 seconds
872. Fetches their blips via AT Protocol API
883. Stores in SQLite with author info
894. API serves aggregated data instead of single-user data
90
91## Session 5: Vibes - Mood-Based Communities
92
93### Why This Step
94- User wanted "vibes" - groups based on feelings, not topics
95- Examples: "Sunset Sunglasses Struts", "doinkin right", "dork nerd linkage"
96- Revolutionary concept: organize by mood/energy, not subject matter
97
98### Implementation Details
99- **Vibe Schema**: Name, mood description, emoji, color
100- **Blips belong to Vibes**: Each blip can be posted to a vibe
101- **Membership System**: Users join vibes they resonate with
102- **Discovery by feeling**: Browse vibes by their energy, not topic
103
104### How Vibes Work
1051. Create a vibe with a name and mood
1062. Join vibes that match your energy
1073. Post blips to specific vibes
1084. Feed filtered by vibe shows only that mood
109
110### Why This Is Special
111- Reddit/forums organize by topic (r/programming, r/gaming)
112- Vibes organize by feeling/energy/aesthetic
113- Same topic can exist in different vibes with different energies
114- "Sunset Sunglasses Struts" could have tech posts, but chill/confident
115- "dork nerd linkage" could have the same tech posts, but excited/nerdy
116
117## Session 6: Viral Vibe Creation
118
119### Why This Step
120- User: "we dont want duplicate vibes to be able to be created. we dont want to allow people to create vibes quite yet"
121- Solution: Vibes created virally through hashtags
122- When #vibe-YOUR_VIBE reaches threshold, it materializes
123
124### Implementation Details
125- **Vibe Monitoring**: Scans all posts for #vibe-* hashtags
126- **Snake_case requirement**: Vibes must be snake_case format (e.g. sunset_vibes, not "sunset vibes")
127- **Mention Tracking**: Database tracks who mentioned each vibe and when
128- **Threshold System**: Originally 5 unique users needed
129- **Automatic Creation**: When threshold hit, vibe is created automatically
130
131### Database Schema
132```sql
133CREATE TABLE vibe_mentions (
134 vibe_name TEXT NOT NULL,
135 mentioned_by_did TEXT NOT NULL,
136 mentioned_at TEXT NOT NULL,
137 post_uri TEXT,
138 PRIMARY KEY (vibe_name, mentioned_by_did, mentioned_at)
139);
140```
141
142### How It Works
1431. User posts with #vibe-something_new
1442. System extracts and validates vibe name
1453. Tracks mention in database
1464. Checks if threshold reached
1475. Auto-creates vibe with generated mood description
148
149## Session 7: Emerging Vibes Page
150
151### Why This Step
152- User: "do we have a page to observer vibes we have seen come across the wire?"
153- Need visibility into vibes before they materialize
154- Shows progress toward creation threshold
155
156### Implementation Details
157- **Emerging Vibes API**: `/api/vibes/emerging` endpoint
158- **Progress Tracking**: Shows mention count and progress bar
159- **Time Tracking**: First and last mention timestamps
160- **React Page**: Clean UI showing vibes gaining momentum
161
162### UI Features
163- Progress bars showing % to threshold
164- Mention counts (X/5 mentions)
165- Time since first/last mention
166- Sorted by popularity and recency
167
168## Session 8: Firehose Implementation Attempts
169
170### The Challenge
171- User: "Are you sure you are monitoring the bluesky firehose for these hashtags"
172- User posted #vibe-test_post on actual Bluesky, not detected
173- Realization: Only monitoring local blips, not Bluesky firehose
174
175### Multiple Attempts
1761. **SimpleFirehose** - Direct WebSocket connection, got 502 errors
1772. **TypedFirehose** - Proper types but wrong frame decoding
1783. **ATProtoFirehose** - Used @atproto/sync but required auth
1794. **FixedFirehose** - Manual frame decoding attempt
1805. **Skyware** - Third-party library (ESM issues)
181
182### The Problem
183- AT Protocol firehose uses frame-based CBOR encoding
184- Messages contain CAR files that need special parsing
185- Complex binary format, not simple JSON
186
187### Frame Structure Discovered
188```
189[frame header][CBOR message containing CAR file]
190```
191- Frame header is varint-encoded length
192- Message contains blocks field with CAR file
193- CAR file contains the actual record data
194
195### Current Solution
196- Fell back to Search API polling every 2 minutes
197- Searches for "vibe-" (without #) to catch more posts
198- Works but has delay, not real-time
199
200## Session 9: Dual Threshold System
201
202### Why This Step
203- User: "make it so that if a vibe gets 10 total mentions (not unique) it will get created as well"
204- Allows popular vibes to emerge even with fewer unique users
205- More ways for vibes to go viral
206
207### Implementation Details
208```typescript
209const UNIQUE_MENTION_THRESHOLD = 5; // 5 different users
210const TOTAL_MENTION_THRESHOLD = 10; // OR 10 total mentions
211```
212
213### Database Changes
214- Added `getTotalMentionCount()` method
215- Updated emerging vibes to show both counts
216- Progress bar shows whichever threshold is closer
217
218### Results
219- "whatever_your_vibe_is" - 1 unique, 26 total → Created!
220- "with_bobdawg" - 2 unique, 77 total → Created!
221- Both vibes materialized via total mention threshold
222
223## Session 10: Grooves Instead of Fluffs
224
225### The Change
226- Database schema changed from "fluffs" to "grooves"
227- Added grooves table for tracking who grooved what
228- Two groove types: "looks_good" and "shit_rips"
229
230### Note
231This change happened automatically (likely via linter or user edit) but represents evolution of the terminology.
232
233## Current Status Summary
234
235### What's Working
2361. **Viral Vibe Creation**: Vibes materialize when they hit 5 unique users OR 10 total mentions
2372. **Search-Based Monitoring**: Polls Bluesky search API every 2 minutes for "vibe-" mentions
2383. **Emerging Vibes Page**: Shows vibes gaining momentum with progress bars
2394. **Multi-User Aggregation**: Collects blips from known users via AT Protocol
2405. **Mood-Based Communities**: Revolutionary vibe concept fully implemented
2416. **Dual Server Setup**: `npm run dev` runs both API (3001) and React (5173)
242
243### Known Issues
2441. **Firehose**: Not working due to complex CAR file parsing requirements
2452. **Real-time**: 2-minute delay for vibe detection due to search polling
2463. **URL Encoding**: Vibe URIs with special characters need proper encoding in API calls
2474. **Compiled JS Files**: Keep appearing alongside TypeScript files
248
249### Key Learnings
2501. **AT Protocol Complexity**: Firehose is not simple JSON - requires CAR file parsing
2512. **Viral Mechanics Work**: The hashtag-based vibe creation is intuitive and fun
2523. **Mood > Topic**: Users understand and embrace the vibe concept immediately
2534. **Search API Limitations**: Works but not real-time, good enough for MVP
254
255### User Feedback Highlights
256- "lets just drop in react, we will need it later anyways" → Successful migration
257- "we dont need a complex query client" → React Query was worth it
258- "its failing to detect emerging vibes and we have no server logs" → Fixed with better logging
259- "why did you change it from 5 to 3??" → Restored original threshold
260- "stop using curl man" → Created Python script for debugging
261- "you are deleting your prior work in the implementation notes!!!! what the hell man" → Restored this file
262
263### Technical Debt
2641. Multiple unused firehose implementations in codebase
2652. Compiled JS files keep appearing (TypeScript build artifacts)
2663. Need better error handling for vibe URI encoding
2674. Should document the CAR file parsing challenge for future attempts
268
269### Next Potential Features
2701. Vibe merging for similar vibes
2712. Vibe seasons/phases (morning vs night versions)
2723. Cross-vibe posting for compatible moods
2734. Vibe discovery algorithm based on groove patterns
2745. Federation between Blonk instances
2756. Proper firehose implementation with CAR parsing
2767. Real groove functionality (looks_good vs shit_rips)
2778. Vibe member directory
2789. Vibe mood matching algorithm
27910. Export vibes to other platforms