How qeagle/reporter-engine works
Project Type & Purpose
• Full-stack web application: “Reporter Engine” is a real-time test-reporting and analytics platform.
• Frontend: React + TypeScript SPA for dashboards, charts, management UIs.
• Backend: Node.js + Express exposing REST endpoints, WebSocket server for live updates, file-upload, AI integration.
• Data Layer: JSON-based storage + SQLite relational DB, optional cloud blob storage for artifacts.
File Structure
• Top-level scripts & config: .env.example, CI/CD workflow, deploy scripts, health-check, ESLint/Tailwind/Vite configs.
• server/
– routes/ → controllers/ → services/ → data/
– middleware/ for auth, RBAC, error handling
– server/index.js & cli.js to launch HTTP + WS server
– data/backup & SQLite files + database schema/seeds in server/database/
• src/ (frontend)
– components/ (UI widgets, charts, modals)
– pages/ (route views: Dashboard, Reports, Analysis, Profile)
– contexts/, hooks/, services/apiService.ts, styling & utils
– main.tsx & App.tsx bootstrapping the SPA via Vite
Extract Insights from README
• Architecture overview (Frontend, Backend, Data Layer)
• Real-time updates via WebSocket
• Layered design: RESTful API, modular controllers & services
• Extensibility: AIAnalysisService (Groq/OpenAI), Webhooks, PDF/HTML export, Azure Blob integration
a. Main Components
• Clients (Browser / SPA)
• API Gateway / Backend Server
– HTTP REST endpoints (Auth, Tests, Reports, Analysis, Invitations, Webhooks)
– WebSocket server for live test/step notifications
• Business-Logic Layer (services folder):
AIAnalysisService, ReportService, FileUploadService, PDFService, WebSocketService, etc.
• Data Layer:
– SQLite database (server/data/database.sqlite)
– JSON backup store (server/data/backup)
– File system or Azure Blob for artifacts
• External Services:
– AI providers (Groq APIs, OpenAI)
– SMTP/Email for invitations
– CI/CD pipeline Webhooks
b. Relationships & Data Flows
• Client ↔ Backend via HTTP(S) for CRUD and analytic requests
• Client ↔ Backend via WebSocket for live updates (test steps, status changes)
• Backend → SQLite / JSON store for persistence
• Backend → Azure Blob / File system for binary artifacts
• Backend → AI provider (REST/gRPC) for analysis
• Backend → SMTP server for sending invitation emails
• Backend → External Webhooks (CI/CD integration)
c. Architectural Patterns & Principles
• Layered MVC-style organization (routes → controllers → services → data)
• Event-driven real-time communication (WebSocket)
• Separation of concerns: business logic in services, transport in controllers/routes
• Modular, easily‐replaceable data store (JSON vs. SQL vs. cloud blob)
• Stateless API design with JWT‐based auth and RBAC middleware
d. Key Technologies & Libraries
• Frontend: React, Vite, TypeScript, Tailwind CSS, Chart.js, WebSocket API
• Backend: Node.js, Express, ws/socket.io or built-in WebSocket server, sqlite3, JSON file I/O, Azure Blob SDK, nodemailer
• Security & Ops: JWT, Helmet, CORS, ESLint, CI/CD via GitHub Actions, Dockerfile for containerization
Detail & Clarity Guidance
• Critical paths: test start → result reporting → real-time dashboard update.
• CI/CD workflow and deployment scripts on the side.