Skip to content

Repository files navigation

RuntimeLens

A developer-focused code and runtime analysis workspace for inspecting projects, reviewing source code, and discovering potential issues before they reach production.

RuntimeLens is an open-source developer tool designed to make code inspection and static review easier.

Instead of switching between editors, terminal commands, and different analysis tools, RuntimeLens provides a single workspace where developers can upload a project, explore source files, inspect code, and run automated reviews.

Why RuntimeLens?

Modern projects can contain hundreds or thousands of files. Finding security issues, debugging leftover logs, detecting risky APIs, or understanding an unfamiliar codebase often requires manually searching through the project.

RuntimeLens aims to make this process simpler.

Project
   |
   v
Upload / Import
   |
   v
Project Workspace
   |
   v
Explore Files
   |
   v
Read / Edit Code
   |
   v
Review Code
   |
   v
Findings
   |
   v
Fix Issues

The goal is not to replace developers.

The goal is to give developers a better second pair of eyes.

Features
Project Workspace
Project dashboard
Project creation
Project description
Project statistics
Project-specific workspace
Persistent project data
Project Upload
Upload individual source files
Upload complete project folders
Automatically discover files
Build a project file tree
Open source files for inspection
Source Code Editor
Source code viewing
Code editing
File search
Language detection
File size information
Review directly from the editor
Code Review

RuntimeLens detects potentially problematic code patterns.

Example
const result = eval(input);

console.log(result);
Possible Finding

CRITICAL — Dynamic code execution

eval() can execute arbitrary code and may introduce serious security risks when used with untrusted input.

Line: 1

Project-wide Review

Review multiple source files together instead of checking them individually.

Project
├── src/
│   ├── app.ts
│   ├── auth.ts
│   └── utils.ts
│
├── components/
│   ├── Header.tsx
│   └── Login.tsx
│
└── package.json

        |
        v

   Review Project

        |
        v

+-----------------------+
| Critical       2      |
| Warning        5      |
| Info           8      |
+-----------------------+

Each finding can contain:

Severity
Title
Description
File
Line number
Explanation
Severity Levels
Severity	Meaning
Critical	Potentially dangerous or high-impact issue
Warning	Code quality, security, or maintainability concern
Info	Useful information or improvement suggestion
Architecture
+---------------------------------------+
|              Next.js UI               |
|                                       |
|  Dashboard                            |
|  Project Workspace                    |
|  File Explorer                        |
|  Code Editor                          |
|  Review Results                       |
+-------------------+-------------------+
                    |
                    | REST APIs
                    v
+---------------------------------------+
|          Next.js API Layer            |
|                                       |
|  Projects API                         |
|  Files API                            |
|  Binary Analysis API                  |
|  Code Review API                      |
+-------------------+-------------------+
                    |
                    v
+---------------------------------------+
|              Prisma ORM               |
+-------------------+-------------------+
                    |
                    v
+---------------------------------------+
|            SQLite Database            |
|                                       |
|  Projects                             |
|  Project Files                        |
|  Binaries                             |
+---------------------------------------+
Tech Stack
Frontend
Next.js
React
TypeScript
Tailwind CSS
Lucide React
Backend
Next.js Route Handlers
TypeScript
REST APIs
Database
SQLite
Prisma ORM
Development
ESLint
TypeScript
Git
GitHub
Project Structure
runtimelens/
|
├── app/
│   ├── api/
│   │   ├── projects/
│   │   │   ├── route.ts
│   │   │   └── [id]/
│   │   │       ├── binaries/
│   │   │       ├── files/
│   │   │       └── review/
│   │   └── binaries/
│   │
│   ├── dashboard/
│   │   └── page.tsx
│   │
│   ├── projects/
│   │   ├── new/
│   │   └── [id]/
│   │
│   ├── layout.tsx
│   └── page.tsx
│
├── components/
│   ├── binary-analysis.tsx
│   ├── binary-upload.tsx
│   ├── code-editor.tsx
│   └── project-code-workspace.tsx
│
├── lib/
│   └── prisma.ts
│
├── prisma/
│   └── schema.prisma
│
├── public/
├── .env
├── package.json
├── tsconfig.json
└── README.md
Getting Started
Requirements
Node.js 20+
npm
Git
Installation
git clone https://github.com/RahilAlam929/RuntimeLens.git
cd RuntimeLens
npm install
Environment

