diff options
Diffstat (limited to 'docs/README.md')
| -rw-r--r-- | docs/README.md | 211 |
1 files changed, 147 insertions, 64 deletions
diff --git a/docs/README.md b/docs/README.md index 745211d..ab02cb9 100644 --- a/docs/README.md +++ b/docs/README.md | |||
| @@ -1,84 +1,167 @@ | |||
| 1 | # ngit-grasp Documentation | 1 | # ngit-grasp Documentation |
| 2 | 2 | ||
| 3 | ## Overview | 3 | Welcome to the **ngit-grasp** documentation! We use the [Diátaxis](https://diataxis.fr/) framework to organize our documentation into four types, each serving a different purpose. |
| 4 | |||
| 5 | ``` | ||
| 6 | PRACTICAL THEORETICAL | ||
| 7 | ───────── ─────────── | ||
| 8 | |||
| 9 | LEARNING │ Tutorials │ Explanation │ | ||
| 10 | │ │ │ | ||
| 11 | │ Getting │ Architecture │ | ||
| 12 | │ Started │ Decisions │ | ||
| 13 | │ │ │ | ||
| 14 | ├────────────────┼──────────────────┤ | ||
| 15 | │ │ │ | ||
| 16 | WORKING │ How-To │ Reference │ | ||
| 17 | │ Guides │ │ | ||
| 18 | │ │ API Docs │ | ||
| 19 | │ Deployment │ Protocols │ | ||
| 20 | │ Testing │ │ | ||
| 21 | │ │ │ | ||
| 22 | ``` | ||
| 23 | |||
| 24 | ## 📚 Documentation Types | ||
| 25 | |||
| 26 | ### 🎓 [Tutorials](tutorials/) - *Learning by Doing* | ||
| 27 | **Purpose:** Learn the basics through practical steps | ||
| 28 | **For:** Newcomers getting started | ||
| 29 | **Style:** Step-by-step lessons with guaranteed outcomes | ||
| 30 | |||
| 31 | - **[Getting Started](tutorials/getting-started.md)** - Your first ngit-grasp setup | ||
| 32 | - **[Running Your First Audit](tutorials/first-audit.md)** - Using grasp-audit tool | ||
| 33 | |||
| 34 | ### 🔧 [How-To Guides](how-to/) - *Solving Problems* | ||
| 35 | **Purpose:** Accomplish specific tasks | ||
| 36 | **For:** Users with basic knowledge solving real problems | ||
| 37 | **Style:** Practical recipes and solutions | ||
| 38 | |||
| 39 | - **[Deploy ngit-grasp](how-to/deploy.md)** - Production deployment guide | ||
| 40 | - **[Configure Nix Flakes](how-to/nix-flakes.md)** - Nix development environment | ||
| 41 | - **[Run Compliance Tests](how-to/test-compliance.md)** - GRASP compliance testing | ||
| 42 | - **[Upgrade nostr-sdk](how-to/upgrade-nostr-sdk.md)** - Handling SDK upgrades | ||
| 43 | |||
| 44 | ### 📖 [Reference](reference/) - *Technical Information* | ||
| 45 | **Purpose:** Look up technical details | ||
| 46 | **For:** Users who know what they're looking for | ||
| 47 | **Style:** Dry, factual, comprehensive | ||
| 48 | |||
| 49 | - **[Git Protocol](reference/git-protocol.md)** - Git Smart HTTP protocol details | ||
| 50 | - **[GRASP Protocol](reference/grasp-protocol.md)** - GRASP specification details | ||
| 51 | - **[Configuration](reference/configuration.md)** - All config options | ||
| 52 | - **[API Reference](reference/api.md)** - Internal API documentation | ||
| 53 | |||
| 54 | ### 💡 [Explanation](explanation/) - *Understanding Concepts* | ||
| 55 | **Purpose:** Understand the "why" and design decisions | ||
| 56 | **For:** Users wanting deeper understanding | ||
| 57 | **Style:** Discussion, context, alternatives | ||
| 58 | |||
| 59 | - **[Architecture Overview](explanation/architecture.md)** - System design and components | ||
| 60 | - **[Inline Authorization](explanation/inline-authorization.md)** - Why we chose this approach | ||
| 61 | - **[Comparison with ngit-relay](explanation/comparison.md)** - How we differ from reference | ||
| 62 | - **[Design Decisions](explanation/decisions.md)** - Key architectural choices | ||
| 63 | |||
| 64 | --- | ||
| 4 | 65 | ||
| 5 | This directory contains comprehensive documentation for the ngit-grasp project. | 66 | ## 🚀 Quick Start Paths |
| 67 | |||
| 68 | ### I'm brand new to ngit-grasp | ||
| 69 | 1. Read [README.md](../README.md) for project overview | ||
| 70 | 2. Follow [Getting Started Tutorial](tutorials/getting-started.md) | ||
| 71 | 3. Understand [Architecture Overview](explanation/architecture.md) | ||
| 72 | |||
| 73 | ### I want to deploy ngit-grasp | ||
| 74 | 1. Review [Configuration Reference](reference/configuration.md) | ||
| 75 | 2. Follow [Deployment How-To](how-to/deploy.md) | ||
| 76 | 3. Set up monitoring and backups | ||
| 77 | |||
| 78 | ### I want to develop on ngit-grasp | ||
| 79 | 1. Follow [Getting Started Tutorial](tutorials/getting-started.md) | ||
| 80 | 2. Read [Architecture Overview](explanation/architecture.md) | ||
| 81 | 3. Check [Nix Flakes How-To](how-to/nix-flakes.md) | ||
| 82 | 4. Review [Test Strategy](how-to/test-compliance.md) | ||
| 83 | |||
| 84 | ### I want to understand the design | ||
| 85 | 1. Read [Inline Authorization Explanation](explanation/inline-authorization.md) | ||
| 86 | 2. Review [Design Decisions](explanation/decisions.md) | ||
| 87 | 3. Compare with [ngit-relay Comparison](explanation/comparison.md) | ||
| 88 | |||
| 89 | ### I'm looking for specific information | ||
| 90 | - **Protocol details?** → [Reference](reference/) | ||
| 91 | - **Configuration options?** → [Configuration Reference](reference/configuration.md) | ||
| 92 | - **Git protocol?** → [Git Protocol Reference](reference/git-protocol.md) | ||
| 93 | |||
| 94 | --- | ||
| 95 | |||
| 96 | ## 📂 Additional Resources | ||
| 97 | |||
| 98 | ### [Archive](archive/) | ||
| 99 | Historical session notes and completed work. Useful for understanding project evolution but not required reading. | ||
| 100 | |||
| 101 | ### [Learnings](learnings/) | ||
| 102 | **DEPRECATED** - Being migrated to Diátaxis structure: | ||
| 103 | - Gotchas → How-To Guides | ||
| 104 | - Patterns → Reference or Explanation | ||
| 105 | - Notes → Appropriate category | ||
| 106 | |||
| 107 | --- | ||
| 108 | |||
| 109 | ## 🤝 Contributing to Documentation | ||
| 6 | 110 | ||
| 7 | ## Documents | 111 | When adding documentation, ask yourself: |
| 8 | 112 | ||
| 9 | ### For Review | 113 | **Is it a tutorial?** |
| 10 | - **[../REVIEW_SUMMARY.md](../REVIEW_SUMMARY.md)** - Start here! Executive summary of the architecture investigation and recommendations | 114 | - Does it teach a beginner? |
| 115 | - Is it a complete lesson with guaranteed outcome? | ||
| 116 | - → Add to `tutorials/` | ||
| 11 | 117 | ||
| 12 | ### Architecture & Design | 118 | **Is it a how-to guide?** |
| 13 | - **[ARCHITECTURE.md](ARCHITECTURE.md)** - Detailed technical architecture, component design, data flows, and implementation details | 119 | - Does it solve a specific problem? |
| 14 | - **[DECISION_SUMMARY.md](DECISION_SUMMARY.md)** - Why we chose inline authorization over Git hooks | 120 | - Is it a recipe for accomplishing a task? |
| 15 | - **[COMPARISON.md](COMPARISON.md)** - Side-by-side comparison with the reference implementation (ngit-relay) | 121 | - → Add to `how-to/` |
| 16 | 122 | ||
| 17 | ### Technical References | 123 | **Is it reference material?** |
| 18 | - **[GIT_PROTOCOL.md](GIT_PROTOCOL.md)** - Git Smart HTTP protocol reference, pkt-line format, and parsing examples | 124 | - Is it technical information? |
| 19 | - **[TEST_STRATEGY.md](TEST_STRATEGY.md)** - Comprehensive testing strategy including reusable GRASP compliance testing tool | 125 | - Will people look it up when needed? |
| 126 | - → Add to `reference/` | ||
| 20 | 127 | ||
| 21 | ### Project Files | 128 | **Is it explanation?** |
| 22 | - **[../README.md](../README.md)** - Project overview, quick start, and feature list | 129 | - Does it explain "why"? |
| 23 | - **[../.env.example](../.env.example)** - Configuration template | 130 | - Does it discuss alternatives or design? |
| 24 | - **[../LICENSE](../LICENSE)** - MIT License | 131 | - → Add to `explanation/` |
| 25 | 132 | ||
| 26 | ## Reading Guide | 133 | See [Diátaxis documentation](https://diataxis.fr/) for more guidance. |
| 27 | 134 | ||
| 28 | ### If you want to understand the architecture decision: | 135 | --- |
| 29 | 1. Read [REVIEW_SUMMARY.md](../REVIEW_SUMMARY.md) - Executive summary | ||
| 30 | 2. Read [DECISION_SUMMARY.md](DECISION_SUMMARY.md) - Detailed rationale | ||
| 31 | 3. Skim [COMPARISON.md](COMPARISON.md) - See how we differ from reference | ||
| 32 | 136 | ||
| 33 | ### If you want to implement: | 137 | ## 📊 Project Status |
| 34 | 1. Read [ARCHITECTURE.md](ARCHITECTURE.md) - Component design and code structure | ||
| 35 | 2. Read [TEST_STRATEGY.md](TEST_STRATEGY.md) - Testing approach and compliance tool | ||
| 36 | 3. Read [GIT_PROTOCOL.md](GIT_PROTOCOL.md) - Git protocol details | ||
| 37 | 4. Review code examples in ARCHITECTURE.md | ||
| 38 | 138 | ||
| 39 | ### If you want to deploy: | 139 | **ALPHA** - Under active development. Core functionality working, API may change. |
| 40 | 1. Read [README.md](../README.md) - Quick start | ||
| 41 | 2. Review [.env.example](../.env.example) - Configuration | ||
| 42 | 3. See deployment section in [ARCHITECTURE.md](ARCHITECTURE.md) | ||
| 43 | 140 | ||
| 44 | ### If you're comparing with ngit-relay: | 141 | ### Completed |
| 45 | 1. Read [COMPARISON.md](COMPARISON.md) - Detailed comparison | 142 | - ✅ grasp-audit compliance testing tool |
| 46 | 2. See architecture diagrams in both COMPARISON.md and ARCHITECTURE.md | 143 | - ✅ Nix flake development environment |
| 144 | - ✅ nostr-sdk 0.43 upgrade | ||
| 145 | - ✅ Documentation restructure (Diátaxis) | ||
| 47 | 146 | ||
| 48 | ## Key Concepts | 147 | ### In Progress |
| 148 | - 🔄 Core ngit-grasp server implementation | ||
| 149 | - 🔄 GRASP-01 compliance | ||
| 49 | 150 | ||
| 50 | ### Inline Authorization | 151 | ### Planned |
| 51 | The core architectural decision: we validate Git pushes **inside the HTTP handler** before spawning Git, rather than using Git's pre-receive hooks. | 152 | - 🔜 GRASP-02 (Proactive Sync) |
| 153 | - 🔜 GRASP-05 (Archive) | ||
| 52 | 154 | ||
| 53 | **Benefits:** | 155 | --- |
| 54 | - Better error messages (HTTP responses vs. hook stderr) | ||
| 55 | - Simpler deployment (no hook management) | ||
| 56 | - Easier testing (pure Rust) | ||
| 57 | - Better performance (skip Git for invalid pushes) | ||
| 58 | 156 | ||
| 59 | ### GRASP Protocol | 157 | ## 🔗 External Links |
| 60 | Git Relays Authorized via Signed-Nostr Proofs - a protocol for hosting Git repositories with Nostr-based authorization. | ||
| 61 | 158 | ||
| 62 | **Key Points:** | 159 | - [GRASP Protocol Specification](https://gitworkshop.dev/danconwaydev.com/grasp) |
| 63 | - Repository announcements (NIP-34 kind 30317) | 160 | - [NIP-34 (Git Stuff)](https://nips.nostr.com/34) |
| 64 | - State announcements (NIP-34 kind 30318) | 161 | - [Diátaxis Framework](https://diataxis.fr/) |
| 65 | - Multi-maintainer support via recursive maintainer sets | 162 | - [rust-nostr Documentation](https://docs.rs/nostr-sdk/) |
| 66 | - Push validation against signed state events | ||
| 67 | 163 | ||
| 68 | ### Technology Stack | 164 | --- |
| 69 | - **actix-web**: HTTP server | ||
| 70 | - **git-http-backend**: Git protocol handling (Rust crate) | ||
| 71 | - **nostr-relay-builder**: Nostr relay infrastructure (rust-nostr) | ||
| 72 | - **tokio**: Async runtime | ||
| 73 | 165 | ||
| 74 | ## Status | 166 | *Documentation structure based on [Diátaxis](https://diataxis.fr/)* |
| 75 | 167 | *Last updated: November 4, 2025* | |
| 76 | **ALPHA** - Architecture design complete, implementation not yet started. | ||
| 77 | |||
| 78 | ## Contributing | ||
| 79 | |||
| 80 | See [../README.md](../README.md) for contribution guidelines. | ||
| 81 | |||
| 82 | ## Questions? | ||
| 83 | |||
| 84 | Open an issue or discussion on the repository. | ||