Skip to content

ogden-marrow/CoffeeManagementSoftware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coffee Management Software

Build and Release

Continous Intigration Bulid

A simple console application for managing coffee inventory and tracking sales for your roasting business. Supports both interactive menu mode and command-line interface, with automatic syncing to your API server.

Features

  • Dual Interface: Interactive menu mode or command-line arguments
  • Auto-Sync Mode: Watches inventory file and automatically syncs changes to API
  • Inventory Management: Add coffees, update stock quantities (in bags)
  • Order Tracking: Record sales and track volume without customer data
  • Sales Reports: View sales statistics and trends
  • API Integration: Syncs inventory to your WeRoasting API server

Installation

Prerequisites

  • .NET 8.0 SDK

Build

dotnet build
dotnet publish -c Release

Usage

Interactive Menu Mode

Simply run without arguments to enter interactive mode:

dotnet run

Command-Line Mode

View Help

dotnet run help

Add a New Coffee

dotnet run add --name "Ethiopian Yirgacheffe" --origin "Ethiopia" --roast "Light" --price 18.50 --stock 50 --description "Bright and floral" --flavors "Blueberry, Jasmine, Citrus"

Update Stock Quantity

dotnet run update <coffee-id> --stock 25

Toggle Coffee Availability

Manually mark a coffee as available or unavailable (regardless of stock):

dotnet run toggle <coffee-id>

List All Coffees

dotnet run list

Record a Sale/Order

dotnet run order <coffee-id> --quantity 2

View Sales Report

# Last 30 days (default)
dotnet run report

# Last 7 days
dotnet run report --days 7

Manual Sync to API

dotnet run sync

Auto-Sync Mode

Watches the inventory file and automatically syncs changes:

dotnet run auto

Custom File Paths

By default, files are stored in the current directory. You can specify custom paths:

dotnet run list --inventory-path /path/to/inventory.json --orders-path /path/to/orders.json

Data Files

inventory.json

Stores coffee inventory and API configuration:

{
  "apiUrl": "https://api.weroasting.com",
  "apiKey": "your-api-key-here",
  "coffees": [
    {
      "id": "abc123def456",
      "name": "Ethiopian Yirgacheffe",
      "origin": "Ethiopia",
      "roastLevel": "Light",
      "description": "Bright and floral",
      "pricePerBag": 18.50,
      "stockQuantity": 50,
      "flavorNotes": ["Blueberry", "Jasmine", "Citrus"],
      "imageUrl": "",
      "isAvailable": true,
      "roastedDate": "2025-11-13T10:30:00Z",
      "createdAt": "2025-11-13T10:30:00Z",
      "updatedAt": "2025-11-13T10:30:00Z"
    }
  ]
}

orders.json

Tracks sales/orders without customer information:

{
  "orders": [
    {
      "id": "xyz789abc123",
      "coffeeId": "abc123def456",
      "coffeeName": "Ethiopian Yirgacheffe",
      "quantityBags": 2,
      "pricePerBag": 18.50,
      "totalPrice": 37.00,
      "orderDate": "2025-11-13T14:20:00Z"
    }
  ]
}

Workflow Examples

Starting a New Day

  1. Run in auto-sync mode to monitor inventory:
    dotnet run auto
  2. Use the interactive menu (in another terminal) to manage daily operations

Adding New Coffee

Interactive mode:

  1. Run dotnet run
  2. Select option 1 (Add New Coffee)
  3. Follow the prompts

Command-line mode:

dotnet run add --name "Colombian Supremo" --origin "Colombia" --roast "Medium" --price 16.00 --stock 40

Recording Daily Sales

  1. Use interactive menu option 5, or
  2. Use command line: dotnet run order <coffee-id> --quantity 3

Weekly Sales Review

dotnet run report --days 7

Manual Inventory Updates

When you receive new stock or roast a new batch:

  1. Use interactive menu option 2, or
  2. Use command line: dotnet run update <coffee-id> --stock 75

API Configuration

The API URL and API key are stored in inventory.json:

{
  "apiUrl": "https://api.weroasting.com",
  "apiKey": "your-api-key-here",
  "coffees": []
}

The API key is sent in the X-Deploy-Key header with every request.

The application will sync to these endpoints:

  • POST /api/Coffee - Create new coffee
  • PUT /api/Coffee/{id} - Update existing coffee
  • GET /api/Coffee/{id} - Check if coffee exists

Sales Reports

The report shows:

  • Total orders and revenue
  • Total bags sold
  • Average order value
  • Sales breakdown by coffee type
  • Recent order history

Example:

Sales Report (Last 30 days)
================================================================================
Total Orders: 45
Total Revenue: $892.50
Total Bags Sold: 87
Average Order Value: $19.83

Sales by Coffee:
--------------------------------------------------------------------------------
Ethiopian Yirgacheffe
  Orders: 18 | Bags: 35 | Revenue: $656.75
Colombian Supremo
  Orders: 15 | Bags: 32 | Revenue: $512.00

Tips

  • Run in auto-sync mode during business hours for automatic updates
  • Use the interactive menu for daily operations - it's more user-friendly
  • Use command-line mode for scripting or automation
  • Check the sales report weekly to understand your best sellers
  • The system auto-generates IDs for new coffees and orders
  • Stock is tracked in bags (not pounds) to match the API schema

License

MIT License - See LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Contributors

Languages