Skip to content
Merged
Show file tree
Hide file tree
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
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ An interactive knowledge graph browser with guided tours. Graph data is declared

## Features

- Force-directed graph layout (fCoSE) with adaptive spacing
- Selectable graph layouts: fCoSE, ELK, Cola, Dagre, Concentric
- Click to focus, depth controls (1/2/3/All) for neighborhood size
- Hover nodes and edges for descriptions
- Full-text search across all labels and descriptions
- Guided tours with narrative text and inline links
- Fully data-driven: title, kinds, colors, shapes all from config
- **Universal viewer**: browse any repo's graph via `?repo=owner/repo`
- **Repo management**: add, switch, and delete repos from a left panel
- **Per-repo state**: each repo remembers selected node, depth, tutorial progress
- **Per-repo state**: each repo remembers selected node, depth, tutorial progress, and explicit layout choice
- **Dual output**: `lib` (embeddable viewer) and `app` (hosted universal viewer)
- **Deep-linking**: share `?repo=owner/repo` URLs that auto-load
- **Token support**: encrypted storage for private repo access
Expand Down Expand Up @@ -126,6 +126,25 @@ In this mode:
}
```

### `data/queries.json` (optional)

Query catalog entries can drive the left-hand query panel. Queries tagged with `"view"` act as named graph views, and can declare an optional default layout.

```json
[
{
"id": "build-validation",
"name": "Build & Validation",
"description": "CI and validation flow.",
"sparql": "SELECT ?node WHERE { ?node ?p ?o }",
"tags": ["view"],
"layout": "dagre"
}
]
```

Supported layout IDs are `fcose`, `elk`, `cola`, `dagre`, and `concentric`. An authored `layout` is the default for that view until the user explicitly picks a different layout for the repo.

### `data/views/<name>.json` (optional)

Views filter the graph into topic-specific subgraphs. Each view selects edges by triple and includes its own tours.
Expand All @@ -134,6 +153,7 @@ Views filter the graph into topic-specific subgraphs. Each view selects edges by
{
"name": "My Topic",
"description": "A focused lens on this topic.",
"layout": "concentric",
"edges": [
["node-a", "node-b", "relates to"],
["node-c", "node-d", "depends on"]
Expand All @@ -151,6 +171,8 @@ Views filter the graph into topic-specific subgraphs. Each view selects edges by
}
```

Legacy view files also support the same optional `layout` field and layout IDs as `data/queries.json`.

A `data/views/index.json` listing available views must also be committed:

```json
Expand Down Expand Up @@ -306,6 +328,7 @@ That gives downstream applications an explicit contract: they are free to define
Validate your data against the schemas in [`schema/`](schema/):

- [`config.schema.json`](schema/config.schema.json) — configuration
- [`query-catalog.schema.json`](schema/query-catalog.schema.json) — query catalog and query-backed views
- [`tutorial.schema.json`](schema/tutorial.schema.json) — guided tour
- [`tutorial-index.schema.json`](schema/tutorial-index.schema.json) — tour list
- [`view.schema.json`](schema/view.schema.json) — view (subgraph lens with tours)
Expand Down
126 changes: 126 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
},
"dependencies": {
"cytoscape": "^3.33.1",
"cytoscape-cola": "^2.5.1",
"cytoscape-dagre": "^2.5.0",
"cytoscape-elk": "^2.3.0",
"cytoscape-fcose": "^2.2.0",
"oxigraph": "^0.5.6"
}
Expand Down
5 changes: 5 additions & 0 deletions schema/query-catalog.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"items": { "type": "string" },
"default": [],
"description": "Tags for categorization (e.g. 'view', 'tour:guide-name')."
},
"layout": {
"type": "string",
"enum": ["fcose", "elk", "cola", "dagre", "concentric"],
"description": "Optional default layout when this query is used as a view."
}
},
"additionalProperties": false
Expand Down
5 changes: 5 additions & 0 deletions schema/view.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"type": "string",
"description": "Short description shown in the view picker."
},
"layout": {
"type": "string",
"enum": ["fcose", "elk", "cola", "dagre", "concentric"],
"description": "Optional default layout for this view."
},
"edges": {
"type": "array",
"description": "Edge references as [source, target, label] triples.",
Expand Down
Loading
Loading