ddy - School Transportation Management System
Modern WPF application for comprehensive school bus fleet management, built with .NET 9.0 and Syncfusion controls. Features state-of-the-art PowerShell 7.5.2 automation with hyperthreading optimization.
BusBuddy streamlines school transportation operations through intelligent route management, vehicle tracking, and student assignment systems. Built with modern .NET technologies, professional-grade UI components, and state-of-the-art PowerShell 7.5.2 automation with machine-specific hyperthreading optimization.
- π Fleet Management: Vehicle tracking, maintenance scheduling, driver assignments
- π Route Optimization: Google Earth Engine integration for efficient route planning
- π₯ Student Management: Student enrollment, route assignments, pickup/dropoff tracking
- π Analytics Dashboard: Real-time metrics, performance reports, operational insights
- π§ Maintenance Tracking: Scheduled maintenance, repair history, compliance monitoring
- β‘ Performance Optimization: Hyperthreading-aware parallel processing and machine-specific tuning
- Windows 10/11 (for WPF)
- .NET 9.0 SDK (9.0.303 or later)
- PowerShell 7.5.2+ (with state-of-the-art features)
- Visual Studio Code (recommended) or Visual Studio 2022
BusBuddy includes state-of-the-art PowerShell automation with hyperthreading optimization:
# Quick installation with hyperthreading detection
.\Install-BusBuddyCompleteEnvironment.ps1
# Verify hyperthreading optimization
htinfo # Display hyperthreading information
sysinfo # System performance overview
perfmetrics # Real-time performance metrics
# Advanced parallel processing
bb-parallel-build # Hyperthreading-optimized build
bb-perf-profile # Performance profiling with machine tuning
bb-health-advanced # Comprehensive system health check# Clone the repository
git clone https://github.com/Bigessfour/BusBuddy-3.git
cd BusBuddy
# Enhanced build with hyperthreading optimization
bb-build # State-of-the-art parallel build
# Run with performance monitoring
bb-run # Run with advanced diagnostics
# Hyperthreading-aware testing
bb-test # Optimized test execution
# Optional: Load PowerShell development helpers (auto-loaded)
Import-Module .\PowerShell\Modules\BusBuddy.Commands\BusBuddy.Commands.psm1β Current Status: Application builds and runs successfully with modern UI.
Application is functional and ready for feature development:
- β Build Status: Clean build with 0 errors
- β Dependencies: All packages resolved (.NET 9.0, Syncfusion 30.1.42)
- β Database: Entity Framework migrations working with LocalDB
- β UI Framework: WPF with Syncfusion controls operational
- β Development Tools: PowerShell automation module available
- π Active Development: Ready for feature work
# Build and run the application
dotnet build BusBuddy.sln
dotnet run --project BusBuddy.WPF\BusBuddy.WPF.csproj
# Development helpers (optional)
Import-Module .\PowerShell\Modules\BusBuddy.Commands\BusBuddy.Commands.psm1
Test-BbAntiRegression # Check code quality
Test-BbXaml # Validate UI controls- β Build Status: Clean build with .NET 9.0 and Syncfusion 30.1.42
- β Core Application: WPF application runs successfully
- β Student Management: Working student entry and management features
- β Route Management: Basic route assignment functionality
- β Database: Entity Framework with LocalDB for development
- β PowerShell Tools: Development automation commands working
- β Syncfusion Licensing: Proper license registration implemented
- β Log Management: Centralized logging with consolidated workspace logs
- β Dependency Management: Comprehensive dependency health checking and vulnerability scanning
- β Legacy Code Removal: Purged 13 legacy test files and documentation artifacts
- β Dead Reference Cleanup: Removed orphaned references from FETCHABILITY-INDEX.json
- β Archive Consolidation: Cleaned up Documentation/Archive/LegacyScripts directory
- β Root Directory Cleanup: Removed temporary test files (TestApp.cs, TestConnection.cs, etc.)
- β Build Artifact Cleanup: Removed legacy build logs and temporary assembly fixes
- β Documentation Hygiene: Removed obsolete tracking files and raw link indexes
- β Dependency Management Module: Added comprehensive PowerShell module for package management
- β Enhanced Syncfusion License Handling: Improved registration with validation and diagnostics
- β
Centralized Logging: All workspace logs consolidated into
logs/collected/directory - β PowerShell Profile Formatting: Applied trunk formatting standards and PSScriptAnalyzer compliance
- β
License Management Helper: Added interactive
bbLicensecommand for secure key management - β Documentation Updates: Verified Syncfusion licensing requirements and NuGet package setup
- β Dependency Health Monitoring: Added bb-deps-check, bb-deps-update, and bb-deps-report commands
- β Codebase Hygiene: Comprehensive legacy cleanup removing 13 obsolete files and dead references
# Core Development
dotnet build BusBuddy.sln # Direct build
dotnet run --project BusBuddy.WPF # Run application
# PowerShell Helpers (from profile)
bbBuild # Build with environment setup
bbRun # Run with proper project targeting
bbLicense # Interactive Syncfusion license management
bbHealth # System health diagnostics
# Dependency Management (NEW)
bb-deps-check # Comprehensive dependency health check
bb-deps-update # Safe dependency updates with backups
bb-deps-dependabot # Validate Dependabot configuration
bb-deps-report # Generate dependency status reports
# Code Quality & Validation
bb-anti-regression # Scan for code quality issues
bb-xaml-validate # Validate Syncfusion controls usage
trunk check --force # Format and lint files with trunk- Feature Development: Building student and route management functionality
- UI Polish: Continuing Syncfusion control implementation for professional look
- Code Quality: Maintaining clean architecture and following .NET best practices
- Database: Using Entity Framework with LocalDB for development
- PowerShell Module: Recently fixed merge conflicts and improved compliance
- UI Consistency: Ongoing migration to Syncfusion controls throughout application
- Testing: Unit test coverage being expanded as features are added
- Documentation: Keeping docs current with active development
- Database migration to production SQL Server
- Environment-specific configuration
- Security review and hardening
- Syncfusion License: Use
bbLicenseto check/set license key interactively - Log Analysis: All workspace logs consolidated in
logs/collected/for easy review - Code Formatting: Use
trunk fmt --force [file]to apply project formatting standards - Migration Issues:
dotnet ef database update --force(see Troubleshooting Log) - Build Errors: Run
bbHealthfor comprehensive system diagnostics
# Run end-to-end CRUD validation
.\Test-EndToEndCRUD.ps1 -IncludeForeignKeyTests -GenerateReport
# Check system health
bbHealth
# Validate migration status
dotnet ef migrations list --project BusBuddy.Core
# Check Syncfusion license status
bbLicense| Issue | Quick Fix | Documentation |
|---|---|---|
| Migration History Out of Sync | dotnet ef database update --force |
Troubleshooting Log |
| EF Tools Version Mismatch | dotnet tool update --global dotnet-ef --version 9.0.8 |
Troubleshooting Log |
| Table Mapping Errors | Update DbContext entity configuration | Troubleshooting Log |
| FK Constraint Violations | Validate referential integrity with test script | Troubleshooting Log |
π Complete Issue Tracking: See TROUBLESHOOTING-LOG.md for detailed solutions and verification steps.
August 2025 Streamlining: Service interfaces are being migrated into
BusBuddy.Core/Services/Contracts, experimental XAI placeholders collapsed into archive (experiments/xai/XAI-ARCHIVE.md), and centralized PowerShell alias registration introduced (Register-BusBuddyAliases).
| Component | Technology | Version |
|---|---|---|
| Framework | .NET | 9.0.303 |
| UI Framework | WPF | Built-in |
| UI Controls | Syncfusion Essential Studio | 30.1.42 |
| Data Access | Entity Framework Core | 9.0.7 |
| Database | SQL Server / LocalDB | Latest |
| Logging | Serilog | 4.3.0 |
| Testing | NUnit | 4.3.1 |
| MVVM | CommunityToolkit.MVVM | 8.3.2 |
BusBuddy/
## π₯οΈ High DPI and font sizing (Syncfusion WPF v30.1.42)
- App is PerMonitorV2 DPI-aware via application manifest (`BusBuddy.WPF/app.manifest`).
- Windows-level: we use layout rounding and device pixel snapping on key windows.
- Per-monitor handling: StudentForm and StudentsView override OnDpiChanged to adjust font size and bitmap scaling quality when monitors change.
- Fonts: avoid hardcoded pixel sizes. Prefer inherited FontSize and theme/system resources. Where fixed sizes exist, they scale via window FontSize so they remain legible.
- Bitmaps/icons: prefer vector (glyphs/Segoe MDL2). When bitmaps are used, BitmapScalingMode switches to HighQuality for scale > 1.0.
- Syncfusion notes: ChromelessWindow TitleFontSize inherits window FontSize; no custom scaling needed. Use built-in theming (FluentDark/Light).
Now implemented:
- Manifest: PerMonitorV2 enabled and wired in `BusBuddy.WPF.csproj`.
- Windows: StudentForm and StudentsView set TextOptions and BitmapScalingMode and handle OnDpiChanged.
Rollout plan:
1) Apply the same pattern to the remaining views as you touch them (override OnDpiChanged, set text/bitmap options). 2) Prefer vector assets and inherited FontSize. 3) Avoid hardcoded pixel fonts; bind to window FontSize or theme resources.
Testing guidance:
- Move the window between monitors with different scaling (100% β 150%/200%) and watch text/controls stay crisp. Zoom-level changes should not blur bitmaps or clip text. Use ClearType rendering for text.
βββ π’ BusBuddy.Core/ # Business logic, data access, services
βββ π¨ BusBuddy.WPF/ # WPF UI layer with Syncfusion controls
βββ π§ͺ BusBuddy.Tests/ # Unit and integration tests
βββ π§ PowerShell/ # Build automation and utilities
βββ π Documentation/ # Project documentation
βββ π Standards/ # Development standards and guidelines
- MVVM: Model-View-ViewModel for clean separation of concerns
- Dependency Injection: Built-in .NET DI container
- Repository Pattern: Data access abstraction
- Command Pattern: User actions through ICommand interface
BusBuddy includes comprehensive PowerShell functions in the user profile for development tasks:
# Essential commands (Updated August 19, 2025)
bbBuild # Build the solution with environment setup
bbRun # Run the application with proper project targeting
bbLicense # Interactive Syncfusion license management
bbHealth # System diagnostics and health check
# Development workflow
bbClean # Clean solution and packages
bbRestore # Restore NuGet packages
bbTest # Execute all tests
# Code quality and formatting
trunk check --force [file] # Format and lint with trunk tools
bb-anti-regression # Prevent legacy patterns
bb-xaml-validate # Validate XAML files for Syncfusion complianceAll workspace logs are automatically consolidated into logs/collected/ directory for easy analysis:
- Application logs (bootstrap, runtime, errors)
- Build artifacts and file lists
- Trunk tool logs
- Test results and coverage reports
### **Building**
```bash
# Standard .NET CLI approach
dotnet build BusBuddy.sln
dotnet run --project BusBuddy.WPF\BusBuddy.WPF.csproj
# Alternative: Use PowerShell helpers
Import-Module .\PowerShell\Modules\BusBuddy.Commands\BusBuddy.Commands.psm1
Invoke-BbBuild
# Run all tests
dotnet test BusBuddy.sln
# Or use PowerShell
bb-testBusBuddy uses Syncfusion Essential Studio for WPF to provide a modern, professional user interface:
- SfDataGrid: Advanced data grid with sorting, filtering, and editing
- DockingManager: Professional layout management
- SfChart: Rich charting and visualization
- NavigationDrawer: Modern navigation patterns
- SfScheduler: Calendar and scheduling interface
- FluentDark: Modern dark theme
- FluentLight: Clean light theme
- Custom: BusBuddy-specific styling
- Fleet inventory and specifications
- Maintenance scheduling and tracking
- Driver assignments and qualifications
- Fuel consumption monitoring
- Inspection compliance
- Interactive route planning with Google Earth Engine
- Stop optimization and timing
- Student assignment to routes
- Real-time tracking and updates
- Performance analytics
- Student enrollment and profiles
- Route assignments and pickup locations
- Attendance tracking
- Parent communication
- Special needs accommodation
- Operational dashboards
- Performance metrics
- Cost analysis
- Compliance reporting
- Predictive maintenance
# Create/update database
dotnet ef database update
# Add new migration
dotnet ef migrations add NewMigrationNameSYNCFUSION_LICENSE_KEY: License key for Syncfusion WPF controls (required)- Community License: Free for individual developers and small teams
- Setup: Use
bbLicense -Setto securely configure your license key - Format: Long alphanumeric string (200+ characters)
- Validation: Built-in placeholder detection prevents trial dialogs
ConnectionStrings__DefaultConnection: Database connection stringGoogleEarthEngine__ApiKey: Google Earth Engine API key (optional for basic features)
BusBuddy uses Microsoft SecretManagement for secure API key storage, following enterprise security best practices:
# Install required modules (if not already installed)
Install-Module Microsoft.PowerShell.SecretManagement -Scope CurrentUser
Install-Module Microsoft.PowerShell.SecretStore -Scope CurrentUser
# Method 1: Set machine environment variable (recommended for development)
$env:XAI_API_KEY = "your-xai-api-key-here"
[System.Environment]::SetEnvironmentVariable("XAI_API_KEY", "your-xai-api-key-here", "Machine")
# Method 2: Update secure vault directly
Import-Module ".\PowerShell\Modules\BusBuddy-SecureConfig.psm1"
Set-Secret -Name "XAI_API_KEY" -Secret "your-xai-api-key-here" -Vault GlobalApiSecrets
# Verify configuration
Import-Module ".\PowerShell\Modules\grok-config.psm1" -Force
Get-ApiKeySecurely | Measure-Object -Character # Should show length 84
Test-GrokConnection -Verbose # Should show success with grok-4-0709- β No plain text exposure: API keys never visible in environment variables or process lists
- β Encrypted storage: Keys stored using .NET cryptographic APIs with user-specific encryption
- β Access control: Keys only accessible to the current user account
- β Automatic cleanup: Removes insecure environment variables after migration
- β Fallback support: Legacy environment variable support for migration
# API key retrieval and configuration
Get-ApiKeySecurely # Retrieve API key from secure vault or environment
grok-config # Show current Grok configuration (model: grok-4-0709)
Test-GrokConnection -Verbose # Test API connection with detailed output
# Secure vault management
Set-Secret -Name "XAI_API_KEY" -Secret "key" -Vault GlobalApiSecrets # Store in vault
Get-SecretInfo -Vault GlobalApiSecrets # List stored secrets
Initialize-SecureGrokConfig # Setup secure vault (auto-runs on import)
# Legacy support (environment variables are still supported)
$env:XAI_API_KEY # Machine environment variable (preferred for development)
$env:GROK_API_KEY # Alternative environment variable nameBusBuddy uses Grok-4 (xAI's flagship reasoning model) for AI-powered features:
# Current model configuration (August 2025)
DefaultModel = "grok-4-0709" # Exact model ID required by xAI API
BaseUrl = "https://api.x.ai/v1"
Context = 256000 # tokens (256K context window)
Features = "text + vision, function calling, real-time search"Important Notes:
- β
Use exact model ID:
"grok-4-0709"(not"grok-4"or"grok-4-latest") - β API compatibility: OpenAI-compatible /chat/completions endpoint
- β Released: July 9, 2025 with enhanced reasoning capabilities
- β Don't use: Generic names like
"grok-4"will return 400 Bad Request errors
- Vault-based storage: Uses Microsoft.PowerShell.SecretStore with AES encryption
- No environment exposure: API keys removed from
$env:variables and process environment - SecureString handling: Keys handled as SecureString objects in memory
- Automatic cleanup: Memory cleared after API usage to prevent exposure
- Audit logging: Security events logged for compliance
- Get License: Visit Syncfusion Community License
- Generate Key: Login to your Syncfusion account and generate license key
- Set Environment: Use
bbLicense -Setcommand and paste your key when prompted - Verify: Run
bbLicenseto check status; application should start without trial dialogs
Note: No separate licensing NuGet package required - license registration is built into Syncfusion WPF packages.
Configuration is managed through appsettings.json files in each project:
BusBuddy.Core/appsettings.json: Core configurationBusBuddy.WPF/appsettings.json: UI-specific settings
BusBuddy includes a comprehensive testing infrastructure with VS Code NUnit Test Runner integration:
# Load advanced testing module
Import-Module ".\PowerShell\Modules\BusBuddy.Testing\BusBuddy.Testing.psd1"
# Quick testing commands
bb-test # Run all tests
bb-test -TestSuite Unit # Run unit tests only
bb-test-watch # Continuous testing with file monitoring
bb-test-report # Generate comprehensive markdown report
bb-test-status # Check current test statusLegacy Phase 3/4 harness scripts have been archived (see Documentation/Archive/LegacyScripts/INDEX.md). Current active tests:
- Unit Tests:
BusBuddy.Tests/Core/- Core business logic validation - Integration Tests:
BusBuddy.Tests/Phase3Tests/- Database and service interactions (rename planned post-MVP) - Validation Tests:
BusBuddy.Tests/ValidationTests/- Input validation and error handling
| Category | Filter | Description |
|---|---|---|
| All | No filter | Complete test suite |
| Unit | Category=Unit |
Core business logic |
| Integration | Category=Integration |
Database/service interactions |
| Validation | Category=Validation |
Input validation & error handling |
| Core | TestName~Core |
BusBuddy.Core project tests |
| WPF | TestName~WPF |
UI and presentation layer |
Legacy Phase 4 tasks removed; use standard NUnit Test Explorer or bbTest commands.
- NUnit Test Runner Extension: Automatic test discovery and execution
- PowerShell:
bbTest(all) / futurebbTest -Watch(planned)
- Watch Mode: Monitors
*.csand*.xamlfiles for changes, auto-runs tests - Detailed Reporting: Markdown reports with metrics, environment details, and recommendations
- Category-Based Testing: Focus on specific test types during development
- Microsoft Compliance: PowerShell 7.5.2 standards-compliant automation
Test coverage reports are generated in TestResults/ directory with detailed TRX files and comprehensive markdown reports in Documentation/Reports/.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow the development standards
- Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- β Syncfusion controls only (no standard WPF controls)
- β Serilog logging (no Microsoft.Extensions.Logging)
- β PowerShell 7.5.2 compliance (no Write-Host)
- β .NET 9.0 target framework
- β MVVM pattern with proper separation of concerns
- All tests must pass:
bb-test - Code analysis must pass:
bb-build - XAML validation:
bb-xaml-validate - PowerShell compliance: Follow Microsoft standards
- β Foundation: Complete (.NET 9, Syncfusion, EF Core)
- β Testing Infrastructure: Operational (NUnit, coverage reporting)
- β PowerShell Automation: Core functionality stable (compliance improvements needed)
- π‘ UI Migration: Completing Syncfusion control migration (some inconsistencies remain)
- π‘ Student Management: Core features functional (production hardening in progress)
- π Production Readiness: Requires addressing known risks listed above
- π― Route Optimization: Next major milestone
- Build Status: β Passing (0 errors, warnings documented)
- Test Coverage: 75%+ achieved (85% target)
- Code Quality: Meets development standards (production review pending)
- Documentation: Comprehensive for development (operational docs needed)
- PowerShell Compliance: 45% (Microsoft standards remediation in progress)
- π― Student Entry System: Complete student-to-route assignment
- π± Mobile Companion: Driver mobile app
- π Real-time Notifications: Parent and administrator alerts
- π€ AI Route Optimization: Machine learning for route efficiency
- π Advanced Analytics: Predictive maintenance and cost optimization
- Integration with state transportation reporting systems
- Multi-district support
- IoT device integration for real-time tracking
- Environmental impact tracking and reporting
- π Documentation: Start with this README and linked guides
- π§ PowerShell: Use
bbHealthfor system diagnostics - π Issues: Create GitHub issues for bugs or feature requests
- π¬ Discussions: Use GitHub discussions for questions
# System health check
bbHealth
# Build diagnostics
bb-build 2>&1 | tee build-output.log
# XAML validation
bb-xaml-validateThis project is licensed under the MIT License - see the LICENSE file for details.
- Syncfusion: Professional WPF controls
- Microsoft: .NET platform and development tools
- PowerShell Team: Advanced automation capabilities
- NUnit Team: Comprehensive testing framework
Built with β€οΈ for school transportation professionals
Last Updated: August 19, 2025 - Enhanced licensing, logging, and PowerShell automation