v0.3.2 — Vue & React DevTools + 13 rules + GraphQL & WebSocket intelligence

Lighthouse for
your API calls

Scans your web app's API layer. Finds waterfalls, duplicate fetches, N+1 patterns, and missing cache. Drop-in DevTools for Vue & React. Generates framework-aware fix code.

⚡ Get Started View on GitHub →
Terminal
$ npx flux-scan https://myapp.com --network jio-4g
⠙ Scanning... [████████████████████] 30s

╔════════════════════════════════════════════════════╗
║ FluxAPI Report — Score: 38/100 (poor) ║
╚════════════════════════════════════════════════════╝

⚡ Efficiency ██████░░░░░░░░░░░░░░ 30%
💾 Caching ████████████░░░░░░░░ 55%
🔄 Patterns ██████████████░░░░░░ 70%

⚛️ React 18.2.0 (Next.js) · TanStack Query v5
🌐 2 WebSocket connections · 142 messages

Issues Found:
🔴 5 critical 🟡 5 warnings ℹ️ 3 info

Top Fixes:
E2: GET /api/user called 4x from 4 components
⚡ 600ms faster 📉 3 fewer requests
E3: N+1: 25 individual GET /products/:id
⚡ 2.1s faster 📉 24 fewer requests

What it finds

13 audit rules catch the API anti-patterns killing your app performance

🔗
Request Waterfalls
Sequential API calls with no data dependency. Request B waits for A to finish. Could run in parallel with Promise.all.
E1 · Critical
👯
Duplicate Requests
Header, Sidebar, and ProfileCard each call GET /api/user. TanStack Query deduplicates this — but only if you use a shared hook.
E2 · Critical
💥
N+1 Query Pattern
Product list page fires GET /products/1, /products/2... ×25. Classic N+1. One batch endpoint eliminates 24 requests.
E3 · Critical
📦
Payload Over-fetching
API returns 50 fields but app reads 6. That's 88% wasted bytes. Suggests GraphQL or sparse fieldsets.
E4 · Warning
🚫
No Cache Strategy
Endpoints with zero caching — no Cache-Control, no ETag, no staleTime. Every mount triggers a fresh network round-trip.
C1 · Critical
🔁
Unnecessary Polling
Polling every 2s but data changes once a minute. 95% of polls wasted. Switch to SSE or increase interval.
P2 · Warning
🖥️
Vue & React DevTools
Drop-in <FluxDevTools /> component for Vue 3 and React. Floating panel with live score, violations, and request feed. Integrates with TanStack Query & SWR.
New in v0.3.2
🔧
Framework-Aware Fixes
Auto-detects your stack — React, Vue, Next.js, Nuxt, Angular, SWR, Apollo — and generates fix code that matches your framework.
Auto-fixable
🌐
WebSocket & GraphQL
Monitors WS connections, message rates, subscriptions. Deduplicates GraphQL queries by operation + variables hash.
Intelligence

Three steps. Sixty seconds.

No config, no setup, no API key

1
Scan
Run npx flux-scan against any URL, or add <FluxDevTools /> to your Vue/React app for live monitoring.
2
Analyze
13 audit rules score your API layer 0-100. Network-adjusted scoring shows how patterns compound on Jio 4G vs WiFi.
3
Fix
Each violation generates framework-aware fix code — React, Vue, Angular, SWR, Apollo. Copy-paste the fix and re-scan.

Network-adjusted scoring

Same code, different scores. A waterfall costs 3x more on Jio 4G than WiFi.

75
WiFi
48
Jio 4G
30
BSNL 2G

Installation

Choose your setup — CLI, Vue DevTools, React DevTools, or programmatic SDK

terminal
# Zero install — scan any URL, get HTML report
$ npx flux-scan https://your-app.com -o report.html

# Test with Indian mobile network scoring
$ npx flux-scan https://your-app.com --network jio-4g -o report.html

# Authenticated apps — login manually, browse, press Enter
$ npx flux-scan https://admin.your-app.com --no-headless --interact

# JSON output for CI/CD pipelines (exit code 1 if score < 50)
$ npx flux-scan https://staging.your-app.com -f json

# Stress test on slow networks
$ npx flux-scan https://your-app.com -n bsnl-2g -o slow-report.html
vue
# Step 1: Install
$ npm install @fluxiapi/vue

# Step 2: Add one component to your App.vue

