Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
56c2f4b
Initial plan
Copilot Dec 13, 2025
55d068f
Complete Railway Monitoring System implementation with realistic data
Copilot Dec 13, 2025
cdd3875
Fix code review issues: improve error handling and dependency docs
Copilot Dec 13, 2025
8876473
Add WPF application and energy management system for railway monitoring
Copilot Dec 13, 2025
4cf3473
Add comprehensive asset management system with rolling stock, mainten…
Copilot Dec 13, 2025
c533c2a
Complete WPF implementation with Services, Models, ViewModels and com…
Copilot Dec 14, 2025
2eca8f6
Add production-ready deployment with Docker, quick-start scripts and …
Copilot Dec 14, 2025
1364827
Fix code review issues: move imports to module level and correct CLI …
Copilot Dec 14, 2025
88fa0a0
Add comprehensive system review with functional gaps and architectura…
Copilot Dec 14, 2025
ba492cc
Update system review with ThemisDB API integration examples and revis…
Copilot Dec 14, 2025
5a260e2
Phase 1.1: Complete ThemisDB Entities API integration for train simul…
Copilot Dec 14, 2025
28254de
Phase 1.2: Add ThemisDB CDC stream integration to live map for real-t…
Copilot Dec 14, 2025
69ead81
Phase 1.3: Add comprehensive AQL query examples for railway analytics…
Copilot Dec 14, 2025
b51ac27
Phase 2.1: Implement WPF ThemisDbService with AQL query integration
Copilot Dec 14, 2025
1be12dc
Phase 2.2: Implement WPF ChangeFeedService with EventSource CDC strea…
Copilot Dec 14, 2025
58f853d
Phase 2.3: Add Web UI Analytics Dashboard with Chart.js and AQL integ…
Copilot Dec 14, 2025
5caa522
Phase 2.4: Complete network import with graph routing + energy consum…
Copilot Dec 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
559 changes: 559 additions & 0 deletions RAILWAY_COMPLETE_GUIDE.md

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions clients/RailwayMonitor.WPF/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<Application x:Class="RailwayMonitor.WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- Material Design -->
<materialDesign:BundledTheme BaseTheme="Dark"
PrimaryColor="Blue"
SecondaryColor="Lime" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />

<!-- MahApps Metro -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Dark.Blue.xaml" />
</ResourceDictionary.MergedDictionaries>

<!-- Custom Styles -->
<Style x:Key="TrainMarkerICE" TargetType="Ellipse">
<Setter Property="Fill" Value="#E74C3C"/>
<Setter Property="Width" Value="12"/>
<Setter Property="Height" Value="12"/>
</Style>

<Style x:Key="TrainMarkerIC" TargetType="Ellipse">
<Setter Property="Fill" Value="#F39C12"/>
<Setter Property="Width" Value="12"/>
<Setter Property="Height" Value="12"/>
</Style>

<Style x:Key="TrainMarkerRE" TargetType="Ellipse">
<Setter Property="Fill" Value="#3498DB"/>
<Setter Property="Width" Value="10"/>
<Setter Property="Height" Value="10"/>
</Style>

<Style x:Key="TrainMarkerRB" TargetType="Ellipse">
<Setter Property="Fill" Value="#2ECC71"/>
<Setter Property="Width" Value="10"/>
<Setter Property="Height" Value="10"/>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
101 changes: 101 additions & 0 deletions clients/RailwayMonitor.WPF/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
using System.Windows;
using RailwayMonitor.WPF.ViewModels;
using RailwayMonitor.WPF.Services;
using Microsoft.Extensions.DependencyInjection;
using Serilog;

namespace RailwayMonitor.WPF;

/// <summary>
/// Railway Monitoring System - WPF Application
///
/// Echtzeit-Überwachungssystem für Zugverkehr der Deutschen Bahn
/// - Live-Karte mit OSM
/// - Echtzeit-Telemetrie von ThemisDB
/// - Verspätungsanalyse mit LLM
/// - Was-wäre-wenn Szenarien
/// </summary>
public partial class App : Application
{
private ServiceProvider? _serviceProvider;

protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);

// Configure Serilog
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Console()
.WriteTo.File("logs/railway-monitor-.log", rollingInterval: RollingInterval.Day)
.CreateLogger();

Log.Information("Railway Monitoring System starting...");

// Configure Dependency Injection
var services = new ServiceCollection();
ConfigureServices(services);
_serviceProvider = services.BuildServiceProvider();

// Show Main Window
var mainWindow = _serviceProvider.GetRequiredService<MainWindow>();
mainWindow.Show();
}

private void ConfigureServices(IServiceCollection services)
{
// Configuration
services.AddSingleton<IConfiguration>(sp =>
{
var config = new AppConfiguration
{
ThemisDbUrl = "http://localhost:8765",
OllamaUrl = "http://localhost:11434",
UpdateIntervalMs = 1000,
MaxTrainsDisplay = 500
};
return config;
});

// Services
services.AddSingleton<IThemisDbService, ThemisDbService>();
services.AddSingleton<ITrainSimulatorService, TrainSimulatorService>();
services.AddSingleton<IMapService, MapService>();
services.AddSingleton<ILlmService, OllamaService>();
services.AddSingleton<IWebSocketService, WebSocketService>();

// ViewModels
services.AddTransient<MainViewModel>();
services.AddTransient<MapViewModel>();
services.AddTransient<TrainListViewModel>();
services.AddTransient<DelayAnalysisViewModel>();
services.AddTransient<NetworkStatusViewModel>();

// Windows
services.AddSingleton<MainWindow>();
}

protected override void OnExit(ExitEventArgs e)
{
Log.Information("Railway Monitoring System shutting down...");
_serviceProvider?.Dispose();
Log.CloseAndFlush();
base.OnExit(e);
}
}

public interface IConfiguration
{
string ThemisDbUrl { get; }
string OllamaUrl { get; }
int UpdateIntervalMs { get; }
int MaxTrainsDisplay { get; }
}

public class AppConfiguration : IConfiguration
{
public string ThemisDbUrl { get; set; } = "http://localhost:8765";
public string OllamaUrl { get; set; } = "http://localhost:11434";
public int UpdateIntervalMs { get; set; } = 1000;
public int MaxTrainsDisplay { get; set; } = 500;
}
Loading
Loading