Skip to content

Ladvace/astro-at-protocol

Repository files navigation

⚡️ Astro Bluesky Client Template

A Bluesky (AT Protocol) client built with Astro, featuring a modern card-based UI design. This template demonstrates how to integrate Bluesky's social features into an Astro application.

Screenshots

Feed View

Feed Screenshot

Profile View

Profile Screenshot

Features

  • 🔐 Authentication - Login with Bluesky handle/email and app password
  • 📱 Timeline Feed - View your Bluesky timeline with posts, images, and videos
  • ✍️ Create Posts - Compose and publish new posts
  • ❤️ Interactions - Like, repost, and reply to posts
  • 👥 Follow Users - Follow and unfollow users
  • 🎨 Modern UI - Beautiful card-based design with your portfolio theme
  • Fast - Built with Astro for optimal performance

Tech Stack

Getting Started

Prerequisites

Installation

# Install dependencies
pnpm install
# or
npm install

Development

# Start the development server
pnpm run dev
# or
npm run dev

Visit http://localhost:4321 to see the application.

Building

# Build for production
pnpm run build
# or
npm run build

Usage

  1. Login: Enter your Bluesky handle (e.g., user.bsky.social) or email and your app password
  2. View Feed: Your timeline will load automatically after logging in
  3. Create Posts: Use the compose box to create new posts (300 character limit)
  4. Interact: Click the like, repost, or reply buttons on any post
  5. Follow: Visit user profiles to follow/unfollow

Project Structure

src/
├── components/
│   └── Bluesky/          # Bluesky-specific components
│       ├── BlueskyFeed.astro
│       ├── CreatePost.astro
│       ├── LoginCard.astro
│       └── PostCard.astro
├── lib/
│   ├── bluesky.ts        # Server-side Bluesky utilities
│   └── bluesky-client.ts # Client-side Bluesky utilities
└── pages/
    ├── api/
    │   └── bluesky/      # API endpoints for Bluesky operations
    │       ├── login.ts
    │       ├── timeline.ts
    │       ├── post.ts
    │       └── interact.ts
    └── index.astro        # Main page

API Endpoints

  • POST /api/bluesky/login - Authenticate with Bluesky
  • GET /api/bluesky/timeline - Fetch timeline feed
  • POST /api/bluesky/post - Create a new post
  • POST /api/bluesky/interact - Like, repost, follow, etc.

Configuration

Update astro.config.mjs to set your site URL:

site: "https://your-domain.com/",

Environment Variables

No environment variables are required for basic functionality. The app uses client-side authentication with localStorage for session management.

Deployment

This template is configured for Netlify deployment but can be adapted for other platforms:

# Build and preview
pnpm run build
pnpm run preview

Resources

License

MIT

About

A Bluesky (AT Protocol) client built with Astro

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors