Skip to content

Commit 5c59c9d

Browse files
committed
WIP
1 parent 088a703 commit 5c59c9d

22 files changed

Lines changed: 1235 additions & 20 deletions

File tree

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: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ This repository includes a collection of example applications that use the [Issu
1313

1414
Currently, the following table lists the included examples:
1515

16-
| # | Example | Language | Description | Demo Command |
17-
|---|-------------------------------------------------------|----------|------------------------------------------------------------------------------------------|-----------------------|
18-
| 1 | [Graph RAG Pipeline](rust/graphrag-agent) | Rust | Knowledge graph extraction and retrieval-augmented generation using an LLM. | `make demo-grag` |
19-
| 2 | [Codebase Explorer](rust/code-explorer) | Rust | Syntax dependency graph constructor and function ranking using PageRank. | `make demo-code-exp` |
20-
| 3 | [Fraud Detection System](python/fraud) | Python | Real-time financial transaction stream analyzer using Cypher queries. | `make demo-fraud` |
21-
| 4 | [Social Recommendation System](python/recommendation) | Python | Hybrid friend and content recommender using collaborative filtering and semantic search. | `make demo-recommend` |
16+
| # | Example | Language | Description |
17+
|---|-------------------------------------------------------|----------|------------------------------------------------------------------------------------------|
18+
| 1 | [Graph RAG 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. |
2222

2323
---
2424

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

assets/diagrams/fraud.dot

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
digraph FraudDetection {
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+
generator [label = "Stream Generator\n(accounts & registrations)", fillcolor = "#DBEAFE", color = "#2563EB"]
30+
31+
subgraph cluster_ingestion {
32+
label = "1. Transaction Ingestion"
33+
style = "rounded"
34+
color = "#2563EB"
35+
fillcolor = "#F8FAFC"
36+
penwidth = 1.4
37+
margin = 12
38+
39+
parse_evt [label = "Parse Stream Event", fillcolor = "#F1F5F9"]
40+
graph_insert [label = "Insert Nodes & Edges\n(IssunDB)", fillcolor = "#DBEAFE", color = "#2563EB"]
41+
}
42+
43+
subgraph cluster_detection {
44+
label = "2. Real-Time Detection"
45+
style = "rounded"
46+
color = "#D97706"
47+
fillcolor = "#F8FAFC"
48+
penwidth = 1.4
49+
margin = 12
50+
51+
cypher_queries [label = "Execute Cypher Queries\n(concurrent checks)", fillcolor = "#FEF3C7", color = "#D97706"]
52+
shared_devices [label = "Shared Device Detection", fillcolor = "#F1F5F9"]
53+
circular_transfers [label = "Circular Transfer Rings", fillcolor = "#F1F5F9"]
54+
}
55+
56+
alerts [label = "Fraud Alerts\n(suspicious entities marked)", fillcolor = "#FEE2E2", color = "#EF4444"]
57+
58+
// Edges
59+
generator -> parse_evt
60+
parse_evt -> graph_insert
61+
62+
graph_insert -> cypher_queries
63+
cypher_queries -> shared_devices
64+
cypher_queries -> circular_transfers
65+
66+
shared_devices -> alerts
67+
circular_transfers -> alerts
68+
}

0 commit comments

Comments
 (0)