diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..1db98e1ce --- /dev/null +++ b/.editorconfig @@ -0,0 +1,28 @@ +# ============================================================ +# Veza/Talas — EditorConfig +# Standardisation des éditeurs pour un projet multi-langage +# ============================================================ + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{js,ts,jsx,tsx}] +indent_size = 2 + +[*.go] +indent_size = 4 +indent_style = tab + +[*.rs] +indent_size = 4 + +[Makefile] +indent_style = tab + diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..d4552b72f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,19 @@ +# ============================================================ +# Veza/Talas — Git Attributes +# ============================================================ + +# Normalisation des fins de ligne +* text=auto eol=lf + +# Spécialisation par types (aide Linguist sur GitHub) +*.go linguist-language=Go +*.rs linguist-language=Rust +*.ts linguist-language=TypeScript +*.tsx linguist-language=TypeScript +*.js linguist-language=JavaScript + +# Si tu utilises Git LFS (optionnel) +# *.mp4 filter=lfs diff=lfs merge=lfs -text +# *.wav filter=lfs diff=lfs merge=lfs -text +# *.zip filter=lfs diff=lfs merge=lfs -text + diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..66bb17d42 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,49 @@ +--- +name: "🐞 Bug report" +about: Décrire un bug pour le corriger proprement +title: "[BUG] " +labels: bug +--- + +## 🐞 Description du bug + +Décrire clairement le problème. + +--- + +## 🔁 Étapes pour reproduire + +1. … +2. … +3. … + +--- + +## ✅ Comportement attendu + +Ce qui aurait dû se passer. + +--- + +## 💻 Contexte + +- Service impacté : (backend-api / chat-server / stream-server / web-frontend / infra) +- Branch : (main / develop / autre) +- Environnement : (local / dev / staging / prod) + +--- + +## 📚 Impact sur ORIGIN + +- [ ] Aucun +- [ ] Contradiction avec ORIGIN (préciser le fichier / la section) + +--- + +## 🧪 Logs / captures (optionnel) + +Coller ici : +- extraits de logs, +- captures d’écran, +- requêtes HTTP, etc. + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..39f4ec25d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,48 @@ +--- +name: "🚀 Feature request" +about: Proposer une nouvelle fonctionnalité ou une amélioration +title: "[FEAT] " +labels: enhancement +--- + +## 🎯 Description + +Décrire la feature souhaitée, le problème auquel elle répond, ou la valeur ajoutée. + +--- + +## 🧩 Contexte + +- Qui en a besoin ? +- Dans quel flux de l’application ? +- Lien avec une Phase / Milestone (Phase 0, Phase 1, etc.) ? + +--- + +## 📚 Alignement ORIGIN + +- [ ] Feature déjà définie dans ORIGIN (référence du doc + section) +- [ ] Nouvelle feature (nécessite mise à jour de ORIGIN) + +--- + +## 🛠️ Approche technique envisagée (si tu en as une) + +- Services impactés +- Nouvelles routes API ? +- Changements DB ? + +--- + +## ✅ Critères d’acceptation + +- [ ] … +- [ ] … +- [ ] … + +--- + +## 📎 Notes supplémentaires + +Tout ce qui peut aider à l’implémentation. + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..d50b8a133 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,64 @@ +# 🧩 Résumé + +- **Type de changement** : (feat / fix / refactor / chore / docs) +- **Scope** : (backend-api / chat-server / stream-server / web-frontend / infra / docs) + +--- + +## 🎯 Contexte + +Expliquer en quelques lignes : +- pourquoi ce changement, +- à quel besoin il répond, +- lien éventuel avec un document ORIGIN ou une tâche (Phase, Milestone). + +--- + +## 🔍 Détails techniques + +- Points clés d’implémentation +- Structures / modules touchés +- Changement de contrats API ? (si oui, détailler) + +--- + +## 📚 Impact sur ORIGIN + +- [ ] Aucun impact +- [ ] Mise à jour nécessaire de la documentation ORIGIN + +Si oui, préciser : +- Fichiers ORIGIN impactés (`docs/ORIGIN/…`) +- Nature du changement (ajout / correction / refonte partielle) + +--- + +## ✅ Tests exécutés + +Coche ce qui a été lancé : + +- [ ] `go test ./...` (backend-api) +- [ ] `cargo test` (chat-server) +- [ ] `cargo test` (stream-server) +- [ ] `pnpm test` (web-frontend) +- [ ] Tests manuels locaux (décrire rapidement) + +--- + +## ⚠️ Breaking changes + +- [ ] Aucune +- [ ] Oui + +Si oui, expliquer : +- Ce qui casse +- Comment migrer +- Impact sur les clients / infra + +--- + +## 💬 Notes diverses + +- TODO restant éventuel +- Pistes pour améliorations futures + diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml new file mode 100644 index 000000000..6018a9145 --- /dev/null +++ b/.github/workflows/backend-ci.yml @@ -0,0 +1,34 @@ +name: Backend API CI + +on: + push: + paths: + - "apps/backend-api/**" + - ".github/workflows/backend-ci.yml" + pull_request: + paths: + - "apps/backend-api/**" + - ".github/workflows/backend-ci.yml" + +jobs: + test: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: apps/backend-api + + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.22" + + - name: Download deps + run: go mod download + + - name: Run tests + run: go test ./... + diff --git a/.github/workflows/chat-ci.yml b/.github/workflows/chat-ci.yml new file mode 100644 index 000000000..2d7fbd90e --- /dev/null +++ b/.github/workflows/chat-ci.yml @@ -0,0 +1,32 @@ +name: Chat Server CI + +on: + push: + paths: + - "apps/chat-server/**" + - ".github/workflows/chat-ci.yml" + pull_request: + paths: + - "apps/chat-server/**" + - ".github/workflows/chat-ci.yml" + +jobs: + test: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: apps/chat-server + + steps: + - uses: actions/checkout@v4 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Run tests + run: cargo test --all + diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml new file mode 100644 index 000000000..fe70b9771 --- /dev/null +++ b/.github/workflows/frontend-ci.yml @@ -0,0 +1,37 @@ +name: Frontend CI + +on: + push: + paths: + - "apps/web-frontend/**" + - ".github/workflows/frontend-ci.yml" + pull_request: + paths: + - "apps/web-frontend/**" + - ".github/workflows/frontend-ci.yml" + +jobs: + test: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: apps/web-frontend + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install dependencies + run: pnpm install + + - name: Run tests + run: pnpm test + diff --git a/.github/workflows/stream-ci.yml b/.github/workflows/stream-ci.yml new file mode 100644 index 000000000..fcf8a86f9 --- /dev/null +++ b/.github/workflows/stream-ci.yml @@ -0,0 +1,32 @@ +name: Stream Server CI + +on: + push: + paths: + - "apps/stream-server/**" + - ".github/workflows/stream-ci.yml" + pull_request: + paths: + - "apps/stream-server/**" + - ".github/workflows/stream-ci.yml" + +jobs: + test: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: apps/stream-server + + steps: + - uses: actions/checkout@v4 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Run tests + run: cargo test --all + diff --git a/.gitignore b/.gitignore index ad6795588..2185927e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,74 @@ -# Generated by Cargo -# will have compiled files and executables -debug -target +# ============================================================ +# Veza/Talas — Global .gitignore +# Stack: Go, Rust, TypeScript/React, Docker, Scripts +# ============================================================ -# These are backup files generated by rustfmt -**/*.rs.bk +### Node / JS +node_modules/ +dist/ +build/ +.next/ +pnpm-lock.yaml +npm-debug.log* +yarn-debug.log* +yarn-error.log* -# MSVC Windows builds of rustc generate these, which store debugging information -*.pdb +### Rust +target/ +Cargo.lock +*.rs.bk -# Generated by cargo mutants -# Contains mutation testing data -**/mutants.out*/ +### Go +bin/ +*.exe +*.exe~ +*.dll +*.so +*.dylib + +### Python (scripts/tools) +__pycache__/ +*.pyc + +### Logs / Dumps +*.log +logs/ +*.pid +*.seed +*.gz + +### Editors / IDE +.vscode/ +.idea/ +*.swp +*.swo + +### System trash +.DS_Store +Thumbs.db + +### Temp / Cache +tmp/ +temp/ +.cache/ +coverage/ +coverage-final.json + +### Test artifacts +*.test +*.coverage + +### Build / Bundles +*.wasm +*.bundle.js +*.map + +### Environment / Secrets (NE JAMAIS COMMIT) +.env +.env.* +.secrets/ + +### Docker +docker-data/ +*.tar -# RustRover -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..31886bd9d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,126 @@ +# 🤝 Contribuer à Veza + +Merci de contribuer à Veza ! +Ce guide formalise un workflow clair, reproductible et adapté à la complexité du projet. + +--- + +# 1. Philosophie du projet + +Veza suit trois principes : + +1. **Cohérence** — respecter la structure ORIGIN (docs/ORIGIN/). +2. **Lisibilité** — code clair, typé, testé, documenté. +3. **Évolutivité** — préférer une architecture modulaire à un hack rapide. + +--- + +# 2. Branching Model + +- `main` : toujours stable, toujours déployable. +- `develop` (optionnel) : branche d’intégration continue. +- Branches par fonctionnalité : + +```` + +feat/ +fix/ +chore/ +refactor/ +docs/ + +``` + +Exemples : + +- `feat/auth-refresh-tokens` +- `fix/jwt-uuid-mismatch` +- `refactor/chat-room-architecture` + +--- + +# 3. Convention de commits + +Suivre le style **Conventional Commits** : + +``` + +feat: ajout fonctionnalité +fix: correction de bug +chore: tâches automatiques, maj deps +docs: ajout ou mise à jour docs +refactor: restructuration sans changement de comportement +test: ajout/màj tests +ci: pipeline CI/CD + +```` + +Exemples : + +- `feat: add adaptive HLS transcoding worker` +- `fix: correct JWT user_id mismatch between Go and Rust` +- `refactor: isolate DM module in chat-server` + +--- + +# 4. Tests & Qualité + +Avant toute PR : + +1. Lancer les tests Go : + ```bash + go test ./... +```` + +2. Lancer les tests Rust : + + ```bash + cargo test + ``` + +3. Lancer les tests du frontend : + + ```bash + pnpm test + ``` + +4. Vérifier lfmt / clippy : + + ```bash + cargo fmt --all --check + cargo clippy -- -D warnings + ``` + +5. Vérifier go vet : + + ```bash + go vet ./... + ``` + +--- + +# 5. Pull Requests + +1. Toujours ouvrir une PR, même si vous êtes seul. +2. Décrire : + + * Contexte + * Changement + * Impact sur l'architecture ORIGIN + * Migrations nécessaires ? + * Compatibilité ascendante ? +3. Ajouter des captures si c’est du frontend. +4. Pas de merge si CI échoue. + +--- + +# 6. Documentation + +* Tout changement significatif doit être reflété dans `docs/`. +* Si une décision touche à l’architecture : mettre à jour la section `ORIGIN`. + +--- + +Merci de rendre Veza meilleur ! + + diff --git a/README.md b/README.md index c61acd5ef..ce2c4bad6 100644 --- a/README.md +++ b/README.md @@ -1 +1,105 @@ -# veza \ No newline at end of file +# 🌌 Veza — Plateforme créative et collaborative nouvelle génération + +Veza est une plateforme audio complète et modulaire : partage, streaming haute performance, collaboration, chat temps réel, marketplace, analytics, et gestion créative. +Conçue pour être **intensive**, **scalable** et **créatrice de communautés**, elle s'appuie sur une architecture hybride **Go + Rust + React** pensée pour durer. + +--- + +## 🏛️ Architecture (vue ultra-résumée) + +``` + +veza/ +│ +├── apps/ +│ ├── backend-api/ # API Go (auth, users, tracks, playlists…) +│ ├── chat-server/ # WebSocket Rust (rooms & DM) +│ ├── stream-server/ # Serveur audio Rust (FFmpeg, HLS) +│ └── web-frontend/ # Interface React/TS, Zustand, shadcn/ui +│ +├── infra/ +│ ├── docker/ # Images, scripts, entrypoints +│ ├── incus/ # Containers Dev/Prod +│ ├── ansible/ # Déploiement automatisé +│ └── k8s/ # (optionnel) Manifests Kubernetes +│ +├── docs/ +│ ├── ORIGIN/ # Spécifications "Constitution" +│ ├── ARCHITECTURE/ +│ ├── FEATURES/ +│ └── ROADMAP/ +│ +└── scripts/ +├── dev/ +├── ci/ +└── smoke-tests/ + +```` + +--- + +## 🚀 Lancer le projet en local (dev environment) + +**Pré-requis :** +- Go ≥ 1.22 +- Rust ≥ 1.75 +- pnpm ou npm +- Docker + docker-compose +- PostgreSQL + Redis + +### 1. Cloner le repo +```bash +git clone https://github.com/your-org/veza.git +cd veza +```` + +### 2. Lancer l’environnement de développement + +```bash +docker compose up -d +``` + +### 3. Lancer chaque service + +#### Backend Go + +```bash +cd apps/backend-api +go run cmd/server/main.go +``` + +#### Chat server (Rust) + +```bash +cd apps/chat-server +cargo run +``` + +#### Stream server (Rust) + +```bash +cd apps/stream-server +cargo run +``` + +#### Frontend + +```bash +cd apps/web-frontend +pnpm install +pnpm dev +``` + +--- + +## 📜 Licence + +Le projet est distribué sous licence **AGPL-3.0** (voir fichier `LICENSE`). + +--- + +## 🤝 Contributions + +Les contributions sont les bienvenues ! Voir `CONTRIBUTING.md`. + +