How shyber/devops-lab-nodejs works
CIRS is a locally hosted incident-reporting web application: users sign in, submit and manage incident reports, and analysts triage, assign, comment on, and advance them through a workflow. SQLite persists accounts, incidents, categories, assignments, comments, and history; role and ownership checks govern access. The graph also preserves documented account/category management, metrics, and the static UI. Some route-to-service links are supported by the SOURCE INDEX; unsampled frontend/API wiring is shown only as unverified.
Main entry points: cirsStore.js CIRS data access · app.js Express app and router loader · auth.js Sessions and accounts · workflow.js Workflow rules and comments
Components 22
Web and API
- Static CIRS UI
public/app.js - Express app and router loader
src/app.js - Server startup
src/index.js - Input and workflow validation
src/utils/validation.js - API error responses
src/utils/errorHandler.js - Application information
src/utils/appInfo.js - Information endpoint
src/routes/auto/info.route.js
Identity and Access
- Login and logout routes
src/routes/auto/auth.route.js - Sessions and accounts
src/security/auth.js - Incident ownership checks
src/security/access.js - Account administration
src/routes/auto/users.route.js
Incident Operations
- Incident reports and CRUD
src/routes/auto/incidents.route.js - Triage, comments, history
src/routes/auto/workflow.route.js - Workflow rules and comments
src/data/workflow.js - Analyst directory
src/routes/auto/analysts.route.js - Incident assignments
src/routes/auto/assignments.route.js - Category administration
src/routes/auto/categories.route.js - Operational metrics
src/routes/auto/metrics.route.js
Persistence
- CIRS data access
src/data/cirsStore.js - SQLite schema and connection
src/data/db.js
Other components
- Campus user or analyst
- Practice data module
cirsData.js
Connections 23
- Campus user or analyst → Static CIRS UI: uses
README.md - Static CIRS UI → Express app and router loader: uses API
- Server startup → Express app and router loader: starts
src/index.js - Express app and router loader → Login and logout routes: loads routes
src/app.js - Express app and router loader → API error responses: handles errors
src/app.js - Express app and router loader → Sessions and accounts: guards API
src/app.js - Login and logout routes → Sessions and accounts: authenticates
src/routes/auto/auth.route.js - Account administration → Sessions and accounts: manages accounts
src/routes/auto/users.route.js - Incident reports and CRUD → CIRS data access: reads and writes
src/routes/auto/incidents.route.js - Incident reports and CRUD → Incident ownership checks: checks ownership
src/routes/auto/incidents.route.js - Triage, comments, history → Incident ownership checks: checks ownership
src/routes/auto/workflow.route.js - Triage, comments, history → Workflow rules and comments: applies workflow
src/routes/auto/workflow.route.js - Workflow rules and comments → CIRS data access: reads incidents
src/data/workflow.js - Workflow rules and comments → SQLite schema and connection: stores comments
src/data/workflow.js - Analyst directory → CIRS data access: manages analysts
src/routes/auto/analysts.route.js - Incident assignments → CIRS data access: updates assignments
src/routes/auto/assignments.route.js - Category administration → CIRS data access: reads categories
src/routes/auto/categories.route.js - Operational metrics → CIRS data access: queries metrics
src/routes/auto/metrics.route.js - Sessions and accounts → SQLite schema and connection: persists sessions
src/security/auth.js - CIRS data access → SQLite schema and connection: persists CIRS data
src/data/cirsStore.js - Sessions and accounts → Input and workflow validation: validates values
src/security/auth.js - Workflow rules and comments → Input and workflow validation: checks transitions
src/data/workflow.js - Information endpoint → Application information: reads metadata
src/routes/auto/info.route.js