NavakhaLens — AEM Flow Tester & Component Preview
Test real AEM API flows and preview components with live data — all from the code already in your project, without running AEM.
What it does
Everything about how an AEM component works is already in your codebase:
- API endpoints → OSGi config files (
*.cfg.json, *.config)
- Data contracts → Sling Model Java files (
@Model, @OSGiService)
- Rendering logic → HTL files (
data-sly-use, ${model.*})
NavakhaLens reads all of that and lets you:
- Test real API flows (login → search → checkout) with real HTTP calls
- Preview components rendered with live API data
- Chain auth tokens automatically between flow steps
- Get AI-powered fixes when a flow step fails (uses Claude API)
Requirements
NavakhaLens requires a small local server running on your machine:
# Download the local server from the releases page, then:
cd navakhalens-server
npm install
npm start
The server runs on http://localhost:3000 and connects automatically to the extension.
Quick Start
- Start the local server (see above)
- Open your AEM project in VS Code
- Click the NavakhaLens icon in the Activity Bar
- Click 📁 Root → select your AEM project folder
- Click ⟳ Scan → the extension reads OSGi configs, Sling Models, and HTL files
- Components tab → click any component to preview it with real data
- Flows tab → click ▶ Run Flow to test a full API flow
Features
Environment Switcher
Switch between Local / Dev / UAT / Stage / Prod — the extension reads the matching osgiconfig/config.{env}/ folder and uses those API URLs.
Component Library
Lists every detected AEM component with:
- Which Sling Model it uses
- Which OSGi services it depends on
- Which APIs those services call
- How many dialog fields it has
Component Preview
Click a component to see it rendered with real API data. Above the preview:
✅ GET https://api-uat.example.com/search?q=cancer 200 124ms
❌ GET https://api-uat.example.com/recommended 401 token expired
Edit dialog field values on the right and click Refresh to re-render.
Flow Tester
Detects and runs full user journeys: Login, Search, Checkout, Form, Profile, Media.
Each step shows:
- Real URL (from OSGi config)
- HTTP status + response time
- Exact config file and Java method responsible for failures
AI Fix (Claude API)
When a step fails, click ✦ AI Fix — NavakhaLens reads the failing Java service, OSGi config, and Sling Model, sends them to Claude, and returns the exact code change needed. Click Apply Fix to patch the file in place.
Add your Anthropic API key in: Settings → NavakhaLens → Claude API Key
Extension Settings
| Setting |
Default |
Description |
navakhalens.serverUrl |
ws://localhost:3000 |
Local server WebSocket URL |
navakhalens.claudeApiKey |
(empty) |
Anthropic API key for AI Fix |
navakhalens.aiCredits |
0 |
Credits remaining (1 per AI Fix call) |
navakhalens.defaultEnvironment |
uat |
Default environment |
navakhalens.projectRoot |
(auto) |
AEM project root (auto-detected) |
Supported AEM Project Structure
Works with standard Maven AEM project layouts:
my-aem-project/
├── core/src/main/java/ ← Sling Models parsed here
├── ui.apps/src/main/content/
│ └── jcr_root/apps/
│ └── myapp/components/ ← HTL files parsed here
└── ui.config/src/main/content/
└── jcr_root/apps/myapp/
└── osgiconfig/ ← OSGi configs parsed here
├── config/
├── config.dev/
├── config.uat/
└── config.prod/
License
MIT