<!-- App.vue -->
<script setup>
import { FluxDevTools } from '@fluxiapi/vue';
</script>

<template>
  <RouterView />
  <FluxDevTools force-show verbose network="jio-4g" />
</template>

# That's it! A floating badge appears in the corner.
# Click it to expand the panel. Press Ctrl+Shift+F to toggle.

# Optional: With TanStack Vue Query
import { wrapQueryClient } from '@fluxiapi/vue';
const queryClient = wrapQueryClient(new QueryClient());

# Optional: Use composables for custom UI
import { useFluxScore, useFluxViolations } from '@fluxiapi/vue';
const score = useFluxScore();      // { overall, grade, color }
const violations = useFluxViolations(); // RuleViolation[]
react
# Step 1: Install
$ npm install @fluxiapi/react

# Step 2: Add one component to your App.tsx

import { FluxDevTools } from '@fluxiapi/react';

function App() {
  return (
    <>
      <YourApp />
      <FluxDevTools forceShow verbose network="jio-4g" />
    </>
  );
}

# That's it! Floating badge + expandable panel.

# Optional: With TanStack Query
import { wrapQueryClient } from '@fluxiapi/react';
const queryClient = wrapQueryClient(new QueryClient());

# Optional: With SWR
import { fluxSWRMiddleware } from '@fluxiapi/react';
<SWRConfig value={{ use: [fluxSWRMiddleware] }}>

# Optional: Use hooks for custom UI
import { useFluxScore, useFluxViolations } from '@fluxiapi/react';
const { overall, grade } = useFluxScore();
javascript
# Step 1: Install the core SDK
$ npm install @fluxiapi/scan

# Step 2: Use programmatically

import { FluxScanner, FluxAnalyzer, generateHtmlReport } from '@fluxiapi/scan';

// Scan
const scanner = new FluxScanner({ duration: 60, network: 'jio-4g' });
scanner.start();

// ... user browses app ...

const session = scanner.stop();

// Analyze
const analyzer = new FluxAnalyzer({ network: 'jio-4g' });
const report = analyzer.analyze(session);

// Output
const html = generateHtmlReport(report);
console.log(report.score.overall); // 38

Packages

@fluxiapi/scan
Core scanner + analyzer engine
167 KB
@fluxiapi/cli
CLI tool (npx flux-scan)
207 KB
@fluxiapi/vue
Vue 3 DevTools + composables
34 KB
@fluxiapi/react
React DevTools + hooks
42 KB

Use cases

FluxAPI fits into every stage of your development workflow

🚀
Pre-Deploy Audit
Run before every deploy to catch API regressions. Generate an HTML report and share with your team.
npx flux-scan https://staging.app.com -o report.html
🖥️
Live Dev Monitoring
Add <FluxDevTools /> to your Vue or React app. See API health scores update in real-time as you develop. Catches issues the CLI can't — like component re-mounts and user interaction patterns.
🔒
Authenticated App Scanning
Admin panels, dashboards, apps behind login — open a visible browser, login manually, browse all pages, press Enter.
npx flux-scan https://admin.app.com --no-headless --interact
🇮🇳
India Market Optimization
Your app works on WiFi but crashes on Jio 4G. Score your APIs against real Indian network conditions.
npx flux-scan https://app.com -n jio-4g -o jio.html
⚙️
CI/CD Quality Gate
Fail the build automatically if API health drops below 50. Exit code 1 on poor scores — works with any CI system.
npx flux-scan https://staging.app.com -f json
🔍
Chrome DevTools Extension
Real-time scanning inside DevTools. Best for daily development — you're already logged in, no setup needed. Export as HTML or JSON.

CLI Reference

Every option at a glance

options
-d, --duration <sec>     Scan duration in seconds (default: 30)
-n, --network <name>    wifi | jio-4g | airtel-4g | airtel-3g | bsnl-2g | slow-3g
-o, --output <file>     Output file (.html or .json)
-f, --format <fmt>      console | html | json
-s, --session <file>    Analyze saved session JSON (skip live scan)
    --no-headless       Show browser window during scan
    --interact          Manual browse mode (press Enter to stop)
-h, --help              Show help
-v, --version           Show version

EXIT CODES
  0  Score >= 50 (pass)
  1  Score < 50  (fail — useful for CI/CD)
  2  Fatal error

Stop shipping slow APIs

One command. Sixty seconds. Copy-paste fixes.

⚡ Star on GitHub View on npm →