Skip to main content

Overview

The Product Inventory feature provides a centralized location for managing your product catalog. This feature is designed to help businesses track their products, manage stock levels, and maintain organized inventory records.
The Product Inventory feature is currently in active development. This page documents the planned functionality and architecture.

Purpose

The inventory management system serves several key business needs:

Product Catalog

Maintain a comprehensive list of all products

Stock Tracking

Monitor inventory levels and stock status

Pricing Integration

Connect with pricing calculators for accurate cost/price tracking

Sales History

Link products to sales transactions for analytics

Planned Features

The Product Inventory system is being designed with the following capabilities:

Product Information Management

  • Basic Details: Product name, description, SKU/barcode
  • Pricing Data: Cost, sale price, profit margins
  • Stock Levels: Current quantity, reorder points, location
  • Categories: Organize products into custom categories

Inventory Operations

1

Add Products

Create new product entries with all relevant details
2

Update Stock

Adjust quantities when receiving shipments or making sales
3

View Catalog

Browse and search your complete product list
4

Track Changes

Monitor inventory movements and history

Feature Architecture

The inventory feature follows Numix’s feature-first architecture pattern:
Directory Structure
lib/features/product_inventory/
├── screens/
│   └── product_inventory_screen.dart    # Main UI screen
├── providers/
│   └── inventory_provider.dart          # State management (planned)
├── models/
│   └── product.dart                     # Product data model (planned)
└── widgets/
    ├── product_card.dart                # Product display widget (planned)
    └── inventory_form.dart              # Add/edit form (planned)

Data Model (Planned)

The Product model will include:
product.dart (planned)
class Product {
  final String id;
  final String name;
  final String description;
  final String? sku;
  
  final double cost;
  final double salePrice;
  final double profitMargin;
  
  final int quantity;
  final int reorderPoint;
  final String? location;
  
  final String category;
  final DateTime createdAt;
  final DateTime updatedAt;
  
  // Methods for calculations
  double get totalValue => quantity * cost;
  double get potentialRevenue => quantity * salePrice;
  bool get needsReorder => quantity <= reorderPoint;
}

Integration with Other Features

The inventory system is designed to work seamlessly with existing Numix features:

Sales Price Calculator

When adding or editing products, users can leverage the Sales Price Calculator to determine optimal pricing:
  1. Enter product cost in inventory form
  2. Launch price calculator to compute sale price
  3. Apply calculated price back to product record
  4. Store both cost and price for profit tracking

Discount Calculator

The Discount Calculator can be used to:
  • Calculate temporary promotional prices
  • Determine bulk discount thresholds
  • Plan seasonal sales strategies

Sales History

Each sale can be linked to inventory records:
  • Automatic stock reduction on sale
  • Revenue tracking per product
  • Best-seller identification
  • Reorder alerts based on sales velocity

State Management

The inventory feature will use the same Provider-based state management pattern as other Numix features:
inventory_provider.dart (planned)
class InventoryProvider extends ChangeNotifier {
  final SharedPreferences _prefs;
  List<Product> _products = [];
  
  // CRUD operations
  Future<void> addProduct(Product product) async { ... }
  Future<void> updateProduct(Product product) async { ... }
  Future<void> deleteProduct(String id) async { ... }
  
  // Queries
  List<Product> getProductsByCategory(String category) { ... }
  List<Product> getLowStockProducts() { ... }
  List<Product> searchProducts(String query) { ... }
  
  // Analytics
  double get totalInventoryValue { ... }
  int get lowStockCount { ... }
}

Data Persistence

Product data will be persisted locally using SharedPreferences or a local database:
Suitable for small catalogs (< 100 products)
// Store products as JSON
final productsJson = products.map((p) => p.toJson()).toList();
await _prefs.setString('products', jsonEncode(productsJson));
For production use with significant inventory size, consider migrating from SharedPreferences to a proper database solution like SQLite.

User Interface (Planned)

The inventory screen will feature:
  • Product List: Scrollable list with search and filter capabilities
  • Add Button: Floating action button to create new products
  • Product Cards: Each showing key information (name, SKU, quantity, price)
  • Detail View: Tap a product to see full details and edit
  • Stock Alerts: Visual indicators for low-stock items

Development Status

The Product Inventory feature is currently in the design and planning phase. The screen placeholder exists in the codebase at:lib/features/product_inventory/screens/product_inventory_screen.dartContributions are welcome! See the Development Setup guide to get started.

Sales Price Calculator

Calculate optimal pricing for inventory items

Sales History

Track product sales over time

Feature-First Architecture

Learn about Numix’s modular architecture

Contributing

Help build the inventory system

Build docs developers (and LLMs) love