Create a .env file:

DATABASE_URL="file:./dev.db"
Database Setup
npx prisma generate
npx prisma migrate dev
Run Development Server
npm run dev

Open:

http://localhost:3000
Type Checking
npx tsc --noEmit
API
Projects
GET /api/projects
POST /api/projects
Project Files
GET /api/projects/:id/files
POST /api/projects/:id/files
Code Review
POST /api/projects/:id/review

Example request:

{
  "path": "src/example.ts",
  "content": "const value = eval(input);"
}

Example response:

{
  "success": true,
  "findings": [
    {
      "severity": "critical",
      "title": "Dynamic code execution",
      "message": "eval() can execute arbitrary code.",
      "line": 1
    }
  ],
  "summary": {
    "total": 1,
    "critical": 1,
    "warning": 0,
    "info": 0
  }
}
Development Philosophy
Developer First

The interface should help developers understand their code instead of overwhelming them with dashboards.

Fast Feedback
Open Project
     |
     v
Select File
     |
     v
Review
     |
     v
Understand Finding
     |
     v
Fix
Transparent Analysis

Every finding should explain:

What was detected
Why it matters
Where it was detected
Open Source

RuntimeLens is designed to be extended by the community.

Developers can add:

New language support
New analysis rules
New integrations
Better editors
GitHub integration
CI/CD support
Roadmap
Phase 1 — Core Workspace
 Project dashboard
 Project creation
 File upload
 Folder upload
 Source code editor
 File search
 Basic code review
 Project review
 Finding severity
 SQLite persistence
Phase 2 — Developer Experience
 Proper project tree
 .gitignore support
 Ignore node_modules
 Ignore .next
 Ignore build directories
 Better code editor
 Review history
 Finding filtering
 Finding search
Phase 3 — GitHub
 GitHub repository import
 Repository browser
 Branch selection
 Pull request review
 Commit analysis
 GitHub comments
Phase 4 — Advanced Analysis
 More security rules
 Dependency analysis
 Secret detection
 Code quality analysis
 Architecture insights
 Cross-file analysis
 AI-assisted explanations
Phase 5 — CI/CD
Git Push
   |
   v
RuntimeLens
   |
   v
Static Analysis
   |
   v
Findings
   |
   v
CI Result

Potential integrations:

GitHub Actions
GitLab CI
Docker
VS Code
CLI
Contributing

Contributions are welcome.

git clone <your-fork-url>
cd RuntimeLens
git checkout -b feature/my-feature

Run checks:

npx tsc --noEmit
npm run dev

Commit and push:

git add .
git commit -m "feat: add my feature"
git push origin feature/my-feature

Then open a Pull Request.

Contribution Ideas
Add a new security rule
Improve existing rules
Add language detection
Improve the file explorer
Improve accessibility
Fix UI bugs
Add tests
Improve documentation
Add GitHub integration
Improve performance
Security

RuntimeLens analyzes source code and project files.

Do not upload confidential source code to an instance that you do not control.

When deploying RuntimeLens publicly, authentication, authorization, file-size limits, rate limiting, and secure storage should be implemented.

Project Status

RuntimeLens is an active open-source project under development.

The architecture and APIs may change as the project evolves.

Expect breaking changes during early development.

License

This project is currently under development.

An appropriate open-source license should be added before accepting external contributions.

Vision

RuntimeLens aims to become a developer workspace where code can be inspected before it becomes a problem.

Write Code
    |
    v
RuntimeLens
    |
    v
Understand
    |
    v
Review
    |
    v
Fix
    |
    v
Ship

Built for developers who want to understand their code better.

RuntimeLens — inspect better. ship safer.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages