A powerful, browser-based Progressive Web App (PWA) for creating and managing red team attack diagrams. Built with React Flow, this application provides an intuitive interface for visualizing attack paths, tactics, and techniques with zero backend dependencies. Install it like a native app and run it completely offline.
Live Demo: red.michaelnieto.com
- Full-Featured Diagram Editor: Powered by React Flow with smooth interactions
- Custom Node Creation: Add nodes with custom labels, colors, and icons
- Choose from 65+ professional icons (Shield, Network, Terminal, Cloud, etc.)
- Full color customization with color picker
- Any custom label text for your attack stages
- Flexible Connections: Connect nodes from any side (top, bottom, left, right)
- Auto-Save: Diagrams automatically persist to browser localStorage
- Import/Export: Save and load diagrams as JSON files
- Interactive HTML Export: Share diagrams as standalone HTML files with full interactivity
- Custom Icons: 65+ professional icons to choose from for each node
- Custom Colors: Full color picker for node customization (including transparent)
- Background Themes: Multiple built-in backgrounds (abstract, mountains, nature, night city)
- Neon Mode: Toggle cyberpunk-style neon aesthetics
- Font Customization: Adjust font family and size
- Dark/Light Mode: Seamless theme switching
- JSON Export: Export diagrams for backup or re-import
- Interactive HTML Export: Generate standalone HTML files that anyone can view with full pan/zoom/attachment viewing
- AI/LLM Compatible: Well-documented JSON schema allows AI assistants to generate diagrams programmatically
- Progressive Web App (PWA): Install as a native app on desktop or mobile
- Fully Offline-Capable: Works 100% offline after installation - perfect for air-gapped environments
- Attachment Management: Add images, screenshots, and links to nodes
- Presentation Mode: Step through nodes sequentially with keyboard navigation
- Presentation Order: Customize the order nodes appear in presentations
- Responsive Design: Works on desktop and mobile devices
- No Backend Required: Complete client-side application with localStorage and IndexedDB
- AI Template Generation: Generate attack diagrams from predefined templates using AI (requires authentication)
This app supports AI-generated diagrams! Any AI assistant (ChatGPT, Claude, Gemini, etc.) can generate valid diagram JSON that you can import directly.
See the JSON Schema Documentation for complete technical details.
Quick example prompt for AI:
"Generate a red team attack diagram JSON for a phishing campaign leading to domain admin compromise"
- Frontend Framework: React 18.3 with TypeScript
- Build Tool: Vite
- PWA Support: vite-plugin-pwa + Workbox
- Diagramming: React Flow 11
- UI Components: Radix UI + shadcn/ui
- Styling: Tailwind CSS with custom design system
- State Management: React hooks + Context API
- Local Storage: IndexedDB for attachment persistence
- Routing: React Router v6
- Icons: Lucide React
- Forms: React Hook Form + Zod validation
- Node.js 18.x or higher
- npm or bun package manager
-
Clone the repository
git clone <YOUR_GIT_URL> cd <YOUR_PROJECT_NAME>
-
Install dependencies
npm install # or bun install -
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:8080
The app can be installed as a Progressive Web App for offline use:
Desktop (Chrome, Edge, Brave):
- Visit the app in your browser
- Look for the install icon (โ) in the address bar
- Click "Install" to add it as a native app
- Access from your Start Menu or Applications folder
Mobile (iOS Safari):
- Visit the app in Safari
- Tap the Share button
- Select "Add to Home Screen"
- Tap "Add" to install
Mobile (Android Chrome):
- Visit the app in Chrome
- Tap the menu (โฎ)
- Select "Install app" or "Add to Home Screen"
- Tap "Install"
Once installed, the app works completely offline with all features available.
npm run dev- Start development server with hot reloadnpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
src/
โโโ components/ # React components
โ โโโ ui/ # shadcn/ui components
โ โโโ AddNodeDialog.tsx
โ โโโ DiagramEditor.tsx
โ โโโ Toolbar.tsx
โ โโโ ...
โโโ hooks/ # Custom React hooks
โโโ nodes/ # React Flow custom nodes
โโโ pages/ # Route pages
โโโ types/ # TypeScript type definitions
โโโ utils/ # Utility functions
โ โโโ indexedDB.ts # Database operations
โ โโโ storage.ts # LocalStorage helpers
โ โโโ htmlExport.ts # Interactive HTML export
โ โโโ validation.ts # Schema validation
โโโ App.tsx # Main app component
โโโ index.css # Global styles & design system
โโโ main.tsx # Application entry point
docs/
โโโ JSON_SCHEMA.md # Technical JSON schema for AI/LLM integration
The easiest way to deploy this project:
- Open your Lovable Project
- Click the Publish button (top right on desktop, bottom right on mobile)
- Your app is live instantly!
Custom Domain Setup:
- Navigate to Project โ Settings โ Domains
- Click "Connect Domain"
- Follow the instructions to connect your custom domain
- Requires a paid Lovable plan
-
Install gh-pages
npm install -D gh-pages
-
Add deploy scripts to package.json
"scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d dist" }
-
Deploy
npm run deploy
Build the project and deploy the dist folder:
npm run buildThe dist folder contains all static files ready for any hosting service.
- Add Nodes: Click "Add Node" in the toolbar
- Connect Nodes: Hover over a node to reveal connection handles, then drag to another node
- Customize: Click nodes to edit labels, icons, colors, and attachments
- Present: Use presentation mode to step through your diagram
- Export: Download as JSON or Interactive HTML to share
| Key | Action |
|---|---|
Delete |
Remove selected nodes/edges |
Escape |
Exit presentation mode |
Arrow Keys |
Navigate nodes in presentation |
F |
Toggle fullscreen (presentation) |
Home |
Jump to first node (presentation) |
End |
Jump to last node (presentation) |
JSON Export - For backup or re-import:
- Click Export โ Export as JSON
- Share the
.jsonfile with team members
Interactive HTML Export - For viewing without the app:
- Click Export โ Export as Interactive HTML
- Share the
.htmlfile - recipients can view with full interactivity
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Michael Nieto
Red team professional and security tool developer.
- LinkedIn: linkedin.com/in/nietomichael
- Website: michaelnieto.com
Built with:
- React Flow - Powerful diagram library
- shadcn/ui - Beautiful component system
- Radix UI - Unstyled, accessible components
- Lucide Icons - Elegant icon set
- Lovable - AI-powered development platform
Version 2.0.0 - Now with AI-powered template generation, improved layouts, and enhanced security.
โญ Star this repo if you find it useful!
Made with โค๏ธ for the red team community




