Skip to content

Commit 35d2444

Browse files
author
techartdev
committed
docs: refresh CLI and project docs to match current behavior
1 parent 9329ccd commit 35d2444

3 files changed

Lines changed: 43 additions & 35 deletions

File tree

DOCS.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ This document explains how to run and use the current SCP2P prototype, what APIs
66

77
- `crates/scp2p-core`: protocol and runtime primitives
88
- `crates/scp2p-cli`: reference CLI executable
9+
- `crates/scp2p-desktop`: desktop shell/runtime integration
10+
- `crates/scp2p-relay`: standalone relay binary
911
- `SPECIFICATION.md`: protocol specification source of truth
1012
- `AGENTS.md`: contribution instructions for coding agents
1113
- `PLAN.md`: future roadmap and extension ideas
@@ -38,7 +40,7 @@ Windows desktop shell notes:
3840
- runtime config: state DB path, QUIC bind, TCP bind, bootstrap peer list
3941
- lifecycle: load/save config, start/stop, refresh
4042
- subscriptions: add/remove by share id
41-
- communities: join by `share_id` + `share_pubkey`, browse joined participants and community public shares across reachable peers
43+
- communities: join by `share_id` + `share_pubkey`, browse joined participants and community public shares via DHT-assisted discovery + peer status checks
4244
- public shares: browse reachable-peer public shares and subscribe without manually entering `share_id`
4345
- sync: manual sync over configured bootstrap TCP peers plus LAN-discovered peers
4446
- search: local subscription-scoped search
@@ -56,7 +58,7 @@ Windows desktop shell notes:
5658
- published content is advertised over the local TCP listener; if `Bind TCP` is `0.0.0.0`, the app derives an address from a known peer when possible
5759
- Community notes:
5860
- community join is explicit and local; there is no community autodiscovery
59-
- community browse currently probes the peers you can already reach, lists the ones that report joined membership for the selected community, and then fetches community-bound public shares from those peers
61+
- community browse uses DHT-backed community member discovery (`community:info`) and then fetches membership status and public-share listings from discovered peers
6062

6163
## 3. CLI usage
6264

@@ -65,11 +67,11 @@ The `scp2p` CLI is an **interactive shell**. There are no subcommands to memoris
6567
### Starting the CLI
6668

