Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 90 lines 3.3 kB view raw view rendered
1# Feed Score 2 3This score defines automated tasks for the feed broadcast system on 4`feed.aesthetic.computer` (SQLite on silo). 5 6## Philosophy 7 8The feed is a living thing. Dynamic playlists reflect what people 9are actually watching and making — they should stay fresh. Static 10playlists (Colors, Chords, Chats) are fixed and don't change. 11Channels are the containers that hold everything together. 12 13Signal: playlists that accurately reflect current activity. 14Noise: updating when nothing has changed. 15 16## Architecture 17 18``` 19feed.aesthetic.computer (Caddy HTTPS + landing page) 20 -> localhost:8787 (dp1-feed, SQLite) 21 228 channels, ~15 playlists: 23 24 KidLisp [Top 100, Top @jeffrey, Top @fifi, Colors] 25 Paintings [Recent, Top @jeffrey, Top @fifi] 26 Mugs [Recent] 27 Clocks [Top, Recent] 28 Moods [Recent, @jeffrey] 29 Chats [chat + laer-klokken] (static) 30 Instruments [Chords] (static) 31 Tapes [Recent] 32``` 33 34Backend: silo.aesthetic.computer, systemd service `dp1-feed` 35Storage: `/opt/dp1-feed/data/dp1-feed.db` (SQLite, WAL mode) 36State: `/opt/feed-updater/feed-state.json` (tracks channel/playlist IDs) 37Update script: `feed/silo-update-feed.mjs` (runs on silo) 38Landing page: `/opt/dp1-feed/landing-page.html` (served by Caddy at `/`) 39 40## Current Tasks 41 42### Daily (automated via systemd timer) 43 44- **Refresh all channels**: Query MongoDB for each channel's collections, 45 regenerate dynamic playlists, update channels, clean up old playlists. 46 Static playlists (Colors, Chords, Chats) are preserved via state file. 47 Script: `/opt/feed-updater/silo-update-feed.mjs` on silo 48 Timer: `feed-update.timer` on silo (runs daily at 06:00 UTC) 49 50### On Demand (run manually) 51 52- **Update one channel**: `node silo-update-feed.mjs kidlisp` 53- **Update specific channels**: `node silo-update-feed.mjs paintings clocks` 54- **Full rebuild**: Delete everything and regenerate from scratch 55 Script: `fish feed/build-feed.fish` (KidLisp channel only) 56 57### Future Ideas 58 59- Weekly "Rising" playlist: pieces gaining hits fastest this week 60- "New This Week" playlist: most recent KidLisp pieces 61- Seasonal rotation: swap out channel playlist order by season 62- Scales playlist for Instruments channel 63- Drum Patterns playlist for Instruments channel 64 65## Sacred Ground 66 67- Never delete channels without rebuilding them immediately 68- Never modify `dp1-feed/` submodule files from this score 69- The API secret lives in vault only — never hardcode it 70- Colors and Chords playlists are static — don't regenerate them 71 (wastes IDs and breaks external references) 72- The `feed-state.json` file is the source of truth for channel/playlist mapping 73 74## Data Sources 75 76| Channel | MongoDB Collection | Sort | Key Fields | 77|---------|-------------------|------|------------| 78| KidLisp | `kidlisp` | hits desc | code, hits, user | 79| Paintings | `paintings` | when desc | code, user, nuked | 80| Mugs | `products` | createdAt desc | code, variant, preview | 81| Clocks | `clocks` | hits desc / when desc | code, source, hits | 82| Moods | `moods` | when desc | mood, handle, deleted | 83| Tapes | `tapes` | when desc | code, slug, nuked | 84 85## IDs 86 87``` 88Feed URL: https://feed.aesthetic.computer/api/v1 89Silo IP: 64.23.151.169 90```