diff --git a/.gitignore b/.gitignore index 67d155a..0e061c4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ ref coracle-lib/src/ coracle-net/src/ coracle-signer/src/ +coracle-domain/src/ coracle-content/src/ coracle-storage/src/ diff --git a/AGENTS.md b/AGENTS.md index d797280..22c10a9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,6 +17,7 @@ The project serves three goals: - `coracle-lib` — Core nostr types and stateless utilities - `coracle-net` — Relay networking - `coracle-signer` — Signing abstractions (NIP-07, NIP-46, local key) +- `coracle-domain` — Domain-specific nostr types (profiles, follows, reactions, zaps, etc.) - `coracle-content` — Text parsing and rendering - `coracle-storage` — Cross-platform storage adapters - `coracle-tangle` — The tangle/weave build tool (not a library) diff --git a/Cargo.toml b/Cargo.toml index 723f87d..5526cfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ members = [ "coracle-lib", "coracle-net", "coracle-signer", + "coracle-domain", "coracle-content", "coracle-storage", ] diff --git a/README.md b/README.md index 95ba5a4..35cf5c4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ It has the following crates: - `coracle-lib` - Struct definitions, stateless utilities related to nostr. - `coracle-net` - Networking utilities for working with relays - `coracle-signer` - Signer client/server utilities +- `coracle-domain` - Domain-specific nostr types: profiles, follows, reactions, zaps, etc. - `coracle-content` - Text parsing and rendering utilities - `coracle-storage` - Storage adapters for different platforms diff --git a/book/01-introduction.md b/book/01-introduction.md index 63e8e14..897f7a4 100644 --- a/book/01-introduction.md +++ b/book/01-introduction.md @@ -21,6 +21,8 @@ This book is both a tutorial and the source code for the `coracle` family of Rus events, and relay discovery. - **coracle-signer** — Signing abstractions: local key signing, NIP-46 remote signing, and browser extension integration. +- **coracle-domain** — Domain types: profiles, follows, relay selections, reactions, zaps, + and other higher-level nostr concepts built on top of events. - **coracle-content** — Content handling: parsing note text, rendering mentions, handling media links, and working with NIP-27 references. - **coracle-storage** — Persistence: storing and querying events locally across different diff --git a/book/SUMMARY.md b/book/SUMMARY.md index 5539927..b193797 100644 --- a/book/SUMMARY.md +++ b/book/SUMMARY.md @@ -7,60 +7,59 @@ - [Keys](02-keys.md) - [Signing](03-signing.md) - [Encryption](04-encryption.md) -- [Encryptables](xx.md) -- [Events](xx.md) -- [Tags](xx.md) -- [Kinds](xx.md) -- [Kind Ranges](xx.md) -- [Addresses](xx.md) -- [Proof of Work](xx.md) -- [Filters](xx.md) +- [Encryptables](05-encryptables.md) +- [Events](06-events.md) +- [Tags](07-tags.md) +- [Kinds](08-kinds.md) +- [Kind Ranges](09-kind-ranges.md) +- [Addresses](10-addresses.md) +- [Proof of Work](11-proof-of-work.md) +- [Filters](12-filters.md) ## Domain -- [Relay Selections](xx.md) -- [Relay Metadata](xx.md) -- [Relay Membership](xx.md) -- [Profiles](xx.md) -- [Follows](xx.md) -- [Microblogging](xx.md) -- [Reactions](xx.md) -- [Reports](xx.md) -- [Emojis](xx.md) -- [Zaps](xx.md) -- Split out each list kind into its own chapter -- [Rooms](xx.md) +- [Relay Selections](13-relay-selections.md) +- [Relay Metadata](14-relay-metadata.md) +- [Relay Membership](15-relay-membership.md) +- [Profiles](16-profiles.md) +- [Follows](17-follows.md) +- [Microblogging](18-microblogging.md) +- [Reactions](19-reactions.md) +- [Reports](20-reports.md) +- [Emojis](21-emojis.md) +- [Zaps](22-zaps.md) +- [Rooms](23-rooms.md) ## Networking -- [Relay Connections](xx.md) -- [Relay Authentication](xx.md) -- [Relay Policies](xx.md) -- [Server Authentication](xx.md) -- [Relay Management API](xx.md) -- [Blossom Media Storage](xx.md) +- [Relay Connections](24-relay-connections.md) +- [Relay Authentication](25-relay-authentication.md) +- [Relay Policies](26-relay-policies.md) +- [Server Authentication](27-server-authentication.md) +- [Relay Management API](28-relay-management-api.md) +- [Blossom Media Storage](29-blossom-media-storage.md) ## Signers -- [Secret Signers](xx.md) -- [Remote Signers](xx.md) -- [Android Signers](xx.md) -- [Browser Signers](xx.md) +- [Secret Signers](30-secret-signers.md) +- [Remote Signers](31-remote-signers.md) +- [Android Signers](32-android-signers.md) +- [Browser Signers](33-browser-signers.md) ## Content -- [Entities](xx.md) -- [Relays](xx.md) -- [Rooms](xx.md) -- [Links](xx.md) -- [Lightning](xx.md) -- [Cashu](xx.md) -- [Emojis](xx.md) -- [Topics](xx.md) -- [Code](xx.md) +- [Entities](34-entities.md) +- [Relays](35-relays.md) +- [Rooms](36-rooms.md) +- [Links](37-links.md) +- [Lightning](38-lightning.md) +- [Cashu](39-cashu.md) +- [Emojis](40-emojis.md) +- [Topics](41-topics.md) +- [Code](42-code.md) ## Storage -- [Event Repository](xx.md) -- [In Memory Backend](xx.md) -- [Sqlite Backend](xx.md) +- [Event Repository](43-event-repository.md) +- [In Memory Backend](44-in-memory-backend.md) +- [Sqlite Backend](45-sqlite-backend.md) diff --git a/coracle-domain/Cargo.toml b/coracle-domain/Cargo.toml new file mode 100644 index 0000000..99c3627 --- /dev/null +++ b/coracle-domain/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "coracle-domain" +version = "0.1.0" +edition = "2021" +description = "Domain-specific nostr types: profiles, follows, reactions, zaps, and more" + +[dependencies] +coracle-lib = { path = "../coracle-lib" } diff --git a/justfile b/justfile index eba5d63..21e05f8 100644 --- a/justfile +++ b/justfile @@ -12,7 +12,7 @@ check: tangle cargo check --workspace --exclude coracle-tangle clean: - rm -rf coracle-lib/src/ coracle-net/src/ coracle-signer/src/ coracle-content/src/ coracle-storage/src/ + rm -rf coracle-lib/src/ coracle-domain/src/ coracle-net/src/ coracle-signer/src/ coracle-content/src/ coracle-storage/src/ rm -rf target/book/ target/book-staging/ all: build weave