6769
```bash
68-
# Defaults: database = scp2p.db in cwd, TCP port = 7001
70+
# Defaults: database = scp2p.db in cwd, TCP port = 7001, QUIC port = 7000
6971
scp2p
7072

7173
# Explicit options
72-
scp2p --db ~/mydata.db --port 7002 --bootstrap 10.0.0.1:7001,10.0.0.2:7001
74+
scp2p --db ~/mydata.db --port 7002 --quic-port 7001 --bootstrap 10.0.0.1:7001,10.0.0.2:7001
7375

7476
# Development via Cargo
7577
cargo run -p scp2p-cli -- --bootstrap 10.0.0.1:7001
@@ -81,6 +83,7 @@ All flags have environment variable equivalents:
8183
|---|---|---|
8284
| `--db <PATH>` | `SCP2P_DB` | `scp2p.db` |
8385
| `--port <PORT>` | `SCP2P_PORT` | `7001` |
86+
| `--quic-port <PORT>` | `SCP2P_QUIC_PORT` | `--port - 1` (set `0` to disable) |
8487
| `--bootstrap <IP:PORT>` | `SCP2P_BOOTSTRAP` (comma-separated) | (empty) |
8588

8689
### Startup sequence
@@ -89,8 +92,11 @@ On launch the CLI:
8992
1. Opens (or creates) the SQLite database.
9093
2. Restores persisted node identity.
9194
3. Starts a background TCP listener on `0.0.0.0:<port>`.
92-
4. Prints a welcome banner with your **Node ID** and **Share ID**.
93-
5. Enters the main menu loop.
95+
4. Starts a background QUIC listener on `0.0.0.0:<quic-port>` unless QUIC is disabled.
96+
5. Starts background DHT republish + subscription sync loops.
97+
6. Attempts persistent relay tunnel registration using configured bootstrap peers.
98+
7. Prints a welcome banner with your **Node ID** and **Share ID**.
99+
8. Enters the main menu loop.
94100

95101
### Main menu
96102

@@ -107,6 +113,7 @@ On launch the CLI:
107113
📁 Publish folder
108114
📚 Browse / inspect a share
109115
🔔 Subscriptions
116+
🏘 Communities
110117
🔍 Search
111118
⬇ Download by content ID
112119
⬇ Download share
@@ -339,15 +346,15 @@ secrecy. Frame lengths use a 4-byte **big-endian** (network byte order) prefix.
339346

340347
## 6. Current limitations
341348

342-
This is an in-memory prototype baseline.
349+
State is persisted via SQLite (`SqliteStore`) and includes subscriptions, manifests, search snapshot, peers, communities, publisher identities, and partial download metadata.
343350

344351
Not yet implemented as production-ready behavior:
345352
- End-to-end relay tunnel transport integration
346353
- Extended multi-node integration/churn/NAT soak depth and metrics-driven analysis
347354
- Robust peer reputation, abuse controls, quotas
348355
- Full mobile/desktop profile split behavior
349356

350-
## 7. Message type registry (frozen for v0.1)
357+
## 7. Message type registry (current)
351358

352359
`type: u16` values currently reserved/implemented:
353360

@@ -358,6 +365,14 @@ Not yet implemented as production-ready behavior:
358365
- `202`: `STORE`
359366
- `400`: `GET_MANIFEST`
360367
- `401`: `MANIFEST_DATA`
368+
- `402`: `LIST_PUBLIC_SHARES`
369+
- `403`: `PUBLIC_SHARE_LIST`
370+
- `404`: `GET_COMMUNITY_STATUS`
371+
- `405`: `COMMUNITY_STATUS`
372+
- `406`: `LIST_COMMUNITY_PUBLIC_SHARES`
373+
- `407`: `COMMUNITY_PUBLIC_SHARE_LIST`
374+
- `460`: `RELAY_LIST_REQUEST`
375+
- `461`: `RELAY_LIST_RESPONSE`
361376
- `450`: `RELAY_REGISTER`
362377
- `451`: `RELAY_REGISTERED`
363378
- `452`: `RELAY_CONNECT`
@@ -368,15 +383,6 @@ Not yet implemented as production-ready behavior:
368383
- `501`: `CHUNK_DATA`
369384
- `502`: `GET_CHUNK_HASHES`
370385
- `503`: `CHUNK_HASH_LIST`
371-
- `600`: `LIST_PUBLIC_SHARES`
372-
- `601`: `PUBLIC_SHARE_LIST`
373-
- `602`: `GET_COMMUNITY_STATUS`
374-
- `603`: `COMMUNITY_STATUS`
375-
- `604`: `LIST_COMMUNITY_PUBLIC_SHARES`
376-
- `605`: `COMMUNITY_PUBLIC_SHARE_LIST`
377-
- `700`: `RELAY_LIST_REQUEST`
378-
- `701`: `RELAY_LIST_RESPONSE`
379-
380386
Compatibility policy for this registry:
381387

382388
- Existing numeric assignments are stable and must not be changed.

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ SCP2P isn't just secure; it's architected to protect your digital footprint:
9393

9494
---
9595

96-
We are currently in **v0.1 Prototype** phase. We are building the foundations of a global communication standard.
96+
Current stable release line is **v0.3.x**, with active development continuing toward broader platform coverage and protocol hardening.
9797

9898
### ✅ What's Working (Existing)
9999
- **Core Protocol:** Ed25519 identities, BLAKE3 content addressing, and CBOR-framed messaging.
@@ -131,7 +131,7 @@ The project is structured as a Rust workspace:
131131
- `crates/scp2p-core`: The heart of the protocol.
132132
- `crates/scp2p-cli`: Interactive command-line client.
133133
- `crates/scp2p-relay`: Headless relay / DHT node binary.
134-
- `app/`: The Tauri + React desktop application.
134+
- `crates/scp2p-desktop`: Desktop application shell and runtime integration.
135135

136136
### Interactive CLI
137137

@@ -158,17 +158,10 @@ See [DOCS.md](DOCS.md#3-cli-usage) for the full reference.
158158

159159
### Desktop Application
160160

161-
The desktop app is built with Tauri and React. To run it in development mode:
161+
Run the desktop application from the workspace:
162162

163163
```bash
164-
# Navigate to the app directory
165-
cd app
166-
167-
# Install dependencies
168-
npm install
169-
170-
# Start the app in development mode
171-
npm run tauri dev
164+
cargo run -p scp2p-desktop
172165
```
173166

174167
### Standalone Relay

crates/scp2p-cli/README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
### One-line install (Linux / macOS)
1010

1111
```sh
12-
curl -fsSL https://raw.githubusercontent.com/your-org/scp2p/main/install.sh | sh -s -- --tool cli
12+
curl -fsSL https://raw.githubusercontent.com/techartdev/scp2p/main/install.sh | sh -s -- --tool cli
1313
```
1414

1515
### One-line install (Windows PowerShell)
1616

1717
```powershell
18-
$env:SCP2P_TOOL="cli"; irm https://raw.githubusercontent.com/your-org/scp2p/main/install.ps1 | iex
18+
$env:SCP2P_TOOL="cli"; irm https://raw.githubusercontent.com/techartdev/scp2p/main/install.ps1 | iex
1919
```
2020

2121
### From crates.io
@@ -35,11 +35,11 @@ cargo install --path crates/scp2p-cli
3535
## Quick start
3636

3737
```bash
38-
# Start with defaults (database = scp2p.db, port = 7001)
38+
# Start with defaults (database = scp2p.db, TCP = 7001, QUIC = 7000)
3939
scp2p
4040

