diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a2fd83b8..b255972c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,9 +8,9 @@ Be respectful. We follow the [Contributor Covenant](https://www.contributor-cove ## Getting Started -1. Fork the repository -2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/archy.git` -3. Set up the dev environment (see `docs/development-setup.md`) +1. Fork the repository on the project's Gitea instance +2. Clone your fork: `git clone /archy.git` +3. Set up the dev environment (see `docs/developer-guide.md`) 4. Create a feature branch: `git checkout -b feature/your-feature` ## Development Setup diff --git a/docs/developer-guide.md b/docs/developer-guide.md index 63b40bf7..b9bfe5e2 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -9,14 +9,14 @@ archy/ │ ├── src/ │ │ ├── main.rs # Entry point, module declarations │ │ ├── api/rpc/ # RPC endpoint handlers -│ │ │ ├── mod.rs # Route dispatcher +│ │ │ ├── dispatcher.rs # Route dispatcher (~380 method arms) │ │ │ ├── auth.rs # Login, session, TOTP │ │ │ ├── container.rs # Container lifecycle -│ │ │ ├── package.rs # Package install/remove +│ │ │ ├── package/ # Package install/lifecycle/stacks │ │ │ ├── interfaces.rs # Network interfaces, WiFi, DNS -│ │ │ ├── federation.rs # Federation management +│ │ │ ├── federation/ # Federation management │ │ │ ├── marketplace.rs # Community marketplace -│ │ │ └── ... # Other endpoint groups +│ │ │ └── ... # Other endpoint groups (mesh/, identity/, lnd/, tor/, system/) │ │ ├── auth.rs # Password hashing, sessions │ │ ├── config.rs # Configuration loading │ │ ├── server.rs # HTTP/WS server (axum) @@ -25,11 +25,11 @@ archy/ │ │ │ ├── dns.rs # DNS configuration │ │ │ ├── router.rs # UPnP, diagnostics │ │ │ └── dwn_*.rs # DWN protocol -│ │ ├── federation.rs # Federation protocol +│ │ ├── federation/ # Federation protocol │ │ ├── marketplace.rs # Marketplace discovery │ │ ├── identity.rs # DID key management │ │ ├── vpn.rs # VPN (Tailscale/WireGuard) -│ │ ├── mesh.rs # Meshtastic mesh networking +│ │ ├── mesh/ # Tri-protocol mesh (Meshtastic/MeshCore/Reticulum) │ │ └── ... │ ├── Cargo.toml │ └── tests/ # Integration tests @@ -67,7 +67,7 @@ archy/ │ └── multi-node-architecture.md ├── apps/ # App manifests (YAML) ├── CLAUDE.md # AI development instructions -└── loop/plan.md # Project roadmap +└── docs/ROADMAP.md # Project roadmap ``` ## Development Setup @@ -162,13 +162,15 @@ impl RpcHandler { ### 2. Register the Route -Add the module declaration and route in `core/archipelago/src/api/rpc/mod.rs`: +Add the module declaration in `core/archipelago/src/api/rpc/mod.rs`, then add +the route arm to the `dispatch()` match in +`core/archipelago/src/api/rpc/dispatcher.rs`: ```rust -// At the top: +// api/rpc/mod.rs, at the top: mod mymodule; -// In the match statement (handle_rpc_call): +// api/rpc/dispatcher.rs, in the dispatch() match statement: "mymodule.action" => self.handle_mymodule_action(params).await, ```