How iyadeh/attackmap works
AttackMap is a project-based architecture modeling and security-review application. Users create or open a project, model services and connections, inspect security findings, and review a project security summary. The visible model includes architecture editing, security analysis and triage, overview aggregation, and database persistence. The README is only the Next.js starter template, and several route/workspace implementations were not sampled, so uncertain wiring between those subsystems is omitted.
Main entry points: actions.ts Server actions · architecture-workspace.tsx Architecture workspace · client.ts Database client · project-security-overview.ts Overview aggregation
Components 24
Project management
- Projects route
src/app/projects/page.tsx - Projects view
src/components/projects/projects-view.tsx - Project route
src/app/projects/[projectId]/page.tsx
Architecture modeling
- Architecture workspace
src/components/architecture/architecture-workspace.tsx - Architecture canvas
src/components/architecture/architecture-canvas.tsx - Component palette
src/components/architecture/component-palette.tsx - Service inspector
src/components/architecture/service-inspector.tsx - Service factory
src/lib/architecture/service-factory.ts - Autosave coordinator
src/lib/architecture/autosave-coordinator.ts
Security review
- Finding review
src/components/findings/findings-view.tsx - Risk analysis
src/lib/risk-engine/engine.ts - Security rules
src/lib/risk-engine/rules.ts - Security scoring
src/lib/risk-engine/scoring.ts - Finding triage
src/lib/findings/finding-dispositions.ts - Security overview
src/components/overview/project-security-overview.tsx - Overview aggregation
src/lib/overview/project-security-overview.ts
Persistence
- Server actions
src/app/actions.ts - Project persistence
src/lib/db/project-persistence.ts - Architecture persistence
src/lib/db/architecture-persistence.ts - Disposition persistence
src/lib/db/finding-disposition-persistence.ts - Database client
src/lib/db/client.ts - Database schema
src/lib/db/schema.ts
Other components
- User
- PostgreSQL
Connections 27
- User → Projects route: opens
- Projects route → Projects view: renders
- Projects view → Server actions: creates project
- Server actions → Project persistence: manages projects
- Project persistence → Database client: queries
- Project route → Architecture workspace: renders
- User → Architecture workspace: edits architecture
- Architecture workspace → Architecture canvas: renders
- Architecture workspace → Component palette: renders
- Architecture workspace → Service inspector: renders
- Component palette → Service factory: creates services
- Architecture workspace → Autosave coordinator: saves changes
- Autosave coordinator → Server actions: requests save
- Project route → Server actions: loads project
- Server actions → Architecture persistence: loads or saves
- Architecture persistence → Database client: queries
- Server actions → Disposition persistence: manages dispositions
- Disposition persistence → Database client: queries
- Finding review → Finding triage: triages findings
- Finding review → Server actions: accepts or reopens
- Risk analysis → Security rules: evaluates rules
- Overview aggregation → Risk analysis: analyzes architecture
- Overview aggregation → Security scoring: scores findings
- Overview aggregation → Finding triage: counts triage
- Security overview → Overview aggregation: presents summary
- Database client → Database schema: uses schema
- Database client → PostgreSQL: connects