Repository navigation
Getting Started and Onboarding
This guide covers everything you need to set up, build, and operate CodeLens on your local workstation or enterprise server.
CodeLens is built with modern Java and requires:
-
Java Runtime: JDK / JRE 17 or higher (
java -version). - Operating System: macOS (Intel & Apple Silicon), Linux (Ubuntu, Debian, RHEL, CentOS, Arch), or Windows 10/11.
-
Hardware Requirements:
- Minimum: 2 CPU cores, 1 GB available RAM, 500 MB disk space.
- Recommended (50k+ classes): 4+ CPU cores, 4–8 GB available RAM, SSD storage.
CodeLens was engineered specifically for corporate and security-restricted environments:
- No Root / Sudo / Administrator Permissions Required: Runs completely as an unprivileged user process.
-
Unprivileged Port Binding: Binds to port
7878by default (any port>1024does not require superuser elevation). -
Local Data Confinement: Persists its embedded H2 database, Lucene inverted index, and cache files strictly to
./codelens-data/in the working directory (or a custom path via-Dcodelens.data=...), never touching system directories (/etc,/var,C:\Program Files). -
Portable JRE Support: On locked-down enterprise Windows machines without an installed JDK, download an archive build of Eclipse Temurin 17 JRE, unpack it into a personal folder (e.g.
C:\Users\username\jre17), and launch CodeLens directly:C:\Users\username\jre17\bin\java.exe -jar codelens-app.jar
CodeLens uses an optimized two-JAR architecture:
-
codelens-app.jar(~1.1 MB): Application logic, REST endpoints, HTML/CSS/JS web assets, and analysis algorithms. -
codelens-deps.jar(~22 MB): Pre-extracted third-party dependencies (Javalin, Jetty, Jackson, Lucene, JavaParser, JGit, H2, HikariCP, JGraphT).
# macOS / Linux
./mvnw clean package -DskipTests
# Windows Command Prompt / PowerShell
.\mvnw.cmd clean package -DskipTestsWhy Two JARs? In enterprise development, third-party libraries change infrequently. By isolating dependencies into
codelens-deps.jar, incremental feature updates tocodelens-app.jarcompile and package in ~3 to 4 seconds, enabling rapid development cycles.
java -jar codelens-app/target/codelens-app.jarOnce the ASCII banner displays, navigate to:
http://localhost:7878
# Specify a custom HTTP port
java -Dcodelens.port=9090 -jar codelens-app/target/codelens-app.jar
# Specify a custom data directory for H2 and Lucene
java -Dcodelens.data=/data/codelens-store -jar codelens-app/target/codelens-app.jar
# Production JVM flags for massive codebases (50k–125k classes)
java -Xms2g -Xmx6g \
-XX:+UseG1GC \
-XX:G1ReservePercent=15 \
-XX:InitiatingHeapOccupancyPercent=45 \
-Dcodelens.port=7878 \
-jar codelens-app/target/codelens-app.jarFor CI/CD pipelines, nightly cron jobs, or batch processing where a web server is not needed, CodeLens can be executed in headless mode:
# Scan a specific directory
java -jar codelens-app/target/codelens-app.jar scan /path/to/java/project
# Scan with custom data persistence directory
java -Dcodelens.data=/opt/codelens-data -jar codelens-app/target/codelens-app.jar scan /opt/workspace/src- AST parsing and entity extraction via JavaParser.
- Batch relational persistence into embedded H2 database with drop/rebuild index optimization.
- Lucene full-text inverted index building.
- JGraphT directed call graph topology construction.
- Sunflower spiral and 2D layout coordinates precomputation.
- Sequential precomputation of all 13 architecture and risk reports.
- Clean H2 compaction and process exit.
Once connected to http://localhost:7878:
-
Hero Landing Screen: Enter or browse to an absolute directory containing
.javasource files and click Scan. -
5 Core Tabs:
-
Graph (1): Interactive force-directed canvas with call chains, blast radius, and field impact propagation. -
Knowledge Base (2): Package/class hierarchy, method signatures, line numbers, and cyclomatic complexity rankings. -
Code Review (3): 32-rule AST static code quality and security auditor. -
Git Analytics (4): Commit heat, author leaderboards, and code churn correlation. -
Source Editor (5): Integrated Microsoft Monaco code editor with syntax highlighting and direct disk-save capabilities.
-
-
Top Action Buttons:
-
3D Studio (M): WebGL Software City & 3D Force Galaxy. -
Tasks: Background process manager displaying all 11 active subsystems. -
Reports (R): 13-category intelligence reports hub with CSV, HTML, Markdown, and PDF exports. -
⌘K: Global full-text search across all packages, classes, and methods.
-
CodeLens — Offline Java Architectural Intelligence & CodeStory Platform
100% Offline · Air-Gapped Local Operation · Zero Cloud Telemetry
- Home
- Getting Started & Onboarding
- Architecture & System Design
- 8-Stage Scan Pipeline & Readiness
- CodeStory & Guided Tours
- Structural Integrity & Audits
- Interactive Visualizations & 3D Studio
- Macro Architecture Studio
- Process Hub & JVM Sentinel
- Intelligence Reports Guide
- Deployment & Operations
- Developer CLI & Toolsuite
- REST & WebSocket API Reference
Repository Resources