41-
# Explicit database, port, and bootstrap peer
42-
scp2p --db ~/mynode.db --port 7002 --bootstrap 10.0.0.1:7001
41+
# Explicit database, TCP/QUIC ports, and bootstrap peer
42+
scp2p --db ~/mynode.db --port 7002 --quic-port 7001 --bootstrap 10.0.0.1:7001
4343

4444
# Multiple bootstrap peers
4545
scp2p --bootstrap 10.0.0.1:7001,10.0.0.2:7001
@@ -53,6 +53,7 @@ scp2p --bootstrap 10.0.0.1:7001,10.0.0.2:7001
5353
|---|---|---|---|
5454
| `--db <PATH>` | `SCP2P_DB` | `scp2p.db` | SQLite state database path |
5555
| `--port <PORT>` | `SCP2P_PORT` | `7001` | TCP port for incoming peer connections |
56+
| `--quic-port <PORT>` | `SCP2P_QUIC_PORT` | `--port - 1` | QUIC port (set `0` to disable QUIC) |
5657
| `--bootstrap <IP:PORT>` | `SCP2P_BOOTSTRAP` | (empty) | Comma-separated bootstrap peer addresses |
5758

5859
All flags can also be supplied as environment variables — useful in scripts or containers.
@@ -61,7 +62,7 @@ All flags can also be supplied as environment variables — useful in scripts or
6162

6263
## Interactive shell
6364

64-
On launch the node opens (or creates) the database, restores its identity, starts a background TCP listener, and presents the main menu:
65+
On launch the node opens (or creates) the database, restores its identity, starts background TCP/QUIC listeners (if enabled), and presents the main menu:
6566

6667
```
6768
╔══════════════════════════════════════════╗
@@ -79,6 +80,7 @@ On launch the node opens (or creates) the database, restores its identity, start
7980
📁 Publish folder
8081
📚 Browse / inspect a share
8182
🔔 Subscriptions
83+
🏘 Communities
8284
🔍 Search
8385
⬇ Download by content ID
8486
⬇ Download share
@@ -119,6 +121,13 @@ Sub-menu with three options:
119121
| Subscribe to a new share | Enter a share ID (hex) and optional public key |
120122
| Sync subscriptions now | Trigger an immediate network sync (same as **Sync now**) |
121123

124+
### 🏘 Communities
125+
Sub-menu for:
126+
- Create a new community
127+
- Join a community
128+
- Leave a community
129+
- Browse a community (participants and public shares)
130+
122131
### 🔍 Search
123132
Prompts for a text query, runs it against the local subscription-scoped search index, and shows ranked results with score, share ID, content ID, and item name.
124133

@@ -149,5 +158,5 @@ Generates a fresh Ed25519 keypair and prints:
149158

150159
- **Offline use:** search and browsing work without any network connection as long as you have locally synced manifests.
151160
- **Persistent identity:** the node key is stored in the database; the same Node ID and Share ID appear on every launch against the same `--db`.
152-
- **Scripting:** set `SCP2P_DB`, `SCP2P_PORT`, and `SCP2P_BOOTSTRAP` environment variables to avoid repeating flags in scripts.
161+
- **Scripting:** set `SCP2P_DB`, `SCP2P_PORT`, `SCP2P_QUIC_PORT`, and `SCP2P_BOOTSTRAP` environment variables to avoid repeating flags in scripts.
153162
- **Multiple nodes:** point different instances at different `--db` paths to run multiple independent identities on the same machine.

0 commit comments

Comments
 (0)