Skip to content

Repository files navigation

AutoLotManagerWPF

Build

Software to manage a fictional car lot using WPF, XAML, C#, Autofac, Prism, and MVVM.

WPFdemoapp

πŸ“‹ Table of Contents

✨ Features

Current Functionality

Core Features

  • Vehicle Management: Manage car inventory with properties including VIN, Make, Model, Year, and Color
  • MVVM Architecture: Clean separation of concerns using the Model-View-ViewModel pattern
  • Navigation System: Convention-based navigation infrastructure with dependency injection
  • Modular Design: Organized into separate projects for Core domain logic, ViewModels, and Desktop UI

User Interface

  • Modern WPF UI: Built with Material Design and MahApps.Metro for a modern look and feel
  • Hamburger Menu Navigation: Intuitive side navigation menu for accessing different modules
  • Multiple Pages/Views:
    • Home Page: Main dashboard and landing page
    • Inventory Management: View, add, edit, and manage vehicle inventory
    • Export Inventory: Export inventory data to external formats
    • Sales Management: Track and manage vehicle sales
    • Settings: Application configuration and preferences
    • About: Application information and version details

Technical Features

  • Dependency Injection: Full IoC container support using Autofac
  • Centralized Navigation: Menu labels mapped to pages in one registration file
  • Extensible Architecture: Easy to add new pages and features
  • View Model Resolution: Automatic view model creation and binding via DI container

πŸ› οΈ Technology Stack

Framework & Platform

  • .NET Framework 4.7.2: Target framework for Windows desktop applications
  • WPF (Windows Presentation Foundation): Modern Windows desktop UI framework
  • XAML: Declarative markup for UI design

Libraries & Packages

  • Autofac: Dependency injection and IoC container
  • Prism: Framework for building loosely coupled, maintainable, and testable XAML applications
  • MahApps.Metro: Toolkit for creating modern WPF applications
  • Bogus: Library for generating fake data (used in development/testing)

Architecture Patterns

  • MVVM (Model-View-ViewModel): Primary architectural pattern
  • Dependency Injection: For loose coupling and testability
  • Repository Pattern: For data access abstraction (ready for implementation)
  • Navigation Service: Convention-based page navigation

πŸ—οΈ Architecture

Solution Structure

The solution is organized into four projects:

  1. AutoLotManager.Core: Domain models and business logic

    • Contains the Car entity and core domain types
    • Framework-agnostic business logic
  2. AutoLotManager.ViewModel: View Models and presentation logic

    • All ViewModel classes implementing ViewModelBase
    • Separated from UI concerns for testability
    • Page-specific ViewModels organized by feature
  3. AutoLotManager.Desktop: WPF UI project

    • XAML views and code-behind
    • Navigation infrastructure (INavigationService, NavigationService)
    • Startup and bootstrapping logic
    • Material Design UI components
  4. AutoLotManager.Tests: NUnit test project

    • Unit tests for the navigation service and ViewModels
    • Targets net472 to match the Desktop project, since navigation returns a WPF Page
    • Run automatically by CI on every pull request

Navigation Architecture

The application uses a custom convention-based navigation system:

  • INavigationService: Interface defining navigation operations
  • NavigationService: Implementation that handles page creation and ViewModel binding
  • NavigationConfiguration: Centralized registration of all navigable pages
  • Automatic ViewModel Resolution: ViewModels are resolved from the DI container and bound to views automatically

For detailed information, see NAVIGATION.md and NAVIGATION_EXAMPLE.md.

πŸš€ Getting Started

Prerequisites

  • Windows Operating System (Windows 10 or later recommended)
  • Visual Studio 2019 or later (Visual Studio 2022 fully supported)
  • .NET Framework 4.7.2 Developer Pack (targeting pack) or later
  • NuGet Package Manager (included with Visual Studio)

