KindJoe post cards
Image tiles on /posts that link out to stories and other URLs. They are separate from CMS articles and from community social posts.
Database: `posts`
| Column | Purpose |
|---|---|
| id | Serial primary key |
| image_url | Cloudinary (or other) tile image |
| destination_url | Outbound link — usually https://www.kindjoe.com/{slug} |
| caption | Optional label |
| is_pinned | Pinned tiles sort first |
| order | Manual sort within the feed |
| is_active | Soft hide without deleting |
| created_at | Created timestamp |
There is no foreign key to articles. The link to a story is only the destination_url string. Ventura and JoeKnowsLA use parallel tables: ventura_posts, joeknowsla_posts.
Articles editor integration
- Save or publish an article in the admin CMS.
- After the first successful create, a modal prompts you to upload a tile image.
- The app builds
destination_urlfrom the article slug (Ventura category/tag →/ventura/{slug}, else/{slug}). - It POSTs to
/api/admin/posts(or Ventura equivalent). - On an existing article, use Open Post Modal in the editor toolbar.
Public feed
- Server page
/postsloads at most 50 active cards in one query (indexed feed sort). StandalonePostsFeedpaginates in the browser (12 per “load more”) — no extra database round-trips.- Clicks open
destination_urlin a new tab.
Cost controls
- Composite index
posts_feed_idxon active feed columns. - Legacy DB analytics tables (`clicks`, `visitor_journey_events`, `article_pageviews`) were removed; traffic uses Vercel Web Analytics instead.
- Run
npm run db:auditperiodically on Neon to watch table growth (embeddings and RSS tables are the largest cost drivers, not post cards).