# TANRAIL ONE — Core Capability Map

## 1. Overview
Every feature in TANRAIL ONE is classified into one of three tiers:
1. **Core Capability**: Universal features required by almost all businesses.
2. **Reusable Business Capability**: Features used by *some* (multiple) businesses, but not all.
3. **Business-Specific Extension**: Features strictly unique to a single business model.

This prevents the Core from becoming bloated with business-specific logic.

---

## 2. A. CORE CAPABILITIES
*These form the foundation of the platform.*

### Authentication & Authorization
- **Purpose:** Centralized login and RBAC (Role-Based Access Control).
- **Main Entities:** User, Role, Permission, Session.
- **BU Scope:** Global (Users can be assigned to specific BUs via Roles).

### Organization & BU Management
- **Purpose:** Managing the multi-tenant-like structure.
- **Main Entities:** Organization, Business Unit, Branch, Location.

### Master Data Management
- **Purpose:** Central registry for entities interacting with the business.
- **Main Entities:** Customer, Supplier, Product (Standard), Service.
- **Note:** Products should support variants and types to accommodate both a physical item and a digital/service item.

### Inventory & Warehouse
- **Purpose:** Tracking stock levels, movements, and valuations.
- **Main Entities:** Stock Item, Warehouse/Location, Stock Movement, Stock Take.

### Sales & Order Management
- **Purpose:** Standardized processing of customer purchases.
- **Main Entities:** Order, Order Item.

### Finance & Accounting
- **Purpose:** Managing money in and out.
- **Main Entities:** Invoice, Payment, Expense, Chart of Accounts, Tax Rates.

### System & Audit
- **Purpose:** Tracking system changes and workflows.
- **Main Entities:** Audit Log, Notification, Workflow State.

---

## 3. B. REUSABLE BUSINESS CAPABILITIES
*These are built as optional modules that a Business Unit can enable.*

### Production / Manufacturing
- **Purpose:** Converting raw materials into finished goods.
- **Used By:** Restaurant (Kitchen), Catering (Food Prep), Water (Bottling).
- **Main Entities:** Recipe / Bill of Materials (BOM), Production Order.

### Event Management
- **Purpose:** Managing scheduled, date-specific engagements.
- **Used By:** Catering, (Future: Equipment Rental, Training).
- **Main Entities:** Event, Schedule, Attendee/Guest List.

### Fleet & Delivery Management
- **Purpose:** Managing physical transportation of goods.
- **Used By:** Catering (Delivery), Water (Distribution), Transport.
- **Main Entities:** Vehicle, Driver, Route, Delivery Dispatch.

### Booking & Reservations
- **Purpose:** Reserving a resource for a time slot.
- **Used By:** Restaurant (Table Booking), Equipment Rental.
- **Main Entities:** Resource, Booking Slot.

---

## 4. C. BUSINESS-SPECIFIC EXTENSIONS
*These are isolated features that apply to one specific Business Unit.*

### Restaurant Extensions
- **Table Management:** Visual floor plan, table status (Occupied, Clean, Reserved).
- **Kitchen Display System (KDS):** Live order ticketing for chef stations.
- **POS Interface:** Fast-checkout UI specifically tailored for dine-in/takeaway.

### Catering Extensions
- **Catering Packages:** Pre-configured per-head menu pricing structures.
- **Tasting Sessions:** Tracking customer tasting events prior to final booking.

### Water Extensions (Future)
- **Batch Quality Tracking:** Tracking PH levels, chemical composition per batch.
- **Bottle Return Tracking:** Managing deposits and returns of 20L water dispensers.

---

## 5. Classification Rules
- Before building a new feature, check if it can be abstracted into a **Reusable Capability**.
- If a feature is heavily tied to terminology like "Table" or "Menu", ask if it is really just a "Resource Booking" or a "Product List". If yes, build the generic version and skin it for the BU.
