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`

ColumnPurpose
idSerial primary key
image_urlCloudinary (or other) tile image
destination_urlOutbound link — usually https://www.kindjoe.com/{slug}
captionOptional label
is_pinnedPinned tiles sort first
orderManual sort within the feed
is_activeSoft hide without deleting
created_atCreated 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

  1. Save or publish an article in the admin CMS.
  2. After the first successful create, a modal prompts you to upload a tile image.
  3. The app builds destination_url from the article slug (Ventura category/tag → /ventura/{slug}, else /{slug}).
  4. It POSTs to /api/admin/posts (or Ventura equivalent).
  5. On an existing article, use Open Post Modal in the editor toolbar.

Public feed

  • Server page /posts loads at most 50 active cards in one query (indexed feed sort).
  • StandalonePostsFeed paginates in the browser (12 per “load more”) — no extra database round-trips.
  • Clicks open destination_url in a new tab.

Cost controls

  • Composite index posts_feed_idx on 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:audit periodically on Neon to watch table growth (embeddings and RSS tables are the largest cost drivers, not post cards).