Skip to content

Commit 56176e7

Browse files
committed
Make first working versions of the examples
1 parent 8b9cb67 commit 56176e7

24 files changed

Lines changed: 1328 additions & 54 deletions

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Priorities, in order:
3030

3131
## Repository Layout
3232

33-
- `rust/graphrag-agent/`: Graph RAG application in Rust.
33+
- `rust/graphrag-agent/`: GraphRAG application in Rust.
3434
- `rust/code-explorer/`: Rust source code navigator and structural analyzer using PageRank.
3535
- `python/fraud/`: Cypher-based fraud pattern detection over transaction stream.
3636
- `python/recommendation/`: Hybrid user friend and content recommendation system.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ it has already been resolved.
3232

3333
The repository is organized around four showcase applications:
3434

35-
1. `rust/graphrag-agent`: Graph RAG application showcasing vector search, full-text search, and hybrid graph expansion.
35+
1. `rust/graphrag-agent`: GraphRAG application showcasing vector search, full-text search, and hybrid graph expansion.
3636
2. `rust/code-explorer`: Rust source code navigator illustrating structural graph analysis (PageRank, components, shortest path) on code syntax trees.
3737
3. `python/fraud`: Cypher-based fraud pattern detection over a simulated transaction stream.
3838
4. `python/recommendation`: Hybrid friend-of-friend and content recommendation system.

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,7 @@ setup-hooks: ## Install Git hooks (pre-commit and pre-push)
8282
test-hooks: ## Test Git hooks on all files
8383
@echo "Testing Git hooks..."
8484
@pre-commit run --all-files
85+
86+
.PHONY: shell
87+
shell: ## Enter the Nix development shell environment
88+
@nix develop

README.md

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,74 @@
11
## IssunDB Example Applications
22

