AT Protocol and Bluesky Social Things for Dart/Flutter
- 1. About atproto.dart πͺ
- 2. Package Ecosystem π¦
- 3. Quick Start Guide π
- 4. Project Development Setup π οΈ
- 5. Who is using atproto.dart? π
- 6. Support
Welcome to atproto.dart π¦
The comprehensive Dart/Flutter SDK for the AT Protocol ecosystem - empowering developers to build the next generation of decentralized social applications with Bluesky and beyond.
The AT Protocol represents a paradigm shift toward decentralized social networking, and Bluesky is leading this transformation. As the ecosystem grows rapidly with millions of users and thousands of developers building innovative applications, the need for robust, well-designed development tools has never been greater.
atproto.dart is the most comprehensive and battle-tested SDK for AT Protocol development in Dart and Flutter. Whether you're building mobile apps, web applications, bots, or backend services, our SDK provides everything you need to integrate with the AT Protocol ecosystem efficiently and reliably.
For Mobile & Web Developers:
- Build cross-platform social apps with Flutter using production-ready AT Protocol integration
- Access the complete Bluesky API including posts, feeds, profiles, messaging, and moderation
- Leverage built-in OAuth DPoP authentication for secure user sessions
For Backend & Bot Developers:
- Create powerful automation tools and bots with comprehensive API coverage
- Process real-time data streams using our optimized Firehose implementation
- Build custom AT Protocol services and bridges to other platforms
For AT Protocol Enthusiasts:
- Work with all core AT Protocol primitives: DIDs, NSIDs, AT URIs, Lexicons, and XRPC
- Contribute to the growing ecosystem of decentralized social applications
- Access cutting-edge features as the protocol evolves
Proven in Production: Used by popular applications like SkyFeed, deck.blue, SkyThrow, and many others serving thousands of users daily. Our SDK is actively maintained, thoroughly tested, and designed for the demands of production applications.
The atproto.dart ecosystem is organized into focused packages that work together seamlessly. Choose the packages that match your project's needs, from low-level AT Protocol primitives to high-level client libraries.
Foundation packages for AT Protocol primitives and data structures
Package | Description | pub.dev | Docs |
---|---|---|---|
at_identifier | AT Protocol identifier validation and parsing | README | |
nsid | NSID parsing and validation for method/schema identification | README | |
at_uri | AT URI parsing for resource identification | README | |
xrpc | XRPC HTTP client with built-in retry and error handling | README | |
multiformats | IPFS multiformats support for content addressing (CIDs, multihash, etc.) | README | |
lexicon | Lexicon schema parsing and validation | README | |
atproto_core | Shared utilities and base functionality for AT Protocol clients | README |
High-level API clients for AT Protocol services
Package | Description | pub.dev | Docs |
---|---|---|---|
atproto | Complete AT Protocol client (com.atproto.* endpoints) with Firehose support |
README / GUIDE | |
bluesky | Full-featured Bluesky client (app.bsky.* , chat.bsky.* + AT Protocol) |
README / GUIDE | |
atproto_oauth | OAuth DPoP authentication client for secure user sessions | README | |
did_plc | PLC Directory client for DID resolution and management | README |
Specialized packages for text processing
Package | Description | pub.dev | Docs |
---|---|---|---|
bluesky_text | Rich text parsing for mentions, links, hashtags, and formatting | README / GUIDE |
Tool | Install | Docs |
---|---|---|
bluesky_cli: command line tool for app.bsky.* endpoints |
dart pub global activate bluesky_cli |
README |
Workflow | Marketplace | Docs |
---|---|---|
bluesky-post: workflow for scheduled post to Bluesky from GitHub Actions | README |
Get up and running with AT Protocol and Bluesky in minutes. Choose your use case below:
Perfect for creating mobile apps, web clients, or social features.
dart pub add bluesky
import 'package:atproto/atproto.dart';
import 'package:bluesky/bluesky.dart';
void main() async {
// Create authenticated session
final session = await createSession(
identifier: 'your-handle.bsky.social',
password: 'your-password',
);
final bsky = Bluesky.fromSession(session.data);
// Post to Bluesky
await bsky.feed.post.create(text: 'Hello from atproto.dart!');
// Get your timeline
final timeline = await bsky.feed.getTimeline();
for (final post in timeline.data.feed) {
print('${post.post.author.displayName}: ${post.post.record}');
}
}
Next Steps:
- Complete Bluesky Guide - Authentication, posting, feeds, profiles
- Supported Bluesky APIs - All available endpoints
Ideal for bots, backend services, or custom AT Protocol implementations.
dart pub add atproto
import 'package:atproto/atproto.dart';
import 'package:atproto/firehose.dart';
import 'package:atproto/com_atproto_sync_subscriberepos.dart';
void main() async {
final session = await createSession(
service: 'https://bsky.social',
identifier: 'your-handle.bsky.social',
password: 'your-password',
);
// Connect to any AT Protocol service
final atproto = ATProto.fromSession(session.data);
// Create a record
await atproto.repo.createRecord(
repo: 'your-did',
collection: 'app.bsky.feed.post',
record: {
'text': 'Hello AT Protocol!',
'createdAt': DateTime.now().toIso8601String(),
},
);
final subscription = await atproto.sync.subscribeRepos();
// Listen to the Firehose for real-time updates
await for (final event in subscription.data.stream) {
final repos = const SyncSubscribeReposAdaptor().execute(event);
repos.whenOrNull(
commit: (data) {
print('New commit: ${data.repo}');
},
);
}
}
Next Steps:
- AT Protocol Guide - Repository operations, Firehose, authentication
- Firehose Processing - Real-time data stream handling
Contributing to atproto.dart or setting up the development environment? This project uses Melos for efficient monorepo management across all packages.
- Dart SDK: Version 3.8.0 or higher (Install Dart)
- Git: For cloning and version control
- IDE: VS Code, IntelliJ, or any Dart-compatible editor
# Clone the repository
git clone https://github.com/myConsciousness/atproto.dart.git
cd atproto.dart
# Install Melos globally
dart pub global activate melos
# Set up all packages (dependencies, code generation, etc.)
melos setup
The melos setup
command handles everything: installing dependencies, running code generation, and preparing the development environment across all packages.
Command | Description |
---|---|
melos setup |
Complete project setup - run this first! |
melos get |
Install dependencies for all packages |
melos analyze |
Run static analysis across all packages |
melos test |
Execute all tests in the project |
melos fmt |
Format code and organize imports |
melos build |
Run code generation for all packages |
melos gen |
Generate API clients from Lexicon schemas |
Setup Issues:
- "melos command not found": Ensure
~/.pub-cache/bin
is in your PATH, or rundart pub global activate melos
- Build failures: Try
melos clean
followed bymelos setup
to reset the environment - Version conflicts: Ensure you're using Dart 3.8.0+ with
dart --version
Development Issues:
- Import errors: Run
melos build
to regenerate code - Test failures: Check if you need to run
melos gen
to update generated API clients - Dependency issues: Use
melos get
to refresh all package dependencies
Need Help?
- π Contribution Guidelines - Detailed development workflow
- π Issue Tracker - Report bugs or request features
- π¬ Discussions - Ask questions and share ideas
- π Documentation - Complete guides and API references
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation:
- Fork the repository and create a feature branch
- Make your changes following our coding standards (
melos fmt
helps!) - Add tests for new functionality (
melos test
to verify) - Update documentation if needed
- Submit a pull request with a clear description
See our Contribution Guidelines for detailed information about the development process, coding standards, and how to submit changes.
The following projects/services are using atproto.dart packages:
- APOD BOT (bot) maintained by @shinyakato.dev
- SkyFeed (web) maintained by @redsolver.dev
- SkyBridge (proxy) maintained by @videah.net
- SkyClad (mobile) maintained by @igz0.bsky.social
- deck.blue (web) maintained by @deck.blue
- SkyThrow (mobile) maintained by @rukari.bsky.social, @hidea.bsky.social
You can see more at showcase, special thanks!