Modern Vue 3 application for aerospace airline visualization and control.
This is a complete refactor of the original HTML-based aerospace control system into a modern Vue 3 application using Vite, while preserving all existing business logic and functionality.
aerospace-control-vue/
βββ src/
β βββ modules/ # Feature modules (one per tab)
β β βββ map/ # Map visualization with Leaflet
β β βββ dashboard/ # Flight operations dashboard
β β βββ weather/ # Weather monitoring
β β βββ analytics/ # Flight analytics
β β βββ settings/ # Application settings
β β βββ ai-chat/ # AI assistant chat
β βββ shared/ # Shared utilities and data
β β βββ data/ # Static data (airlines, aircraft, flights)
β β βββ utils/ # Utility functions (calculations)
β β βββ composables/ # Vue composables (future)
β βββ components/ # Shared UI components
β βββ assets/ # Static assets
β β βββ styles/ # Global styles
β βββ App.vue # Root component (orchestrator)
β βββ main.js # Application entry point
βββ index.html # HTML entry point
βββ vite.config.js # Vite configuration
βββ package.json # Dependencies
- Node.js 18+ installed
- npm or yarn package manager
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview- Vue 3.5.26 - Progressive JavaScript framework
- Leaflet 1.9.4 - Interactive map library
- Vite 6.0.7 - Next-generation frontend tooling
The App.vue component serves as the main orchestrator that:
- Manages global state (flights, active view, selected flight)
- Coordinates module loading and data flow
- Handles navigation between modules
- Provides centralized event handling
Each tab/feature is organized as a self-contained module:
module-name/
βββ ModuleName.vue # Main module component
βββ components/ # Module-specific components (if needed)
βββ composables/ # Module-specific logic (if needed)
All shared logic resides in src/shared/:
- Data: Airlines, aircraft models, airports, flights, weather
- Utils: Calculations (bearing, distance), system context
- Composables: Reusable Vue composition logic (future expansion)
All original functionality has been preserved:
β Interactive Leaflet map with OpenStreetMap
β Real-time flight animation and tracking
β Flight path visualization with great-circle routes
β Dynamic bearing calculation for aircraft orientation
β Weather hazard zones display
β Dashboard with flight cards and status
β Weather monitoring module
β Analytics with performance metrics
β Settings panel
β AI chat assistant (Commander Atlas)
β Bottom navigation with view switching
β Responsive design and animations
Configured in vite.config.js:
@βsrc/@modulesβsrc/modules/@sharedβsrc/shared/@componentsβsrc/components/@assetsβsrc/assets/
- Create module directory in
src/modules/[module-name]/ - Create
ModuleName.vuecomponent - Import and register in
App.vue - Add navigation item in
BottomNavigation.vue
Currently using:
- Vue's reactive state (
ref,computed) - Props and events for component communication
- Local storage for settings persistence
For larger scale, consider adding Pinia for centralized state management.
Future enhancements to consider:
- Add Pinia for centralized state management
- Add Vue Router for URL-based navigation
- Expand Dashboard with detailed flight analysis views
- Enhance AI Chat with real OpenAI API integration
- Add Tests (Vitest + Vue Test Utils)
- Add TypeScript for type safety
- Performance optimization with lazy loading
- Add PWA capabilities for offline usage
- Static HTML β Vue 3 SFC components
- Inline scripts β Modular Vue components
- Global variables β Reactive Vue state
- Direct DOM manipulation β Vue template reactivity
- Monolithic file β Organized module structure
- All business logic (calculations, data structures)
- Leaflet map implementation
- Flight animation algorithms
- Bearing calculations for aircraft orientation
- Weather hazard display
- All visual designs and UX
- OpenStreetMap integration
Pinia store proxy disconnection errors when accessing store properties during async operations (fixed - use storeToRefs pattern).
Proprietary - Internal use only
- Follow the established module structure
- Keep business logic in shared utilities
- Use Vue 3 Composition API
- Maintain consistent code style
- Test all changes before committing
For questions or issues, contact the development team.
Issue: Uncaught Error: disconnected port object during async store updates
Cause: Race condition accessing Pinia proxy while async API calls update state
Fix: Use storeToRefs to extract reactive refs in setup():
import { storeToRefs } from 'pinia';
setup() {
const store = useFlightsStore();
const { lastUpdate } = storeToRefs(store); // Extract refs
const formatted = computed(() => lastUpdate.value?.toLocaleTimeString());
return { formatted };
}
// β BAD: this.store.lastUpdate (proxy access during async)
// β
GOOD: storeToRefs + .value (safe ref access)Affected: src/modules/settings/SettingsModule.vue
Built with β€οΈ using Vue 3 & Vite