# GhostFoundry Module Configuration Guide

## Overview

The Configuration Center is the backbone of your GhostFoundry deployment. It lets you customize exactly which ERP modules are active, creating a tailored system that matches your business needs without the bloat of traditional ERPs.

## Accessing the Configuration Center

Navigate to **Ghost Control → Modules** or visit `/ghost-control/configuration`.

## Module Categories

### Core Platform (Always On)
These modules cannot be disabled. They form the foundation of the system:

- **Configuration & Settings** — Module management, feature flags, org settings
- **Identity & Access** — Authentication, RBAC, audit logging, behavioral fingerprinting
- **Agent Orchestration** — The AI agent hierarchy system (Agent CEO + domain agents)

### Operations
Functional business modules that can be toggled on/off:

- **Finance & Accounting** — Chart of accounts, GL, invoicing, budgets
- **Human Resources** — Employee management, payroll, time tracking, leave
- **Inventory & Supply Chain** — Products, stock, suppliers, purchase orders
- **CRM & Sales** — Customers, pipeline, leads, quotes, sales orders
- **Document Management** — Documents, contracts, version control
- **Approval Workflows** — Configurable multi-step approval chains
- **Project Management** — Projects, tasks, milestones, resource allocation
- **Expense Management** — Expense reports, receipt capture, reimbursement
- **AP/AR Management** — Accounts payable/receivable, aging, reconciliation
- **Manufacturing & BOM** — Bill of materials, work orders, production
- **Asset Management** — Fixed assets, depreciation, maintenance
- **Quality Management** — QC inspections, CAPA, quality metrics
- **Ticketing & Help Desk** — Support tickets, SLAs, knowledge base

### Intelligence
- **Sentinel (Security)** — Continuous monitoring, anomaly detection
- **Intelligence Briefs** — Weekly executive summaries
- **Reporting & BI** — Custom reports, KPI dashboards
- **Dark Factory** — AI-powered code generation
- **AI Agent** — Personal AI companions that grow with users

### Add-ons
- **E-Commerce & Storefront** — Online catalog, cart, checkout
- **Fleet & Logistics** — Vehicle tracking, route optimization
- **Tax & Compliance** — Tax calculation, regulatory reporting

## How Module Toggle Works

1. **Enable a Module**: Click the toggle switch. The system checks all dependencies first.
2. **Disable a Module**: Click the toggle. The system prevents disabling if other enabled modules depend on it.
3. **Agent Activation**: When a module is enabled, its corresponding AI Agent activates automatically. When disabled, the agent goes dormant.

## Dependencies

Modules declare dependencies on other modules. For example:
- **Expense Management** requires Finance + HR
- **Manufacturing** requires Inventory
- **E-Commerce** requires Inventory + CRM

The system enforces these automatically — you'll see a clear error if you try to enable a module without its dependencies.

## Tiers

Modules are available in three tiers:
- **Starter** — Core functionality, basic operations
- **Professional** — Advanced modules (projects, expenses, reporting)
- **Enterprise** — Full suite (manufacturing, quality, e-commerce)

## Best Practices

1. Start with the defaults (Finance, HR, Inventory, CRM, Documents, Sentinel)
2. Add modules as your needs grow
3. Don't enable modules you won't use — dormant agents consume no resources
4. Use the Configuration Center as your "module org chart"
