Skip to content

Commit 5a3a3e5

Browse files
committed
docs(architecture): init monorepo layout
1 parent 8ceb726 commit 5a3a3e5

6 files changed

Lines changed: 96 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,17 @@ Analysis complete!
664664

665665
The design goal is to keep scanning concerns, report rendering, and AI-agent onboarding separate enough that we can keep adding rules without tangling the developer workflow around them.
666666

667+
### Monorepo Layout (Init)
668+
669+
We initialized a clean layout for a future backend/frontend split while keeping the current Rust crate stable:
670+
671+
- `apps/cli` placeholder for the CLI app crate
672+
- `packages/core` placeholder for the Rust engine + rules crate
673+
- `apps/frontend` placeholder for a web UI or TUI shell
674+
- `editors/vscode` for the current VS Code extension
675+
676+
See `docs/ARCHITECTURE.md` and `docs/STRUCTURE.md` for the full plan and the migration checklist.
677+
667678
## One-Page System Data Flow
668679

669680
1. **Input**

apps/cli/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# verifyOS CLI (placeholder)
2+
3+
This folder is reserved for the future CLI crate when the repo becomes a Cargo workspace.
4+
5+
For now, the CLI lives in the repository root (`src/`).

apps/frontend/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# verifyOS Frontend (placeholder)
2+
3+
This folder is reserved for a future web UI or TUI shell.
4+
5+
The Rust backend remains the source of truth; frontend surfaces should consume `voc` outputs instead of duplicating rules.

docs/ARCHITECTURE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Architecture
2+
3+
This repo is evolving into a multi-surface product: a Rust backend (scanner + engine), a CLI, and editor/front-end clients.
4+
5+
## Target Layout (Init)
6+
7+
```
8+
apps/
9+
cli/ # Rust CLI entrypoint (voc)
10+
frontend/ # Web UI or TUI shell (future)
11+
packages/
12+
core/ # Rust engine + rules + report model
13+
editors/
14+
vscode/ # VS Code extension (LSP + Action Center)
15+
docs/
16+
ARCHITECTURE.md # This document
17+
STRUCTURE.md # Tree + ownership notes
18+
```
19+
20+
## Mapping From Current Repo
21+
22+
We keep the existing Rust crate at the repo root for stability while we bootstrap the new layout.
23+
24+
- `src/` today is the functional core and CLI.
25+
- `editors/vscode/` already maps cleanly to the `editors/` area.
26+
- `apps/cli` and `packages/core` are created as placeholders until we are ready to split into a workspace.
27+
28+
## Why This Split
29+
30+
- **Backend (Rust)** remains the single source of truth for rules, evidence, and repair hints.
31+
- **Frontend** (web/TUI) can focus on UX without duplicating logic.
32+
- **Editor clients** stay thin and launch `voc lsp` so diagnostics are always consistent with CLI.
33+
34+
## Migration Plan (When Ready)
35+
36+
1. Create a Cargo workspace at the root.
37+
2. Move current `src/` into `packages/core`.
38+
3. Add `apps/cli` crate that depends on `packages/core`.
39+
4. Keep `editors/vscode` unchanged (it shells out to `voc`).
40+
41+
This keeps CI stable and avoids breaking existing releases while we grow the product.

docs/STRUCTURE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Repository Structure
2+
3+
```
4+
.
5+
├── apps/
6+
│ ├── cli/ # CLI app shell (future workspace split)
7+
│ └── frontend/ # Web UI or TUI shell (future)
8+
├── packages/
9+
│ └── core/ # Rust engine + rules + reports (future)
10+
├── editors/
11+
│ └── vscode/ # VS Code extension
12+
├── docs/
13+
│ ├── ARCHITECTURE.md # Design overview
14+
│ └── STRUCTURE.md # This file
15+
├── src/ # Current Rust core + CLI (active today)
16+
├── tests/ # Regression tests
17+
└── examples/ # Fixtures
18+
```
19+
20+
## Ownership Notes
21+
22+
- `src/` is still the live backend/CLI implementation.
23+
- `apps/` and `packages/` are initialized to guide the eventual workspace split.
24+
- `editors/` is production-ready and ships the VS Code extension.

packages/core/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# verifyOS Core (placeholder)
2+
3+
This folder is reserved for the future `verifyos-core` crate that will hold:
4+
5+
- rules
6+
- parsers
7+
- report models
8+
- engine orchestration
9+
10+
For now, these live in the root `src/` directory.

0 commit comments

Comments
 (0)