learn

Feed and posts

Publishing, feed, likes, and comments.

Posts carry text, an optional image URL, a code snippet with language, a type, tags, and a collaboration flag. The recent tab pages by cursor; the top tab aggregates like counts over the last week. Code snippets render with syntax highlighting in the post card. Likes and comments both notify the post author.

What it owns

  • Post creation with optional image, code snippet, tags
  • Cursor-paged feed with recent and top tabs
  • Likes with author notifications
  • Comments with author-or-post-owner deletes

Files

File list and purposes from the folder README.

FilePurpose
frontend/src/pages/FeedPage.jsxFeed screen with tabs and filters.
frontend/src/components/posts/CreatePostModal.jsxCompose and publish modal.
frontend/src/components/posts/PostCard.jsxPost display with code highlighting.
frontend/src/services/postService.jsFeed, posts, likes, and comment calls.
backend/routes/postRoutes.jsFeed, create, like, comment, upload routes.
backend/controllers/postController.jsFeed queries, create, like, comments.
backend/models/Post.jsPost rows with embedded likes and comments.
Feed and posts slice
BrowserAPIRealtimeCacheDatabaseShareddurableephemeral

Talks to

Sources: frontend/src/pages/FeedPage.jsx, backend/controllers/postController.js, backend/models/Post.js (documented at commit cdef8af)

On this page