Skip to content

nightness/TemPOS.Avalonia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TemPOS.Avalonia

A modern, cross-platform Point of Sale (POS) system built with Avalonia UI and .NET 9.

Note: This project is a work-in-progress rewrite of my decade old project Tempos

Overview

TemPOS.Avalonia is a migration of the original WPF-based TemPOS application to Avalonia UI, enabling deployment on Windows, macOS, and Linux. The application is designed for restaurant and retail environments, providing comprehensive POS functionality.

Features

Core POS Operations

  • Order Entry - Add items to tickets, manage orders
  • Cash Out - Process payments (cash, card, check, gift card)
  • Register Drawer - Open/close drawer, track cash, safe drops, payouts

Employee Management

  • Employee List - View and manage employees
  • Clock In/Out - Employee time tracking
  • Schedule Editor - Create and manage work schedules
  • Job Management - Assign jobs and pay rates

Inventory & Menu

  • Item Management - Create/edit menu items with categories
  • Ingredient Tracking - Manage ingredients used in items
  • Option Sets - Configure item modifiers (toppings, sizes)

Promotions & Discounts

  • Coupons - Create and manage promotional coupons
  • Discounts - Configure percentage and fixed discounts

Venue Management

  • Seating - Configure rooms, tables, and seating
  • Reservations - Manage table reservations

Customer Features

  • Customer Database - Track customer information
  • Gift Cards - Issue and manage gift cards
  • Loyalty Points - Track customer rewards

Delivery

  • Delivery Management - Track delivery orders
  • Driver Assignment - Assign drivers to deliveries
  • Dispatch Tracking - Monitor delivery status

Reports

  • Sales Reports - Daily, weekly, monthly sales
  • Employee Reports - Hours worked, tips
  • Inventory Reports - Stock levels, usage

Technology Stack

  • UI Framework: Avalonia UI 11.x
  • Runtime: .NET 9
  • Database: SQLite with Entity Framework Core
  • Architecture: MVVM with CommunityToolkit.Mvvm
  • DI Container: Microsoft.Extensions.DependencyInjection

Project Structure

TemPOS.Avalonia/
├── src/
│   ├── TemPOS.Core/           # Core abstractions, services, models
│   ├── TemPOS.Data/           # Entity Framework Core, entities, repositories
│   ├── TemPOS.UI/             # Avalonia views and view models
│   ├── TemPOS.Desktop/        # Desktop application entry point
│   ├── TemPOS.Platform.Shared/ # Cross-platform service implementations
│   └── TemPOS.Platform.Windows/ # Windows-specific implementations
├── tests/
│   ├── TemPOS.Core.Tests/     # Unit tests for Core
│   └── TemPOS.Data.Tests/     # Unit tests for Data layer
└── tools/
    └── TemPOS.DataMigrator/   # Data migration utilities

Getting Started

Prerequisites

  • .NET 9 SDK
  • IDE: Visual Studio 2022, VS Code, or JetBrains Rider

Building

# Clone the repository
git clone https://github.com/yourusername/TemPOS.Avalonia.git
cd TemPOS.Avalonia

# Restore dependencies
dotnet restore

# Build the solution
dotnet build

Running

# Run the desktop application
dotnet run --project src/TemPOS.Desktop

Testing

# Run all tests
dotnet test

Configuration

The application stores configuration in a JSON file located at:

  • Windows: %APPDATA%/TemPOS/config.json
  • macOS: ~/Library/Application Support/TemPOS/config.json
  • Linux: ~/.config/TemPOS/config.json

The SQLite database is stored alongside the configuration file.

Hardware Support

The application includes abstractions for POS hardware:

  • Receipt Printers (via IPrinterService)
  • Cash Drawers (via IDeviceService)
  • Barcode Scanners (via IDeviceService)
  • Kitchen Printers

Hardware implementations are platform-specific and can be configured in the Hardware Settings screen.

Architecture

MVVM Pattern

The application follows the MVVM pattern:

  • Views (*.axaml) - Avalonia UI markup
  • ViewModels (*ViewModel.cs) - Logic and state management
  • Models - Entity classes representing domain objects

Navigation

Navigation is handled through the MainWindowViewModel which manages the CurrentViewModel property. Each screen's ViewModel exposes events (e.g., BackRequested) that the MainWindowViewModel subscribes to for navigation.

Data Layer

  • Entities - EF Core entity classes with navigation properties
  • AppDbContext - Database context with DbSet properties
  • IUnitOfWork - Transaction management abstraction
  • Repositories - Data access patterns (optional)

Contributing

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

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Original TemPOS project
  • Avalonia UI team
  • CommunityToolkit.Mvvm contributors

About

A cross-platform Point of Sale (POS) system built with Avalonia UI and .NET 9. This is a work-in-progress and not MVP yet.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages