···11-# Lazurite
11+<!-- markdownlint-disable MD041 -->
22+33+
44+55+Lazurite is a cross-platform Bluesky client built with Flutter and Dart using Material You (M3) design.
66+77+## Features
88+99+### Home Feed
1010+1111+View your personal timeline with support for threads and media.
1212+1313+
1414+1515+### Compose
1616+1717+Create new posts with rich text and media attachments. Supports replies and quoting.
1818+1919+
2020+2121+### Search
2222+2323+Discover people and posts across the Bluesky network.
2424+2525+
2626+2727+### Profile
2828+2929+View detailed actor profiles, including their feed and metadata.
3030+3131+
3232+3333+### Developer Tools
3434+3535+Built-in logs and developer utilities for exploring the AT Protocol.
3636+3737+
3838+3939+### Offline Support & Drafts
4040+4141+Local-only drafts and caching powered by Drift (SQLite).
4242+4343+- **Drafts:** Save posts locally and publish later.
4444+- **Search History:** Persisted local search history.
4545+- **Saved Feeds:** Manage and pin your favorite feeds.
4646+4747+## Architecture
4848+4949+### Stack
5050+5151+- **Framework:** Flutter (M3)
5252+- **State Management:** `flutter_bloc`
5353+- **Database:** Drift (SQLite)
5454+- **Networking:** Dio + `atproto`/`bluesky` packages
5555+- **Navigation:** `go_router`
5656+- **Data Serialization:** `freezed` + `json_serializable`
5757+5858+### Directory Structure
5959+6060+The project follows a feature-first architecture layered with a core module:
6161+6262+- `lib/core/`: Shared infrastructure, database, router, and themes.
6363+- `lib/features/`: Feature-specific logic (Auth, Feed, Search, Profile, etc.).
6464+ - `<feature>/bloc/`: Business logic components.
6565+ - `<feature>/presentation/`: UI screens and widgets.
6666+ - `<feature>/data/`: (Optional) Feature-specific repositories or models.
26733-Cross-platform mobile BlueSky client.
6868+### Data Flow
6969+7070+- **Network:** Authenticated requests are routed through user PDS; public reads use the public AppView.
7171+- **Database:** Drift manages local persistence for accounts, cached profiles/posts, settings, and drafts.
7272+7373+### Routing
7474+7575+Lazurite uses `StatefulShellRoute` for persistent bottom navigation.
7676+7777+| Path | Description |
7878+| ----------- | ------------------------------ |
7979+| `/login` | Authentication gateway |
8080+| `/` | Home Feed tab |
8181+| `/search` | Search tab |
8282+| `/profile` | Current user profile tab |
8383+| `/settings` | Global settings |
8484+| `/compose` | Root-level modal for new posts |
8585+8686+## Local Development
8787+8888+Use `just` for common tasks:
8989+9090+- `just format` - Runs `dart format`
9191+- `just lint` - Proxies `flutter analyze`
9292+- `just test` - Executes the `flutter test` suite
9393+- `just gen` - Triggers `build_runner` for code generation
9494+- `just check` - Runs format, lint, and tests in sequence
9595+9696+For a quick start:
9797+9898+```sh
9999+flutter pub get
100100+just gen
101101+flutter run
102102+```
103103+104104+## Database Schema
105105+106106+Powered by **Drift**, the following tables are currently implemented:
107107+108108+| Table | Purpose |
109109+| ----------------- | ---------------------------------------------------------------- |
110110+| `accounts` | Local storage for session and auth tokens (DID, handle, service) |
111111+| `cached_profiles` | Cached profile metadata to reduce network calls |
112112+| `cached_posts` | Cached post content for offline viewing |
113113+| `saved_feeds` | Locally Managed feed preferences |
114114+| `search_history` | Persistent query history |
115115+| `drafts` | Offline-first post drafting with media support |
116116+| `settings` | Key-value application configuration |
117117+118118+## References
119119+120120+- [Bluesky API Documentation](https://docs.bsky.app/)
121121+- [AT Protocol Specification](https://atproto.com/)
122122+- [Flutter Documentation](https://flutter.dev/docs)
123123+124124+## Credits
125125+126126+- Typography inspiration from [Anisota](https://anisota.net/) by [Dame.is](https://dame.is).
127127+- Inspired by [Witchsky](https://witchsky.app/).
128128+- DevTools (AT Protocol Explorer) inspiration from [pdsls](https://pds.ls/)