3-
## Graph Benchmarks
4-
53
[![Tests](https://img.shields.io/github/actions/workflow/status/IssunDB/example-apps/tests.yml?label=tests&style=flat&labelColor=282c34&logo=github)](https://github.com/IssunDB/example-apps/actions/workflows/tests.yml)
64
[![Code Coverage](https://img.shields.io/codecov/c/github/IssunDB/example-apps?label=coverage&style=flat&labelColor=282c34&logo=codecov)](https://codecov.io/gh/IssunDB/example-apps)
75
[![Python version](https://img.shields.io/badge/python-%3E=3.10-3776ab?style=flat&labelColor=282c34&logo=python)](https://github.com/IssunDB/example-apps)
86
[![License: MIT](https://img.shields.io/badge/license-MIT-ffd343?style=flat&labelColor=282c34&logo=open-source-initiative)](LICENSE)
97

10-
This repository includes a collection of example applications that use the [IssunDB](https://github.com/IssunDB/issundb) graph database.
8+
This repository includes a collection of example applications that use the [IssunDB](https://github.com/IssunDB/issun-db) graph database.
9+
10+
---
11+
12+
### Examples
13+
14+
Currently, the following table lists the included examples:
15+
16+
| # | Example | Language | Description |
17+
|---|-------------------------------------------------------|----------|------------------------------------------------------------------------------------------|
18+
| 1 | [GraphRAG Pipeline](rust/graphrag-agent) | Rust | Knowledge graph extraction and retrieval-augmented generation using an LLM. |
19+
| 2 | [Codebase Explorer](rust/code-explorer) | Rust | Syntax dependency graph constructor and function ranking using PageRank. |
20+
| 3 | [Fraud Detection System](python/fraud) | Python | Real-time financial transaction stream analyzer using Cypher queries. |
21+
| 4 | [Social Recommendation System](python/recommendation) | Python | Hybrid friend and content recommender using collaborative filtering and semantic search. |
1122

1223
---
1324

1425
### Quickstart
1526

16-
To be added.
27+
#### Prerequisites
28+
29+
To build and run the example applications, you need:
30+
31+
- Rust (version 1.85 or newer) toolchain: [Install Rust](https://www.rust-lang.org/tools/install)
32+
- Python (version 3.10 or newer) with `uv` package manager: [Install uv](https://github.com/astral-sh/uv)
33+
34+
#### Setup
35+
36+
1. Clone the repository:
37+
```bash
38+
git clone https://github.com/IssunDB/example-apps.git
39+
cd example-apps
40+
```
41+
42+
2. Set up the Python virtual environment and install dependencies:
43+
```bash
44+
uv sync --all-extras
45+
```
46+
47+
3. Build the Rust applications:
48+
```bash
49+
make build
50+
```
51+
52+
#### Running the Demos
53+
54+
You can run any of the demos using the provided `Makefile` targets:
55+
56+
- Run the GraphRAG pipeline:
57+
```bash
58+
make demo-grag
59+
```
60+
- Run the Codebase Explorer:
61+
```bash
62+
make demo-code-exp
63+
```
64+
- Run the Fraud Detection stream:
65+
```bash
66+
make demo-fraud
67+
```
68+
- Run the Social Recommendation system:
69+
```bash
70+
make demo-recommend
71+
```
1772

1873
---
1974

assets/diagrams/code_explorer.dot

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
digraph CodebaseExplorer {
2+
fontname = "Helvetica,Arial,sans-serif"
3+
layout = dot
4+
rankdir = TB
5+
ranksep = 0.5
6+
nodesep = 0.4
7+
splines = true
8+
bgcolor = "white"
9+
10+
node [
11+
fontname = "Helvetica,Arial,sans-serif",
12+
shape = rect,
13+
style = "filled",
14+
color = "#475569",
15+
fillcolor = "white",
16+
penwidth = 1.4,
17+
margin = "0.16,0.10"
18+
]
19+
20+
edge [
21+
fontname = "Helvetica,Arial,sans-serif",
22+
fontsize = 10,
23+
color = "#475569",
24+
fontcolor = "#475569",
25+
penwidth = 1.2
26+
]
27+
28+
// Nodes
29+
sources [label = "Rust Source Files\n(.rs)", fillcolor = "#DBEAFE", color = "#2563EB"]
30+
31+
subgraph cluster_parsing {
32+
label = "1. Parse & Analyze"
33+
style = "rounded"
34+
color = "#2563EB"
35+
fillcolor = "#F8FAFC"
36+
penwidth = 1.4
37+
margin = 12
38+
39+
syn_parse [label = "syn AST Parsing", fillcolor = "#F1F5F9"]
40+
extract_defs [label = "Extract Definitions\n(modules, functions, structs)", fillcolor = "#F1F5F9"]
41+
extract_deps [label = "Extract Dependencies\n(calls, imports, definitions)", fillcolor = "#F1F5F9"]
42+
}
43+
44+
subgraph cluster_storage {
45+
label = "2. Graph Storage"
46+
style = "rounded"
47+
color = "#7C3AED"
48+
fillcolor = "#F8FAFC"
49+
penwidth = 1.4
50+
margin = 12
51+
52+
db_nodes [label = "Store Nodes\n(labeled AST elements)", fillcolor = "#F3E8FF", color = "#7C3AED"]
53+
db_edges [label = "Store Edges\n(typed relations)", fillcolor = "#F3E8FF", color = "#7C3AED"]
54+
db_csr [label = "Build CSR Matrix\n(in-memory adjacency)", fillcolor = "#F3E8FF", color = "#7C3AED"]
55+
}
56+
57+
subgraph cluster_ranking {
58+
label = "3. Analysis & Ranking"
59+
style = "rounded"
60+
color = "#16A34A"
61+
fillcolor = "#F8FAFC"
62+
penwidth = 1.4
63+
margin = 12
64+
65+
pagerank [label = "PageRank Solver", fillcolor = "#F1F5F9"]
66+
rankings [label = "Ranked Functions\n(top critical symbols)", fillcolor = "#DCFCE7", color = "#16A34A"]
67+
}
68+
69+
// Edges
70+
sources -> syn_parse
71+
syn_parse -> extract_defs
72+
syn_parse -> extract_deps
73+
74+
extract_defs -> db_nodes
75+
extract_deps -> db_edges
76+
77+
db_nodes -> db_csr
78+
db_edges -> db_csr
79+
80+
db_csr -> pagerank
81+
pagerank -> rankings
82+
}

assets/diagrams/code_explorer.svg

Lines changed: 208 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)