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.
- 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
- .NET 8.0 SDK
dotnet build
dotnet publish -c ReleaseSimply run without arguments to enter interactive mode:
dotnet rundotnet run helpdotnet run add --name "Ethiopian Yirgacheffe" --origin "Ethiopia" --roast "Light" --price 18.50 --stock 50 --description "Bright and floral" --flavors "Blueberry, Jasmine, Citrus"dotnet run update <coffee-id> --stock 25Manually mark a coffee as available or unavailable (regardless of stock):
dotnet run toggle <coffee-id>dotnet run listdotnet run order <coffee-id> --quantity 2# Last 30 days (default)
dotnet run report
# Last 7 days
dotnet run report --days 7dotnet run syncWatches the inventory file and automatically syncs changes:
dotnet run autoBy 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.jsonStores 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"
}
]
}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"
}
]
}- Run in auto-sync mode to monitor inventory:
dotnet run auto
- Use the interactive menu (in another terminal) to manage daily operations
Interactive mode:
- Run
dotnet run - Select option 1 (Add New Coffee)
- Follow the prompts
Command-line mode:
dotnet run add --name "Colombian Supremo" --origin "Colombia" --roast "Medium" --price 16.00 --stock 40- Use interactive menu option 5, or
- Use command line:
dotnet run order <coffee-id> --quantity 3
dotnet run report --days 7When you receive new stock or roast a new batch:
- Use interactive menu option 2, or
- Use command line:
dotnet run update <coffee-id> --stock 75
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 coffeePUT /api/Coffee/{id}- Update existing coffeeGET /api/Coffee/{id}- Check if coffee exists
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
- 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
MIT License - See LICENSE file for details