From 26379f4dcade4f3f57e4a60f7eeb35059f091434 Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Mon, 25 Aug 2025 15:00:15 +0200 Subject: [PATCH] Open source: LICENSE, CONTRIBUTING, CODE_OF_CONDUCT, CHANGELOG, Gitea templates, CI, docs index, tests scaffolding --- .gitea/ISSUE_TEMPLATE/bug_report.md | 44 +++++++++++++ .gitea/ISSUE_TEMPLATE/feature_request.md | 27 ++++++++ .gitea/PULL_REQUEST_TEMPLATE.md | 31 ++++++++++ .gitea/workflows/ci.yml | 51 +++++++++++++++ CHANGELOG.md | 17 +++++ CODE_OF_CONDUCT.md | 16 +++++ CONTRIBUTING.md | 79 ++++++++++++++++++++++++ EXEMPLES_PRATIQUES.md | 2 + LICENSE | 21 +++++++ docs/INDEX.md | 13 ++++ 10 files changed, 301 insertions(+) create mode 100644 .gitea/ISSUE_TEMPLATE/bug_report.md create mode 100644 .gitea/ISSUE_TEMPLATE/feature_request.md create mode 100644 .gitea/PULL_REQUEST_TEMPLATE.md create mode 100644 .gitea/workflows/ci.yml create mode 100644 CHANGELOG.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 docs/INDEX.md diff --git a/.gitea/ISSUE_TEMPLATE/bug_report.md b/.gitea/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..780167a --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,44 @@ +--- +name: Bug Report +about: Signaler un bug pour améliorer sdk_relay +title: '[BUG] ' +labels: ['bug', 'needs-triage'] +assignees: '' +--- + +## 🐛 Description du Bug + +Description claire et concise du problème. + +## 🔄 Étapes pour Reproduire + +1. ... +2. ... +3. ... + +## ✅ Comportement Attendu + +... + +## ❌ Comportement Actuel + +... + +## 💻 Informations Système +- OS: ... +- Rust: ... +- Version sdk_relay: ... + +## 📝 Logs +``` +Logs pertinents ici +``` + +## 🔧 Tentatives de Résolution +- [ ] Clippy/fmt OK +- [ ] Tests OK +- [ ] Rebuild + +## 📚 Liens +- [Documentation](../docs) +- [Issues similaires](https://git.4nkweb.com/4nk/sdk_relay/issues?q=is%3Aissue+is%3Aopen+label%3Abug) diff --git a/.gitea/ISSUE_TEMPLATE/feature_request.md b/.gitea/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..8dc49a9 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,27 @@ +--- +name: Feature Request +about: Proposer une nouvelle fonctionnalité pour sdk_relay +title: '[FEATURE] ' +labels: ['enhancement', 'needs-triage'] +assignees: '' +--- + +## 🚀 Résumé +... + +## 💡 Motivation +... + +## 🎯 Proposition +- [ ] Fonctionnalité 1 +- [ ] Fonctionnalité 2 + +## 🧪 Tests +- [ ] Unitaires +- [ ] Intégration + +## 📚 Documentation +- [ ] API/README mis à jour + +## 🔗 Liens +- [Issues similaires](https://git.4nkweb.com/4nk/sdk_relay/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..12ec984 --- /dev/null +++ b/.gitea/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,31 @@ +# Pull Request - sdk_relay + +## 📋 Description +Résumé clair des changements. + +### Type +- [ ] Bug fix +- [ ] Feature +- [ ] Docs +- [ ] Tests +- [ ] Refactor +- [ ] CI + +## 🔗 Issues +Fixes #(issue) + +## 🧪 Tests +```bash +cargo test --all +cargo clippy -- -D warnings +cargo fmt -- --check +``` + +## 📚 Docs +- [ ] README/docs mis à jour + +## 🔍 Checklist +- [ ] Lint OK +- [ ] Tests OK +- [ ] Pas de régression +- [ ] Sécurité considérée diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..1dcc853 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI - sdk_relay + +on: + push: + branches: [ main, develop, docker-support ] + pull_request: + branches: [ main, develop, docker-support ] + +env: + RUST_VERSION: 'stable' + +jobs: + build-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_VERSION }} + override: true + - name: Cache cargo + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Fmt + run: cargo fmt --all -- --check + - name: Clippy + run: cargo clippy --all-targets -- -D warnings + - name: Tests + run: cargo test --all + + security: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_VERSION }} + override: true + - name: Cargo audit + run: | + cargo install cargo-audit || true + cargo audit --deny warnings || true diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..249f5f2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,17 @@ +# Changelog - sdk_relay + +## [Unreleased] +### Added +- Synchronisation mesh (types de sync, cache déduplication, métriques) +- Interface WebSocket/HTTP +- Intégration Bitcoin Core (RPC/ZMQ) +- Healthcheck et logs + +### Changed +- Améliorations stabilité et traces + +### Fixed +- Problèmes de compatibilité Docker + +## [0.1.0] - 2024-12-19 +- Version initiale open source diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..d207618 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,16 @@ +# Code de Conduite - sdk_relay + +Nous nous engageons à une communauté accueillante et respectueuse. + +## Standards +- Respect, empathie, critique constructive +- Pas de harcèlement, trolling, attaques personnelles + +## Portée +S'applique dans tous les espaces du projet et lors des représentations publiques du projet. + +## Application +Signalez à contact@4nkweb5.com. Confidentialité assurée. Des mesures appropriées seront prises. + +## Attribution +Adapté du Contributor Covenant v2.0. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..92915d3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,79 @@ +# Guide de Contribution - sdk_relay + +Merci pour votre intérêt à contribuer à `sdk_relay` ! Ce guide explique comment participer efficacement. + +## 🎯 Types de contributions +- Bugs, nouvelles fonctionnalités, documentation, tests, performance, sécurité + +## 🚀 Premiers pas + +### Prérequis +- Rust stable (via rustup) +- Docker (pour intégration dans 4NK Node) +- Git + +### Fork & clone (Gitea) +```bash +git clone https://git.4nkweb.com/4nk/sdk_relay.git +cd sdk_relay +# Ajouter upstream si vous travaillez depuis un fork +# git remote add upstream https://git.4nkweb.com/4nk/sdk_relay.git +``` + +### Branches +```bash +git checkout -b feature/nom-feature +# ou +git checkout -b fix/nom-bug +``` + +## 🔧 Développement + +### Build & tests +```bash +cargo fmt --all +cargo clippy --all-targets -- -D warnings +cargo test --all +``` + +### Messages de commit (conventionnel) +```bash +type(scope): description courte +# ex: feat(sync): add metrics sync type +``` +Types: feat, fix, docs, style, refactor, test, chore, perf, ci + +## 🧪 Tests + +### Unitaires / Intégration +```bash +cargo test --lib --bins +cargo test --tests +``` + +### Lint / Format +```bash +cargo fmt --all -- --check +cargo clippy --all-targets -- -D warnings +``` + +## 📚 Documentation +- Maintenir à jour `README.md` et `docs/` +- Documenter les APIs publiques et les nouveaux types de sync + +## 🔍 Code Review +- CI verte (fmt, clippy, tests) +- Couverture de tests suffisante +- Pas de régressions +- Perf et sécurité considérées + +## 📝 Pull Requests (Gitea) +- Lier une issue si possible +- Décrire clairement les changements +- Ajouter tests et docs + +## 🆘 Support +- Issues: https://git.4nkweb.com/4nk/sdk_relay/issues + +## 📄 Licence +Contribuer implique l’acceptation de la licence MIT du projet. diff --git a/EXEMPLES_PRATIQUES.md b/EXEMPLES_PRATIQUES.md index 6ed5e9e..9fb523f 100644 --- a/EXEMPLES_PRATIQUES.md +++ b/EXEMPLES_PRATIQUES.md @@ -605,3 +605,5 @@ spec: ``` Ces exemples couvrent les cas d'usage les plus courants pour sdk_relay. Adaptez-les selon vos besoins spécifiques ! + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b4030a7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 4NK Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/docs/INDEX.md b/docs/INDEX.md new file mode 100644 index 0000000..9b6cac7 --- /dev/null +++ b/docs/INDEX.md @@ -0,0 +1,13 @@ +# Documentation - sdk_relay + +## Guides +- [Architecture](ARCHITECTURE.md) +- [API](API.md) +- [Contribution](../CONTRIBUTING.md) +- [Sécurité](../SECURITY.md) +- [Changelog](../CHANGELOG.md) + +## Tests +- Exécuter: `cargo test --all` +- Lint: `cargo clippy -- -D warnings` +- Format: `cargo fmt -- --check`