22
33## What This Project Is
44
5- ** OSSCodeIQ** -- a CLI tool + server that scans codebases to build a deterministic code knowledge graph. No AI, no external APIs -- pure static analysis. 106 detectors, 35+ languages, Neo4j Embedded graph database, Hazelcast distributed cache, Spring AI MCP server, REST API, web UI.
5+ ** OSSCodeIQ** -- a CLI tool + server that scans codebases to build a deterministic code knowledge graph. No AI, no external APIs -- pure static analysis. 97 detectors, 35+ languages, Neo4j Embedded graph database, Hazelcast distributed cache, Spring AI MCP server, REST API, web UI.
66
77- ** Maven coordinates:** ` io.github.randomcodespace.iq:code-iq `
88- ** CLI command:** ` code-iq ` (via ` java -jar ` )
99- ** Java package:** ` io.github.randomcodespace.iq ` (under ` src/main/java/ ` )
1010- ** GitHub repo:** ` RandomCodeSpace/code-iq ` (branch: ` java ` )
11- - ** Cache directory on disk:** ` .code-intelligence ` (SQLite analysis cache)
11+ - ** Cache directory on disk:** ` .code-intelligence ` (H2 analysis cache)
1212- ** Config file:** ` .osscodeiq.yml ` (project-level overrides)
1313
1414## Tech Stack
2222- ANTLR 4.13.2 (TypeScript/JavaScript, Python, Go, C#, Rust, C++ grammars)
2323- Picocli 4.7.7 (CLI framework, integrated with Spring Boot)
2424- Thymeleaf + HTMX (web UI)
25- - SQLite JDBC (incremental analysis cache)
25+ - H2 (incremental analysis cache)
2626
2727## Architecture
2828
@@ -43,7 +43,7 @@ FileDiscovery --> Parsers --> Detectors (virtual threads) --> GraphBuilder (buff
4343- ** Linkers** -- run after all detectors: ` TopicLinker ` , ` EntityLinker ` , ` ModuleContainmentLinker `
4444- ** LayerClassifier** -- sets ` layer ` property on every node: ` frontend | backend | infra | shared | unknown `
4545- ** GraphStore** -- facade over Neo4j, delegates Cypher operations
46- - ** AnalysisCache** -- SQLite -backed file hash cache for incremental analysis
46+ - ** AnalysisCache** -- H2 -backed file hash cache for incremental analysis
4747
4848### Spring Profiles
4949- ** ` indexing ` ** -- active during CLI analyze/stats/graph/query/find/flow/bundle/cache/plugins commands. Starts Neo4j Embedded, runs analysis pipeline.
@@ -57,8 +57,8 @@ io.github.randomcodespace.iq
5757 |-- analyzer/ # Pipeline: Analyzer, FileDiscovery, GraphBuilder, LayerClassifier
5858 | |-- linker/ # Cross-file linkers: TopicLinker, EntityLinker, ModuleContainmentLinker
5959 |-- api/ # REST controllers: GraphController, FlowController
60- |-- cache/ # AnalysisCache (SQLite ), FileHasher
61- |-- cli/ # Picocli commands (12 commands + CodeIqCli parent + CliOutput helper)
60+ |-- cache/ # AnalysisCache (H2 ), FileHasher
61+ |-- cli/ # Picocli commands (14 commands + CodeIqCli parent + CliOutput helper)
6262 |-- config/ # Spring config: Neo4jConfig, HazelcastConfig, CodeIqConfig, JacksonConfig
6363 |-- detector/ # Detector interface + 97 concrete detectors
6464 | |-- auth/ # LDAP, certificate, session/header auth
@@ -84,7 +84,7 @@ io.github.randomcodespace.iq
8484 |-- graph/ # GraphStore (facade), GraphRepository (Spring Data Neo4j)
8585 |-- health/ # GraphHealthIndicator (Spring Actuator)
8686 |-- mcp/ # McpTools (21 Spring AI @Tool methods)
87- |-- model/ # CodeNode, CodeEdge, NodeKind (31 ), EdgeKind (26 )
87+ |-- model/ # CodeNode, CodeEdge, NodeKind (32 ), EdgeKind (27 )
8888 |-- query/ # QueryService (graph queries), StatsService (categorized stats)
8989 |-- web/ # ExplorerController (Thymeleaf web UI)
9090```
@@ -104,7 +104,7 @@ io.github.randomcodespace.iq
104104
105105### Virtual Thread Safety
106106- All file I/O and Neo4j operations run on virtual threads
107- - The SQLite analysis cache uses ` synchronized ` blocks for thread safety
107+ - The H2 analysis cache uses ` synchronized ` blocks for thread safety
108108- Hazelcast cache operations are thread-safe by design
109109- Detectors MUST be stateless -- Spring ` @Component ` beans are singletons
110110
@@ -239,8 +239,8 @@ mvn checkstyle:check
239239| ` detector/AbstractRegexDetector.java ` | Base class for regex detectors |
240240| ` detector/AbstractJavaParserDetector.java ` | Base class for JavaParser-based detectors |
241241| ` detector/AbstractAntlrDetector.java ` | Base class for ANTLR-based detectors |
242- | ` model/NodeKind.java ` | 31 node types enum |
243- | ` model/EdgeKind.java ` | 26 edge types enum |
242+ | ` model/NodeKind.java ` | 32 node types enum |
243+ | ` model/EdgeKind.java ` | 27 edge types enum |
244244| ` model/CodeNode.java ` | Graph node entity (Spring Data Neo4j) |
245245| ` model/CodeEdge.java ` | Graph edge entity (Spring Data Neo4j) |
246246| ` graph/GraphStore.java ` | Neo4j facade |
@@ -249,7 +249,7 @@ mvn checkstyle:check
249249| ` config/HazelcastConfig.java ` | Hazelcast cache configuration |
250250| ` config/CodeIqConfig.java ` | Application configuration properties |
251251| ` config/ProjectConfigLoader.java ` | Loads .osscodeiq.yml overrides |
252- | ` cache/AnalysisCache.java ` | SQLite incremental cache |
252+ | ` cache/AnalysisCache.java ` | H2 incremental cache |
253253| ` api/GraphController.java ` | REST API endpoints |
254254| ` api/FlowController.java ` | Flow diagram endpoints |
255255| ` mcp/McpTools.java ` | 21 MCP tool definitions (Spring AI @Tool ) |
@@ -291,7 +291,7 @@ Placed in the codebase root, loaded by `ProjectConfigLoader` before analysis.
291291- ** Neo4j deprecation warnings** : ` CodeEdge ` uses Long IDs (deprecated). Plan to migrate to external IDs.
292292- ** MCP warnings in CLI mode** : "No tool/resource/prompt/complete methods found" -- expected when not in ` serving ` profile.
293293- ** XML DOCTYPE warnings** : Non-fatal stderr from XML parser encountering DOCTYPE declarations.
294- - ** Virtual thread pinning** : SQLite JDBC operations can pin carrier threads. Use ` synchronized ` blocks (not ` ReentrantLock ` ) for virtual thread compatibility.
294+ - ** Virtual thread pinning** : H2 JDBC operations can pin carrier threads. Use ` synchronized ` blocks (not ` ReentrantLock ` ) for virtual thread compatibility.
295295- ** ANTLR generated sources** : Generated during ` mvn generate-sources ` from ` .g4 ` files. Do not edit generated code in ` grammar/ ` subdirectories.
296296- ** Graph builder determinism** : Uses indexed result slots (not append order) to ensure virtual thread completion order does not affect output.
297297
0 commit comments