A Next.js application that visualizes user flows with integrated quality metrics and risk assessment. This tool displays interactive flow diagrams where each screen is mapped to product documentation, test results, and bug reports to create a comprehensive quality/risk heatmap.
- Interactive Flow Visualization: React Flow-based diagrams showing user journey screens
- Quality Metrics Integration: Real-time display of test coverage, bug counts, and risk levels
- Risk-Based Color Coding: Visual heatmap using green/yellow/red color scheme
- Product Hierarchy Mapping: Structured product/section/feature organization
- Extensible Architecture: Ready for Supabase vector DB and Allure TestOps integration
├── app/
│ ├── graph/page.tsx # Main flow visualization page
│ └── layout.tsx # App layout
├── components/
│ ├── SimpleFlowNode.tsx # Flow node component with risk colors
│ ├── NodeDetailsPanel.tsx # Detailed node information panel
│ └── CircularFlowNode.tsx # Alternative circular node component
├── services/
│ ├── supabaseService.ts # Product docs & bug reports integration
│ ├── allureService.ts # Test results & coverage integration
│ └── qualityService.ts # Risk calculation & metrics aggregation
├── types/
│ └── flow.ts # TypeScript type definitions
├── utils/
│ └── layoutUtils.ts # Auto-layout algorithms using Dagre
└── public/
└── flow.json # Flow data with quality metrics
Each screen node contains:
- Screen metadata: Label, URL, role, description, actions, prerequisites
- Product hierarchy: Product, section, feature mapping
- Quality metrics: Test coverage, bug count, risk level, test results
- SupabaseService: Vector DB integration for product documentation and bug reports
- AllureService: TestOps integration for test execution data and coverage metrics
- QualityService: Aggregates data from both services to calculate risk levels
The risk level is calculated using a weighted scoring system in QualityServiceImpl.calculateRiskLevel():
-
Test Coverage (40% weight):
- < 60% coverage: +40 risk points
- 60-79% coverage: +20 risk points
- ≥ 80% coverage: +0 risk points
-
Bug Count (60% weight):
- 0 bugs: +0 risk points
- 1-2 bugs: +20 risk points
- 3-5 bugs: +40 risk points
- 6+ bugs: +60 risk points
- ≤ 20 points: 🟢 Low Risk
- 21-50 points: 🟡 Medium Risk
- 51+ points: 🔴 High Risk
Phone Login (Medium Risk):
- Test coverage: 85% → 0 points
- Bug count: 2 → 20 points
- Total: 20 points = Medium Risk
Order Guide (High Risk):
- Test coverage: 72% → 20 points
- Bug count: 3 → 40 points
- Total: 60 points = High Risk
Inbox (Low Risk):
- Test coverage: 95% → 0 points
- Bug count: 0 → 0 points
- Total: 0 points = Low Risk
- Extended FlowNodeData type with product/section/feature hierarchy
- Mapped existing screens to product/section/feature structure
- Created data integration service interfaces for Supabase and Allure
- Updated flow.json with new hierarchical structure and quality metrics
- Enhanced NodeDetailsPanel to show quality metrics and product hierarchy
- Added risk-based color coding to flow visualization nodes
- Tested application and verified all features work with mock data
- Connect real Supabase vector DB for product documentation
- Integrate with Allure TestOps for live test data
- Add real-time quality metrics updates
- Implement filtering by risk level, product, or coverage
- Create aggregate quality dashboards and reports
- Node.js 18+ with npm or pnpm
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Install dependencies:
npm install- Run the development server:
npm run dev- Open the application:
- Primary interface: http://localhost:3000/graph
- Main page: http://localhost:3000
The app runs with Turbopack for fast development builds and hot reloading.
- Main interface: Navigate to
/graphfor the interactive flow diagram - Risk-based color coding: Nodes are colored by risk level (🟢 Low, 🟡 Medium, 🔴 High)
- Node details: Click any node to see detailed information in the side panel
- Filtering: Use "Show Filters" to filter by product, section, or risk level
- Navigation: Minimap and zoom controls for easy navigation
Each screen displays:
- Test Coverage: Progress bar showing percentage of tests passing
- Bug Count: Badge showing number of open bugs
- Risk Level: Color-coded badge (Low/Medium/High)
- Test Results: Breakdown of passed/failed/skipped tests
Screens are organized by:
- Product: High-level product area (e.g., "authentication", "ordering-system")
- Section: Functional section (e.g., "login", "checkout", "catalog")
- Feature: Specific feature (e.g., "phone-login", "product-browsing")
This enables direct mapping to documentation, tests, and bug reports in external systems.
- Frontend: Next.js 15, React 19, TypeScript
- Visualization: React Flow, Dagre (auto-layout)
- Styling: Tailwind CSS
- Data Sources: Supabase (vector DB), Allure TestOps
- Build: Turbopack
- Flow data is stored in
public/flow.jsonwith complete node/edge definitions - Each node contains screen metadata, quality metrics, and product hierarchy
- Live integration with Supabase vector DB and Allure TestOps APIs
- Fallback mock data available in
public/for development
- ✅ Fully functional with live Supabase and Allure TestOps integration
- ✅ Risk calculation algorithm implemented (
services/qualityService.ts:68) - ✅ Interactive filtering by product, section, and risk level
- ✅ Auto-layout using Dagre algorithm for optimal node positioning
- ✅ Production ready with real-time quality metrics
Recommended setup (Node 20 + pnpm):
nvm use 20 # Switch to Node 20
npm install -g pnpm # Install pnpm
pnpm install # Install dependencies
pnpm dev # Start development serverAlways verify before committing:
pnpm build # Ensure production build succeeds
pnpm lint # Check for linting errors
npx tsc --noEmit # Check TypeScript compilation- Test the main
/graphinterface functionality - Verify Supabase and Allure TestOps connections are working
- Check browser console for React warnings
📖 For detailed debugging and development guidance, see DEVELOPMENT_GUIDE.md
- Feature-level risk calculation (not screen-level)
- Real data integration: Supabase bugs + Allure TestOps test counts
- Enhanced risk formula: Bug severity weighting + test coverage gaps
- Comprehensive modals: Detailed bug reports, test cases, and screen mapping
- Multiple screens per feature: One feature can span multiple user flow screens
- Unique React keys: Proper key management prevents duplicate key errors
- Real-time data: Live integration with Supabase vector DB and Allure TestOps
- Playwright MCP integration: Automated browser testing for verification
- TypeScript strict mode: Prevents runtime errors from type mismatches
- Build verification: Continuous integration ready
- Fork the repository
- Create a feature branch
- Make your changes following the DEVELOPMENT_GUIDE.md
- Test with both real and mock data
- Verify build succeeds and no TypeScript errors
- Submit a pull request
This project is licensed under the MIT License.