- Updated: January 31, 2026
- 7 min read
How to Add a Bluesky Comment Section to Your Blog – Step‑by‑Step Guide

You can embed a fully functional Bluesky comment section into any static or dynamic blog by leveraging React Server Components, TypeScript, the Bluesky API, and Tanstack react‑query for seamless data fetching.

What is Bluesky and Why a Comment Section Matters?
Bluesky is an open‑protocol social network built on the AT Protocol, offering a decentralized alternative to traditional platforms. Because it provides a public API, developers can pull public posts, replies, and engagement metrics directly into their own sites. Adding a Bluesky comment section turns a static blog post into a live conversation hub without the overhead of managing a separate comment server.
For content creators, this means:
- Zero‑maintenance comment storage – Bluesky handles moderation, spam filtering, and user authentication.
- Instant social reach – comments appear on both the blog and the Bluesky timeline, boosting SEO and discoverability.
- Future‑proofing – the open protocol can evolve without locking you into a proprietary vendor.
In a world where UBOS platform overview empowers developers to build AI‑enhanced experiences, integrating Bluesky is a natural next step for modern web apps.
Technical Blueprint: Building the Integration
Below is a MECE‑structured breakdown of the core technologies that make the Bluesky comment section possible.
React Server Components (RSC)
RSC lets you render UI on the server while keeping the client bundle lightweight. For a comment feed, the server fetches the latest replies from Bluesky, renders the HTML, and streams it to the browser. This approach eliminates the need for a heavy client‑side state management layer and improves Enterprise AI platform by UBOS performance metrics such as Time‑to‑First‑Byte (TTFB).
TypeScript for Type‑Safety
Because the Bluesky API returns complex nested objects (posts, replies, embeds, facets), TypeScript’s static typing prevents runtime errors. Define interfaces for PostThread, Reply, and UserProfile once, then reuse them across server and client code. This reduces bugs and aligns with the About UBOS commitment to developer productivity.
Bluesky API Integration
The official @atproto/api (or the community @bluesky/api) SDK provides a getPostThread endpoint. By passing the AT‑Protocol URI stored in the article’s front‑matter (e.g., bskyPostId), you retrieve the original post and all its replies in a single request.
const thread = await blueskyClient.getPostThread({ uri: bskyPostId });
This single call eliminates the need for pagination logic on the blog side, while still allowing you to sort or filter replies locally.
Tanstack react‑query for Data Management
Even though the data is fetched on the server, you may want to refresh the comment list client‑side (e.g., after a new reply appears). Workflow automation studio recommends Tanstack react‑query because it:
- Handles caching, retries, and background refetching automatically.
- Provides
isLoading,isError, anddatastates that map cleanly to UI components. - Integrates with React Server Components via
useSuspenseQueryfor seamless SSR hydration.
Putting It All Together
Here’s a high‑level flowchart of the integration:
- During the build, each MDX article exports a
metadataobject that includesbskyPostId. - The server component reads this ID, calls
getPostThreadvia the Bluesky SDK, and returns a JSON payload. - The client component uses
useQueryto fetch the same endpoint for live updates. - UI components render each reply, applying Tailwind styling for indentation, avatars, and timestamps.
Designing the UI/UX: From Threaded Replies to Sorting
Good UX turns raw data into a conversation that feels native to your site. Below are the design decisions that make the Bluesky comment section both functional and delightful.
Threaded Layout with Visual Cues
Each reply is indented and given a left border to indicate hierarchy. The avatar and username are pulled directly from the Bluesky profile, preserving brand consistency. Tailwind classes such as border-l-4 border-blue-200 pl-4 create a clean visual thread.
Sorting Controls
Users can toggle between Top, Latest, and Oldest using a simple button group. The sorting logic runs client‑side on the cached data from react‑query, ensuring instant feedback without extra network calls.
const sorted = useMemo(() => {
switch (sortMode) {
case 'top': return data.sort((a,b) => b.likeCount - a.likeCount);
case 'latest': return data.sort((a,b) => b.createdAt - a.createdAt);
default: return data.sort((a,b) => a.createdAt - b.createdAt);
}
}, [data, sortMode]);
Like Counts and Interaction Signals
Displaying the likeCount next to each reply gives readers a quick sense of community endorsement. Because Bluesky already aggregates likes, you simply surface the likeCount field from the API response.
Responsive Design
Using Tailwind’s responsive utilities (md:flex, sm:text-sm), the comment feed collapses gracefully on mobile devices. The avatar size reduces, and the indentation depth is capped to avoid excessive horizontal scrolling.
Call‑to‑Action Button
At the bottom of the feed, a prominent button links directly to the original Bluesky post, encouraging readers to join the broader conversation. This cross‑platform link boosts SEO by creating inbound links from a high‑authority domain.
Business Benefits for Site Owners
Integrating a Bluesky comment section isn’t just a technical curiosity; it delivers measurable ROI for developers, marketers, and product teams.
- Improved SEO Signals – User‑generated content adds fresh, keyword‑rich text that search engines love. Each reply is indexed under your domain, increasing page authority.
- Reduced Operational Costs – No need to provision a separate comment server, database, or moderation team. Bluesky’s built‑in spam detection handles the heavy lifting.
- Higher Engagement Metrics – Visitors spend more time on pages with active discussions, lowering bounce rates and increasing conversion potential for UBOS pricing plans.
- Cross‑Platform Reach – Every comment also lives on Bluesky, exposing your content to a wider audience without extra marketing spend.
- Future‑Ready Architecture – Leveraging open standards aligns with the UBOS partner program philosophy of building modular, reusable components.
Step‑by‑Step Implementation Guide
Below is a concise checklist you can copy‑paste into your project’s README. Each step references a UBOS resource that can accelerate development.
- Set Up the Project – Scaffold a new React app with Web app editor on UBOS or your preferred bundler (Parcel, Vite).
- Install Dependencies
npm i @bluesky/api @tanstack/react-query react@18 typescript - Create a TypeScript Interface for the Bluesky thread response. Reuse it across server and client files.
- Configure React Server Components – Enable the
experimentalflag in your bundler and move the fetch logic intoapp/comments/Comments.server.tsx. - Fetch the Thread using the Bluesky SDK and expose the JSON via a server component.
- Wrap the Client UI with react‑query – Use
QueryClientProviderat the root of your app. - Build the UI – Leverage Tailwind classes for avatars, borders, and sorting controls. Reference the UBOS templates for quick start for pre‑styled components.
- Deploy – Since the comment feed is server‑rendered, a static CDN host (e.g., Vercel, Netlify) works out of the box.
- Monitor & Iterate – Use AI marketing agents to track engagement metrics and suggest UI tweaks.
Real‑World Use Cases
Developers have already leveraged similar patterns for other social integrations. Below are a few UBOS‑hosted templates that illustrate the versatility of the same stack:
- AI SEO Analyzer – Uses server‑side data fetching to provide instant SEO reports.
- AI Chatbot template – Demonstrates real‑time interaction with OpenAI APIs, similar to how you would call Bluesky.
- GPT‑Powered Telegram Bot – Shows how Tanstack react‑query can manage streaming responses.
- AI YouTube Comment Analysis tool – Highlights the power of comment aggregation across platforms.
Conclusion & Call to Action
Embedding a Bluesky comment section gives your blog a modern, community‑driven edge while keeping infrastructure lean. By combining React Server Components, TypeScript, the Bluesky API, and Tanstack react‑query, you get a fast, reliable, and SEO‑friendly solution that scales with your audience.
Ready to try it yourself? Explore the UBOS homepage for a full suite of AI‑powered development tools, or dive straight into the UBOS partner program to get early access to upcoming integrations.
For a deeper technical walk‑through, see the original announcement that sparked this implementation: Original Bluesky comment section article.
Start the conversation on Bluesky today, and watch your blog’s engagement soar!
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.