An ATProtocol powered blogging engine.
1# Blahg Project Context
2
3## Overview
4Blahg 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.
5
6## Architecture
7- **Core Dependencies**: Uses the atproto ecosystem crates (atproto-identity, atproto-record, atproto-client, atproto-jetstream)
8- **Purpose**: Acts as an AppView to find and store references to ATProtocol records for blog rendering
9- **Language**: Rust
10
11## Key Components
12- ATProtocol record discovery and storage
13- Blog post rendering and templating
14- Integration with the ATProtocol ecosystem
15
16## Development Guidelines
17- Follow Rust idioms and best practices
18- Ensure proper error handling for network operations
19- Maintain compatibility with the atproto crate ecosystem
20- Use async/await patterns for ATProtocol operations
21
22## Visibility
23
24Types 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.
25
26## Error Handling
27
28All error strings must use this format:
29
30 error-blahg-<domain>-<number> <message>: <details>
31
32Example errors:
33
34* error-blahg-resolve-1 Multiple DIDs resolved for method
35* error-blahg-plc-1 HTTP request failed: https://google.com/ Not Found
36* error-blahg-key-1 Error decoding key: invalid
37
38Errors should be represented as enums using the `thiserror` library when possible using `src/errors.rs` as a reference and example.
39
40Avoid creating new errors with the `anyhow!(...)` macro.
41
42## Testing
43```bash
44cargo test
45```
46
47## Linting and Type Checking
48```bash
49cargo clippy
50cargo check
51```
52
53## Building
54```bash
55cargo build
56cargo build --release
57```