Skip to content

Real-time aerospace control system with live flight tracking, AI-powered route optimization, and comprehensive dashboard. Built with Vue 3, Leaflet, and modern web technologies.

Notifications You must be signed in to change notification settings

sharstream/aerospace-control-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Aerospace Control System - Vue 3 Refactor

Modern Vue 3 application for aerospace airline visualization and control.

🎯 Project Overview

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.

πŸ“ Project Structure

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

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ installed
  • npm or yarn package manager

Installation

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

πŸ“¦ Dependencies

  • Vue 3.5.26 - Progressive JavaScript framework
  • Leaflet 1.9.4 - Interactive map library
  • Vite 6.0.7 - Next-generation frontend tooling

πŸ—οΈ Architecture

Root Orchestrator Pattern

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

Module Structure

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)

Shared Resources

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)

🎨 Features Preserved

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

πŸ”§ Development

Path Aliases

Configured in vite.config.js:

  • @ β†’ src/
  • @modules β†’ src/modules/
  • @shared β†’ src/shared/
  • @components β†’ src/components/
  • @assets β†’ src/assets/

Adding New Modules

  1. Create module directory in src/modules/[module-name]/
  2. Create ModuleName.vue component
  3. Import and register in App.vue
  4. Add navigation item in BottomNavigation.vue

State Management

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.

🎯 Next Steps

Future enhancements to consider:

  1. Add Pinia for centralized state management
  2. Add Vue Router for URL-based navigation
  3. Expand Dashboard with detailed flight analysis views
  4. Enhance AI Chat with real OpenAI API integration
  5. Add Tests (Vitest + Vue Test Utils)
  6. Add TypeScript for type safety
  7. Performance optimization with lazy loading
  8. Add PWA capabilities for offline usage

πŸ“ Migration Notes

What Changed

  • 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

What Stayed the Same

  • 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

πŸ› Known Issues

Pinia store proxy disconnection errors when accessing store properties during async operations (fixed - use storeToRefs pattern).

πŸ“„ License

Proprietary - Internal use only

🀝 Contributing

  1. Follow the established module structure
  2. Keep business logic in shared utilities
  3. Use Vue 3 Composition API
  4. Maintain consistent code style
  5. Test all changes before committing

πŸ“ž Support

For questions or issues, contact the development team.


πŸ” Dev Notes

Pinia Proxy Fix (Dec 2024)

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

About

Real-time aerospace control system with live flight tracking, AI-powered route optimization, and comprehensive dashboard. Built with Vue 3, Leaflet, and modern web technologies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •