A fully offline desktop application for tactical mission planning with interactive map-based plotting of military assets, forces, targets, and operational boundaries.
- Interactive Map: Full-screen Leaflet.js map with OpenStreetMap tiles
- Force Tracking: Plot and manage FOBs, friendly forces, enemy forces, targets, and key locations
- Drawing Tools: Create routes, area of operations boundaries, and circles
- Mission Management: Save and load missions as
.opsfiles - Offline Operation: Fully functional without internet connection (after initial tile cache)
- Drag & Drop: All markers are draggable for easy repositioning
- Detailed Editing: Comprehensive info panels for editing all elements
- Node.js 16+ and npm
- Git (for cloning)
- Clone or create the project structure:
mkdir tactical-planner
cd tactical-planner- Create the directory structure:
mkdir -p app src/components src/utils public missions-
Copy all the provided files to their respective locations according to the file structure shown below.
-
Install dependencies:
npm install- Development mode (React + Electron):
npm run dev- Production build:
npm run build
npm start- Create distributable:
npm run disttactical-planner/
├── app/
│ ├── main.js # Electron main process
│ └── preload.js # Electron preload script
├── src/
│ ├── components/
│ │ ├── MapComponent.jsx # Main map with Leaflet
│ │ ├── MarkerLayer.jsx # Marker rendering and management
│ │ ├── DrawingLayer.jsx # Drawing/route rendering
│ │ ├── Sidebar.jsx # Left sidebar with element lists
│ │ ├── InfoPanel.jsx # Right panel for editing
│ │ └── Toolbar.jsx # Top toolbar with tools
│ ├── utils/
│ │ └── helpers.js # Utility functions
│ ├── App.jsx # Main React component
│ ├── App.css # Application styles
│ └── index.js # React entry point
├── public/
│ └── index.html # HTML template
├── missions/
│ └── example_mission.ops # Example mission file
├── package.json # Dependencies and scripts
└── README.md # This file
- Start the application using
npm startornpm run dev - Add markers using the toolbar buttons (FOB, Friendly, Enemy, Target, Key Location)
- Drag markers on the map to reposition them
- Click markers or sidebar items to select and edit them
- Use drawing tools to create routes, boundaries, and circles
- Save missions using Ctrl+S or File → Save Mission
- FOB/Base (🏠): Forward Operating Bases and main bases
- Friendly Forces (👥): Allied military units
- Enemy Forces (
⚠️ ): Hostile or opposing forces - Targets (🎯): High-value targets for engagement
- Key Locations (📍): Important civilian or tactical locations
- Routes: Click to add waypoints, double-click to finish
- AO Boundaries: Right-click to add points, double-click to finish polygon
- Circles: Single click to place circular areas
- New Mission: File → New Mission (Ctrl+N)
- Open Mission: File → Open Mission (Ctrl+O)
- Save Mission: File → Save Mission (Ctrl+S)
- Save As: File → Save Mission As (Ctrl+Shift+S)
Mission files are saved as .ops files in JSON format:
{
"metadata": {
"version": "1.0.0",
"created": "2025-08-16T12:00:00.000Z",
"application": "Tactical Planner"
},
"fobs": [...],
"friendlies": [...],
"enemies": [...],
"targets": [...],
"keyLocations": [...],
"drawings": [...]
}npm start: Run the built Electron appnpm run dev: Development mode with hot reloadnpm run build: Build React app for productionnpm run electron-pack: Package as desktop appnpm run dist: Create distributable packages
The application is built with modularity in mind:
- Add new marker types: Extend the marker system in
MarkerLayer.jsx - Custom icons: Modify the
createMarkerIconfunction - Additional drawing tools: Extend
DrawingLayer.jsxand map event handlers - UI themes: Modify
App.cssfor different color schemes - Map providers: Change tile layer in
MapComponent.jsx
The application works offline by:
- Using cached map tiles (OpenStreetMap)
- Storing all data in memory and local files
- No external API dependencies for core functionality
Ctrl+N: New MissionCtrl+O: Open MissionCtrl+S: Save MissionCtrl+Shift+S: Save Mission AsDelete: Delete selected itemEscape: Cancel drawing modeF11: Toggle fullscreenF12: Toggle developer tools
- Electron: Desktop app framework
- React: UI framework
- Leaflet: Interactive map library
- React-Leaflet: React bindings for Leaflet
- Lucide React: Icon library
- Main Process: Electron main process handles file operations and menu
- Renderer Process: React application with map and UI components
- IPC Communication: Secure communication between main and renderer processes
- State Management: React hooks for application state
- Map not loading: Check internet connection for initial tile download
- Markers not appearing: Verify marker data structure and coordinates
- Drawing tools not working: Ensure drawing mode is properly activated
- File save errors: Check file permissions in selected directory
Run with npm run dev to enable:
- Developer tools (F12)
- Hot reload for React components
- Console logging for debugging
The codebase is designed to be:
- Modular: Each component has a single responsibility
- Maintainable: Clear separation of concerns
- Extensible: Easy to add new features and marker types
- Well-documented: Inline comments explain functionality
This is a demonstration application. Modify and use as needed for your tactical planning requirements.
Note: This application is designed for training and planning purposes. Ensure proper operational security (OPSEC) when using with sensitive information.