Installation

  1. Clone the repository

    git clone https://github.com/aycee247/AutoLotManagerWPF.git
    cd AutoLotManagerWPF
  2. Restore NuGet packages

    nuget restore AutoLotManager.sln

    Or restore via Visual Studio: Right-click solution β†’ Restore NuGet Packages

  3. Build the solution

    msbuild AutoLotManager.sln /p:Configuration=Release

    Or build via Visual Studio: Build β†’ Build Solution (Ctrl+Shift+B)

  4. Run the application

    • Set AutoLotManager.Desktop as the startup project
    • Press F5 to run in debug mode, or Ctrl+F5 to run without debugging

πŸ“ Project Structure

AutoLotManagerWPF/
β”œβ”€β”€ AutoLotManager.Core/              # Domain models and business logic
β”‚   β”œβ”€β”€ Car.cs                        # Car entity model
β”‚   β”œβ”€β”€ Navigation/                   # UI-free navigation seam for ViewModels
β”‚   β”‚   β”œβ”€β”€ IPageNavigator.cs
β”‚   β”‚   └── PageNavigator.cs
β”‚   └── AutoLotManager.Core.csproj
β”‚
β”œβ”€β”€ AutoLotManager.ViewModel/         # ViewModels and presentation logic
β”‚   β”œβ”€β”€ ViewModelBase.cs              # Base class for all ViewModels
β”‚   β”œβ”€β”€ MainWindowViewModel.cs        # Main window ViewModel
β”‚   β”œβ”€β”€ MainHomePageViewModel.cs      # Home page ViewModel
β”‚   β”œβ”€β”€ Pages/                        # Feature-specific ViewModels
β”‚   β”‚   └── Inventory/
β”‚   β”‚       β”œβ”€β”€ InventoryHomePageViewModel.cs
β”‚   β”‚       └── ExportInventoryListPageViewModel.cs
β”‚   └── AutoLotManager.ViewModel.csproj
β”‚
β”œβ”€β”€ AutoLotManager.Desktop/           # WPF UI project
β”‚   β”œβ”€β”€ App.xaml                      # Application entry point
β”‚   β”œβ”€β”€ MainWindow.xaml               # Main window with hamburger menu
β”‚   β”œβ”€β”€ Navigation/                   # Navigation infrastructure
β”‚   β”‚   β”œβ”€β”€ INavigationService.cs
β”‚   β”‚   β”œβ”€β”€ NavigationService.cs
β”‚   β”‚   └── NavigationConfiguration.cs
β”‚   β”œβ”€β”€ Startup/                      # Application bootstrapping
β”‚   β”‚   └── Bootstrapper.cs           # DI container configuration
β”‚   β”œβ”€β”€ Pages/                        # All page views
β”‚   β”‚   β”œβ”€β”€ MainHomePage.xaml
β”‚   β”‚   β”œβ”€β”€ About/
β”‚   β”‚   β”œβ”€β”€ Inventory/
β”‚   β”‚   β”œβ”€β”€ Sales/
β”‚   β”‚   └── Settings/
β”‚   └── AutoLotManager.Desktop.csproj
β”‚
β”œβ”€β”€ AutoLotManager.Tests/             # NUnit test project
β”‚   β”œβ”€β”€ NavigationServiceTests.cs     # Navigation registration and behaviour
β”‚   β”œβ”€β”€ ViewModelTests.cs             # ViewModelBase and MainWindowViewModel
β”‚   β”œβ”€β”€ TestDoubles.cs                # Minimal Page/ViewModel stand-ins
β”‚   └── AutoLotManager.Tests.csproj
β”‚
β”œβ”€β”€ CLAUDE.md                         # Guidance for Claude Code, incl. doc upkeep
β”œβ”€β”€ CONTRIBUTING.md                   # Build, style, branching and PR flow
β”œβ”€β”€ docs/adr/                         # Architecture decision records
β”œβ”€β”€ README.md                         # This file
β”œβ”€β”€ NAVIGATION.md                     # Navigation system documentation
β”œβ”€β”€ NAVIGATION_EXAMPLE.md             # Step-by-step navigation guide
β”œβ”€β”€ IMPLEMENTATION_SUMMARY.md         # Implementation details
└── AutoLotManager.sln                # Visual Studio solution file

