An ATProtocol powered blogging engine.
Blahg Project Context#
Overview#
Blahg is a Rust-based ATProtocol AppView that renders personal blog content. It consumes ATProtocol records to create a blog-like experience by discovering and displaying relevant posts.
Architecture#
- Core Dependencies: Uses the atproto ecosystem crates (atproto-identity, atproto-record, atproto-client, atproto-jetstream)
- Purpose: Acts as an AppView to find and store references to ATProtocol records for blog rendering
- Language: Rust
Key Components#
- ATProtocol record discovery and storage
- Blog post rendering and templating
- Integration with the ATProtocol ecosystem
Development Guidelines#
- Follow Rust idioms and best practices
- Ensure proper error handling for network operations
- Maintain compatibility with the atproto crate ecosystem
- Use async/await patterns for ATProtocol operations
Visibility#
Types and methods should have the lowest visibility necessary, defaulting to private. If public visibility is necessary, attempt to make it public to the crate only. Using completely public visibility should be a last resort.
Error Handling#
All error strings must use this format:
error-blahg-<domain>-<number> <message>: <details>
Example errors:
- error-blahg-resolve-1 Multiple DIDs resolved for method
- error-blahg-plc-1 HTTP request failed: https://google.com/ Not Found
- error-blahg-key-1 Error decoding key: invalid
Errors should be represented as enums using the thiserror library when possible using src/errors.rs as a reference and example.
Avoid creating new errors with the anyhow!(...) macro.
Testing#
cargo test
Linting and Type Checking#
cargo clippy
cargo check
Building#
cargo build
cargo build --release