|
| 1 | +# Agent Instructions — baseVISION iris-web |
| 2 | + |
| 3 | +This is a fork of [dfir-iris/iris-web](https://github.com/dfir-iris/iris-web) maintained by baseVISION. |
| 4 | +The upstream project is a DFIR case-management platform (Python/Flask backend, SvelteKit frontend, PostgreSQL). |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## Branch Structure |
| 9 | + |
| 10 | +| Branch | Purpose | Push rules | |
| 11 | +|---|---|---| |
| 12 | +| `bv-main` | Production-stable. Tagged releases deploy to AKS prod. | PR only, 1 approval + CI green | |
| 13 | +| `bv-develop` | Integration branch. Pushes auto-deploy to AKS staging. | Direct push allowed; PR preferred | |
| 14 | +| `origin/master` | Upstream master mirror — **never modify** | Read-only | |
| 15 | +| `origin/develop` | Upstream develop mirror — **never modify** | Read-only | |
| 16 | + |
| 17 | +Short-lived branches (delete after merge): |
| 18 | + |
| 19 | +| Pattern | Target | Purpose | |
| 20 | +|---|---|---| |
| 21 | +| `fix/<name>` | `bv-develop` | Bug fix | |
| 22 | +| `feature/<name>` | `bv-develop` | New feature | |
| 23 | +| `release/<version>` | `bv-main` | Release prep | |
| 24 | +| `sync/upstream-<date>` | `bv-develop` | Upstream merge | |
| 25 | +| `contrib/<name>` | upstream `develop` | Contribution to dfir-iris | |
| 26 | + |
| 27 | +**Preferred:** branch from `bv-develop`, open a PR, merge. Direct pushes to `bv-develop` are allowed but should be reserved for trivial changes. `bv-main` is protected — PRs only. Exception: `contrib/` branches must be branched from `upstream/develop`. |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +## Commit Message Convention |
| 32 | + |
| 33 | +Every commit must start with one of these prefixes: |
| 34 | + |
| 35 | +| Prefix | Meaning | Contribute upstream? | |
| 36 | +|---|---|---| |
| 37 | +| `[FIX]` | Bug fix | Yes — cherry-pick candidate | |
| 38 | +| `[IMP]` | Improvement | Yes — cherry-pick candidate | |
| 39 | +| `[ADD]` | New feature | Case by case | |
| 40 | +| `[BV]` | baseVISION-internal | **Never** | |
| 41 | +| `[BV-FIX]` | Fix specific to BV infra/config | **Never** | |
| 42 | + |
| 43 | +**Rule:** commits without a `[BV]` prefix must be clean enough to open a PR on upstream without modification. Do not mix BV-specific logic with upstream-eligible commits. |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +## Key Workflows |
| 48 | + |
| 49 | +### Normal fix or feature |
| 50 | + |
| 51 | +```bash |
| 52 | +git checkout bv-develop && git pull origin bv-develop |
| 53 | +git checkout -b fix/<name> |
| 54 | +# make changes, commit with [FIX]/[IMP]/[ADD]/[BV] prefix |
| 55 | +git push origin fix/<name> |
| 56 | +# Open PR → bv-develop |
| 57 | +# Delete branch after merge |
| 58 | +``` |
| 59 | + |
| 60 | +### Release to production |
| 61 | + |
| 62 | +```bash |
| 63 | +git checkout bv-develop && git pull |
| 64 | +git checkout -b release/<version> # e.g. release/2.5.0-bv1 |
| 65 | +# Bump version in: |
| 66 | +# source/app/configuration.py → IRIS_VERSION = "v<version>" |
| 67 | +# README.md |
| 68 | +# docker-compose.yml |
| 69 | +git commit -m "[BV] Bump version to <version>" |
| 70 | +git push origin release/<version> |
| 71 | +# Open PR → bv-main (requires 1 review + CI) |
| 72 | +# After merge: tag vX.Y.Z-bvN and push tag → triggers AKS prod deploy |
| 73 | +``` |
| 74 | + |
| 75 | +### Syncing upstream bugfixes |
| 76 | + |
| 77 | +```bash |
| 78 | +git fetch upstream |
| 79 | +git checkout -b sync/upstream-<YYYY-MM> bv-develop |
| 80 | +git merge upstream/develop # resolve conflicts |
| 81 | +git push origin sync/upstream-<YYYY-MM> |
| 82 | +# Open PR → bv-develop |
| 83 | +``` |
| 84 | + |
| 85 | +### Contributing a fix back to upstream |
| 86 | + |
| 87 | +```bash |
| 88 | +git checkout -b contrib/<name> upstream/develop # branch from upstream, NOT bv-develop |
| 89 | +git cherry-pick <commit-hash> # only commits WITHOUT [BV] prefix |
| 90 | +git push origin contrib/<name> |
| 91 | +# Open PR on github.com/dfir-iris/iris-web targeting their develop branch |
| 92 | +# Delete branch after upstream merge |
| 93 | +``` |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +## Version Numbering |
| 98 | + |
| 99 | +- Format: `vX.Y.Z-bvN` (e.g. `v2.5.0-bv1`) |
| 100 | +- `source/app/configuration.py` contains `IRIS_VERSION` — this is the canonical version string |
| 101 | +- `.bumpversion.cfg` controls automated bumping across `configuration.py`, `README.md`, and `docker-compose.yml` |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## CI / GitHub Actions |
| 106 | + |
| 107 | +| Workflow | Trigger | Purpose | |
| 108 | +|---|---|---| |
| 109 | +| `ci.yml` | All pushes and PRs | Static checks, Docker builds, API tests, DB migration tests, e2e tests | |
| 110 | +| `build-webApp.yml` | Manual only (disabled) | GHCR publish — replaced by Azure DevOps + ACR | |
| 111 | +| `build-db.yml` | Manual only (disabled) | GHCR publish — replaced by Azure DevOps + ACR | |
| 112 | +| `build-nginx.yml` | Manual only (disabled) | GHCR publish — replaced by Azure DevOps + ACR | |
| 113 | +| `chart-releaser.yml` | Push to `bv-main` or manual | Helm chart release | |
| 114 | + |
| 115 | +CI must be green before any PR can be merged. The relevant required check is named **"Continuous Integration"**. |
| 116 | + |
| 117 | +--- |
| 118 | + |
| 119 | +## Important Files |
| 120 | + |
| 121 | +| File | Purpose | |
| 122 | +|---|---| |
| 123 | +| `source/app/configuration.py` | App config including `IRIS_VERSION` | |
| 124 | +| `source/requirements.txt` | Python dependencies | |
| 125 | +| `docker-compose.yml` | Production compose (references version tag) | |
| 126 | +| `docker-compose.bv.yml` | Development compose (used by CI and local dev) | |
| 127 | +| `docker/webApp/Dockerfile` | App image | |
| 128 | +| `docker/db/Dockerfile` | DB image | |
| 129 | +| `docker/nginx/Dockerfile` | Nginx image | |
| 130 | +| `deploy/kubernetes/` | Helm charts for AKS | |
| 131 | +| `.bumpversion.cfg` | Version bump configuration | |
| 132 | +| `BV-DEV-CONCEPT.md` | Full fork strategy and open decisions (not committed to branches) | |
| 133 | + |
| 134 | +--- |
| 135 | + |
| 136 | +## Do Not |
| 137 | + |
| 138 | +- Do **not** push directly to `bv-main` or `bv-develop` — always use a PR |
| 139 | +- Do **not** commit to or rebase `origin/master` or `origin/develop` — they are upstream mirrors |
| 140 | +- Do **not** include `[BV]`-prefixed commits in `contrib/` branches |
| 141 | +- Do **not** push BV-internal config (secrets, ACR credentials, AKS manifests with cluster details) to any branch |
0 commit comments