πŸ“š Documentation

Additional documentation is available in the following files:

Adding a New Page

To add a new page to the application:

  1. Create the Page (View) in AutoLotManager.Desktop/Pages/
  2. Add the new .xaml and .xaml.cs to AutoLotManager.Desktop.csproj β€” it is a legacy (non-SDK) project and does not pick up files automatically, so a file that is not listed there simply will not compile into the application
  3. Create the ViewModel in AutoLotManager.ViewModel/Pages/ (SDK-style, no project edit needed)
  4. Register the ViewModel in Bootstrapper.cs
  5. Register the page in NavigationConfiguration.cs
  6. Add a menu item in MainWindow.xaml whose Label matches the registered key

See NAVIGATION_EXAMPLE.md for a complete walkthrough.

πŸ—ΊοΈ Roadmap

Planned Enhancements

Each item below is tracked as a GitHub issue β€” follow the link for scope and implementation notes.

Core Functionality

  • Database Integration (#6): Implement Entity Framework or Dapper for data persistence
  • Customer Management (#7): Add customer entity and CRUD operations
  • Sales Transaction Processing (#8): Complete sales workflow with pricing and payment tracking
  • Inventory Reporting (#9): Generate reports on inventory status, sales trends, and analytics
  • Search & Filter (#10): Advanced search capabilities across inventory and sales
  • Data Import/Export (#11): Support for CSV, Excel, and JSON formats

User Interface

  • Dashboard with Analytics (#12): Charts and graphs for sales and inventory metrics
  • Print Functionality (#13): Print invoices, reports, and inventory lists
  • Multi-Language Support (#14): Internationalization (i18n) for global use
  • Themes (#15): Light/dark mode and customizable color schemes
  • Responsive Design (#16): Better layout adaptation for different screen sizes

Technical Improvements

  • Unit Tests (#17): Comprehensive test coverage for ViewModels and business logic
  • Integration Tests (#18): End-to-end testing of key workflows
  • Logging Framework (#19): Implement structured logging (Serilog, NLog)
  • Error Handling (#20): Global exception handling and user-friendly error messages
  • Configuration Management (#21): External configuration for app settings
  • API Integration (#22): RESTful API for external system integration
  • Authentication & Authorization (#23): User login and role-based access control

Developer Experience

  • CI/CD Pipeline (#24): Automated build, test, and deployment
  • Code Documentation (#25): XML documentation comments for all public APIs
  • Style Guide (#26): Coding standards and conventions document
  • Docker Support (#27): Containerization for easier development and deployment

Ideas for Future Features

Speculative, not committed work β€” each is tracked as an issue for discussion.

  • Vehicle History Tracking (#28): Maintenance records, service history, accident reports
  • Photo Management (#29): Upload and display vehicle photos
  • Pricing Calculator (#30): Automated pricing based on market data and vehicle condition
  • Email Notifications (#31): Automated alerts for low inventory, pending sales, etc.
  • Barcode/QR Code Integration (#32): Quick vehicle lookup and tracking
  • Mobile Companion App (#33): MAUI-based mobile application
  • Cloud Sync (#34): Multi-device synchronization via cloud storage
  • Audit Trail (#35): Track all changes to inventory and sales data
  • Financial Dashboard (#36): Integration with accounting systems
  • Customer Portal (#37): Self-service portal for customers to view inventory

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please ensure your code:

  • Follows the existing code style and conventions
  • Includes appropriate documentation
  • Works with the existing architecture
  • Does not break existing functionality

πŸ“„ License

This project is provided as-is for educational and demonstration purposes.


Note: This is a demonstration/portfolio project showcasing WPF, MVVM, and modern C# development practices. The "Auto Lot" is fictional, and the software is designed to demonstrate technical capabilities rather than for production use.

About

Software to manage a fictional car lot using WPF, XAML, C#, Autofac, Prism, and MVVM.

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages