Files
security-alert-center/docs/workspace-three-repos.md
T
PTah 36ccfc9471 chore(docs): GitHub URLs in README/docs, remove .cursor from repo
Replace git.kalinamall.ru links with github.com/PTah in public docs.
Add Rewrite-GitHostUrls.ps1 and Push-Mirror.ps1 for kalinamall mirror pushes.
Add .cursor/ to .gitignore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 11:37:20 +10:00

94 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Multi-root workspace: три репозитория
Как работать в одном multi-root workspace над **ssh-monitor**, **RDP-login-monitor** и **security-alert-center** одновременно (VS Code или совместимый редактор).
---
## 1. Расположение репозиториев (пример)
| Имя в workspace | Путь (пример Windows) | Публичный remote |
|-----------------|----------------------|------------------|
| `ssh-monitor` | `D:\Soft\Git\ssh-monitor` | github.com/PTah/ssh-monitor |
| `rdp-monitor` | `D:\Soft\Git\RDP-login-monitor` | github.com/PTah/RDP-login-monitor |
| `security-alert-center` | `D:\Soft\Git\security-alert-center` | github.com/PTah/security-alert-center |
Пути подставьте свои. Закрытый инстанс **git.kalinamall.ru** — зеркало с теми же репозиториями; ссылки в документации на каждом хосте должны вести **на этот же хост** (см. ниже).
---
## 2. Файл workspace
Создайте `security-monitors.code-workspace`:
```json
{
"folders": [
{ "path": "D:/Soft/Git/ssh-monitor", "name": "ssh-monitor" },
{ "path": "D:/Soft/Git/RDP-login-monitor", "name": "rdp-monitor" },
{ "path": "D:/Soft/Git/security-alert-center", "name": "security-alert-center" }
],
"settings": {
"files.eol": "\n"
}
}
```
Открыть: **File → Open Workspace from File**.
---
## 3. Порядок работ по фазам
| Фаза | Где править |
|------|-------------|
| 0 — ТЗ | `security-alert-center/docs/` |
| 1 — MVP SAC | `security-alert-center/backend`, `frontend` |
| 2 — UseSAC | `ssh-monitor`, `RDP-login-monitor` + мелкие правки SAC при необходимости |
---
## 4. Соглашения
- Контракт событий: `security-alert-center/schemas/event-schema-v1.json`**единственный источник истины**.
- Изменение схемы → обновить ТЗ + версию `schema_version` + оба агента.
- Коммиты в три репо **раздельные**; связь через теги/версии в README (см. [roadmap.md](roadmap.md)).
### 4.1. Git: зеркала и ссылки в документации
В **main** ссылки между репозиториями указывают на **GitHub** (`https://github.com/PTah/...`).
Перед push на другой хост (kalinamall, papatramp) используйте скрипт зеркалирования — он подменяет URL в docs, пушит и **не оставляет** чужие ссылки в локальной ветке:
```powershell
# security-alert-center (аналогичные скрипты — в соседних репо при необходимости)
.\scripts\Rewrite-GitHostUrls.ps1 kalinamall # только проверка diff
.\scripts\Push-Mirror.ps1 kalinamall # commit → push kalinamall → reset main
.\scripts\Push-Mirror.ps1 github # push на GitHub после обычного commit
```
Обычный цикл разработки:
```bash
git add …
git commit -m "…"
git push github main
# при необходимости синхронизировать kalinamall:
# PowerShell: .\scripts\Push-Mirror.ps1 kalinamall
```
---
## 5. URL репозиториев (GitHub)
| Проект | URL |
|--------|-----|
| security-alert-center | `https://github.com/PTah/security-alert-center.git` |
| ssh-monitor | `https://github.com/PTah/ssh-monitor.git` |
| RDP-login-monitor | `https://github.com/PTah/RDP-login-monitor.git` |
---
## См. также
- [work-plan.md](work-plan.md) фаза 0.6