Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add flowchart #24

Merged
merged 8 commits into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,54 @@
The crawler identifies source repositories from registered [PURLs (Package URLs)][purl] and copies VEX documents into VEX Hub.
This process ensures that VEX Hub maintains an up-to-date collection of VEX documents for various software packages.

The following diagram illustrates the high-level process flow of the VEX Hub Crawler, using npm as an example:

```mermaid
flowchart TD
Dev[Developer] -->|1. Register Package| PL[Package List]
PL -->|2. Provide packages for crawling| Crawler
Crawler -->|3. Identify repository URL| Registry[Package Registry]
Crawler -->|4. Retrieve VEX documents| Src
Crawler -->|5. Validate and update VEX documents| Hub

subgraph crawler [VEX Hub Crawler]
Crawler
PL
end

subgraph bottom [ ]
direction LR
Registry
Src
Hub[VEX Hub]

subgraph Src[Source Repository]
direction TB
VEX[VEX documents\nunder .vex/ directory]
end
end


classDef dev fill:#b3d9ff,stroke:#2a4d69,stroke-width:1px,color:#2a4d69;
classDef vexHub fill:#ffd9e6,stroke:#4b3832,stroke-width:1px,color:#4b3832;
classDef crawler fill:#c2f0c2,stroke:#1e4d2b,stroke-width:1px,color:#1e4d2b;
classDef npmReg fill:#ffe6cc,stroke:#5e3023,stroke-width:1px,color:#5e3023;
classDef sourceRepo fill:#e6ccff,stroke:#3b2e58,stroke-width:1px,color:#3b2e58;
classDef pkgList fill:#ccf2ff,stroke:#1c4e5a,stroke-width:1px,color:#1c4e5a;
classDef invisible fill:none,stroke:none;

class Dev dev;
class Hub vexHub;
class crawler crawler;
class Registry npmReg;
class Src,VEX sourceRepo;
class PL pkgList;
class bottom invisible;
```

## Registering PURLs

VEX Hub maintains [a list of PURLs](./crawler.yaml) for discovering VEX documents.
VEX Hub Crawler maintains [a list of PURLs](./crawler.yaml) for discovering VEX documents.
The PURL definition file format is as follows:

```yaml
Expand Down