← back to Designer Wallcoverings
DW-Agents/dw-agents/DIRECTORY_STRUCTURE.md
523 lines
# DW-Agents Complete Directory Structure
**Last Updated**: November 10, 2025
**System Version**: 1.0+
**Total Agents**: 25+
## Overview
Comprehensive directory structure documentation for the Designer Wallcoverings multi-agent AI system built on Claude AI (Anthropic). This document provides a complete map of the codebase organization, purpose of each directory, and relationships between components.
---
## Root Directory Structure
```
/root/DW-Agents/
├── agent-*/ # Individual agent directories (25+ agents)
├── data/ # Persistent data storage
├── logs/ # PM2 process logs
├── public/ # Static web files
├── scripts/ # Utility scripts
├── reports/ # Generated reports
├── archives/ # Historical data archives
├── versions/ # Version control for components
├── DWLegalTeam/ # Standalone legal compliance system
├── node_modules/ # Node.js dependencies
├── *.ts # Root-level agent implementations
├── *.js # Utility scripts and tools
├── *.sh # Shell scripts
├── *.md # Documentation files
├── *.json # Configuration and data files
├── ecosystem.config.js # PM2 configuration
├── package.json # NPM dependencies
└── .env # Environment variables
```
---
## Agent Directories (agent-*)
### Executive Dashboards
#### agent-executive-ceo/
**Port**: 7121 | **Purpose**: CEO/President executive dashboard
- Full system access, strategic insights, board meeting prep
- [Documentation](agent-executive-ceo/README.md)
#### agent-executive-cfo/
**Port**: 7122 | **Purpose**: CFO financial dashboard
- Financial KPIs, P&L, budget analysis, forecasting
- [Documentation](agent-executive-cfo/README.md)
#### agent-executive-coo/
**Port**: 7124 | **Purpose**: COO operations dashboard
- Operational oversight, process efficiency, cross-department coordination
- [Documentation](agent-executive-coo/README.md)
#### agent-executive-vp-ops/
**Port**: 7123 | **Purpose**: VP Operations tactical dashboard
- Daily operations, task distribution, team coordination
- [Documentation](agent-executive-vp-ops/README.md)
### Operational Agents
#### agent-task-orchestrator/
**Port**: 9900 | **Purpose**: Master task management and coordination
- Central task routing, status tracking, audit trails, self-healing
- Database: tasks-database.json (6.5MB)
- [Documentation](agent-task-orchestrator/README.md)
#### agent-purchasing-office/
**Port**: 9880 | **Purpose**: Office supply ordering and inventory
- Amazon integration, price comparison, inventory tracking, auto-reorder
- [Documentation](agent-purchasing-office/README.md)
#### agent-digital-samples/
**Port**: 9879 | **Purpose**: Digital sample fulfillment automation
- Shopify webhook processing, Google Drive search, image resizing, email delivery
- [Documentation](agent-digital-samples/README.md)
#### agent-marketing/
**Port**: 9881 | **Purpose**: Marketing campaigns and content creation
- Blog posts, social media, email campaigns, Shopify integration
- [Documentation](agent-marketing/README.md)
#### agent-accounting/
**Port**: 9882 | **Purpose**: Financial management and reporting
- P&L generation, expense tracking, invoices, budget forecasting
- [Documentation](agent-accounting/README.md)
#### agent-legal-team/
**Port**: 9878 | **Purpose**: Settlement compliance monitoring
- Tropical pattern detection, Azure CV integration, violation alerts
- [Documentation](agent-legal-team/README.md)
#### agent-zendesk-chat/
**Port**: 9884 | **Purpose**: Customer support integration
- Zendesk ticket management, AI response suggestions, chat analytics
- [Documentation](agent-zendesk-chat/README.md)
#### agent-shopify-store/
**Port**: 7238 | **Purpose**: Shopify store management
- Product catalog, orders, customers, inventory, webhooks
- [Documentation](agent-shopify-store/README.md)
#### agent-new-client-signup/
**Purpose**: Customer onboarding automation
- Registration processing, account setup, welcome workflows
- [Documentation](agent-new-client-signup/README.md)
#### agent-trend-research/
**Port**: 9883 | **Purpose**: Market trend analysis
- Design trends, competitor analysis, vendor relations, market intelligence
- [Documentation](agent-trend-research/README.md)
### System Management Agents
#### agent-server-uptime/
**Port**: 9888 | **Purpose**: Server health and uptime monitoring
- PM2 process monitoring, domain health checks, auto-restart, alerts
- [Documentation](agent-server-uptime/README.md)
#### agent-log-monitor/
**Port**: 7239 | **Purpose**: Automated log analysis and error detection
- Real-time log tailing, error pattern detection, issue escalation
- [Documentation](agent-log-monitor/README.md)
#### agent-restart-analyzer/
**Port**: 7241 | **Purpose**: Restart pattern analysis
- Agent stability tracking, failure prediction, root cause analysis
- [Documentation](agent-restart-analyzer/README.md)
#### agent-needs-attention/
**Port**: 9886 | **Purpose**: Issue detection and escalation
- Critical alerts, blocked tasks, human handoff coordination
- [Documentation](agent-needs-attention/README.md)
#### agent-ui-manager/
**Port**: 7240 | **Purpose**: Central UI/UX management
- Agent directory, universal chat, theme customization
- [Documentation](agent-ui-manager/README.md)
#### agent-skills-manager/
**Port**: 9894 | **Purpose**: AI skills and capabilities management
- Skills registry, usage tracking, performance monitoring
- [Documentation](agent-skills-manager/README.md)
#### agent-security/
**Purpose**: Security monitoring and compliance
- Auth bypass prevention, access control, security audits
- [Documentation](agent-security/README.md)
### Reporting & Analytics Agents
#### agent-todays-highlights/
**Port**: 9885 | **Purpose**: Daily summary generation
- Daily highlights, metrics aggregation, EOD reports
- [Documentation](agent-todays-highlights/README.md)
#### agent-completed-tasks/
**Purpose**: Task archival and analytics
- Historical task analysis, performance metrics, success rates
- [Documentation](agent-completed-tasks/README.md)
### Parallel Processing Agents
#### agent-in-parallel/
**Port**: 9891 | **Purpose**: Parallel task execution
- Batch processing, concurrent operations, load balancing
- [Documentation](agent-in-parallel/README.md)
#### agent-parallel-processes/
**Port**: 9890 | **Purpose**: Multi-process coordination
- Concurrent operations, process management
- [Documentation](agent-parallel-processes/README.md)
---
## Support Directories
### data/
**Purpose**: Persistent data storage and caching
```
data/
├── amazon-cache/ # Amazon order/product cache
├── amazon-orders.json # Real order data
├── office-inventory.json # Inventory tracking
└── price-tracking.json # Multi-vendor prices
```
[Full Documentation](data/README.md)
### logs/
**Purpose**: PM2 process logs for all agents
```
logs/
├── [agent]-out.log # Standard output per agent
└── [agent]-error.log # Error output per agent
```
[Full Documentation](logs/README.md)
### public/
**Purpose**: Static files served to web interfaces
```
public/
└── quantity-validator.js # Client-side form validation
```
[Full Documentation](public/README.md)
### scripts/
**Purpose**: Utility scripts and automation
- Shell scripts for agent management
- Authentication updates
- Memory system setup
- Data synchronization
- Archival automation
[Full Documentation](scripts/README.md)
### reports/
**Purpose**: Generated reports and analytics
```
reports/
├── daily/ # Daily reports
├── weekly/ # Weekly summaries
├── monthly/ # Monthly reports
├── analytics/ # Data insights
└── executive/ # Executive summaries
```
[Full Documentation](reports/README.md)
### archives/
**Purpose**: Historical data and backups
```
archives/
├── highlights/ # Archived daily highlights
├── reports/ # Old reports (compressed)
├── logs/ # Archived log files
├── databases/ # Database snapshots
└── backups/ # System backups
```
[Full Documentation](archives/README.md)
### versions/
**Purpose**: Version control for major releases
```
versions/
├── task-orchestrator-agent-v1.0.110725.ts
├── VERSION-1.0.110725-CHANGELOG.md
└── v1.1.110725/
```
[Full Documentation](versions/README.md)
### DWLegalTeam/
**Purpose**: Standalone legal compliance system
- Separate node_modules and dependencies
- Azure Cognitive Services integration
- Settlement agreement monitoring
- Tropical pattern detection
[Full Documentation](DWLegalTeam/README.md)
---
## Root-Level Files
### Agent Implementations (*.ts)
Core agent TypeScript files (44 total):
- `accounting-agent.ts` (31,545 bytes)
- `completed-tasks-agent.ts` (19,316 bytes)
- `digital-samples-agent.ts` (42,845 bytes)
- `in-parallel-agent.ts` (19,706 bytes)
- `marketing-agent.ts` (49,787 bytes)
- `master-hub.ts` (43,848 bytes) - Central dashboard
- `needs-attention-agent.ts` (25,421 bytes)
- `new-client-signup-agent.ts` (15,773 bytes)
- `parallel-processes-agent.ts` (23,355 bytes)
- `purchasing-office-agent.ts` (49,240 bytes)
- `server-uptime-agent.ts` (30,321 bytes)
- `task-orchestrator-agent.ts` (60,946 bytes)
- `todays-highlights-agent.ts` (30,679 bytes)
- `trend-research-agent.ts` (46,127 bytes)
- `zendesk-chat-agent.ts` (59,126 bytes)
- `agents-viewer.ts` (24,413 bytes) - Port 9111
### Shared Infrastructure (*.ts)
- `shared-auth.ts` (2,209 bytes) - SSO authentication
- `shared-memory-system.ts` (5,765 bytes) - Persistent memory
- `shared-chat.ts` (6,593 bytes) - Chat utilities
- `shared-task-reporter.ts` (5,963 bytes) - Task reporting
- `shared-ui-components.js` (10,356 bytes) - Universal UI
### Integration Modules (*.ts)
**Amazon Integration**:
- `amazon-data-cache.ts` (8,114 bytes) - Caching system
- `amazon-order-fetcher.ts` (5,345 bytes)
- `amazon-paapi-integration.ts` (8,669 bytes)
- `amazon-real-orders.ts` (4,822 bytes)
- `amazon-realtime-scraper.ts` (8,597 bytes)
- `fetch-real-amazon-orders.ts` (11,106 bytes)
**Shopify Integration**:
- `shopify-customers.ts` (7,249 bytes)
**Google Drive**:
- `setup-google-drive-auth.ts` (3,413 bytes)
- `test-google-drive-access.ts` (6,476 bytes)
- `google-drive-service-account-example.ts` (3,099 bytes)
**Other Integrations**:
- `slack-integration.ts` (7,661 bytes)
### Utility Scripts (*.ts/*.js)
- `add-completed-tasks.ts` (4,189 bytes)
- `add-lincrusta-task.ts` (6,131 bytes)
- `add-memory-to-all-agents.ts` (5,883 bytes)
- `auto-reorder-ai.ts` (7,723 bytes)
- `daily-price-tracker.ts` (9,115 bytes)
- `enhance-memory-chat.ts` (4,008 bytes)
- `generate-eod-report.ts` (9,557 bytes)
- `multi-vendor-pricer.ts` (7,053 bytes)
- `office-competitors-search.ts` (6,396 bytes)
- `sync-todos-to-orchestrator.js` (7,876 bytes)
### Shell Scripts (*.sh)
- `add-memory-to-all-chats.sh` (2,157 bytes)
- `archive-highlights.sh` (2,157 bytes)
- `auto-sync-wrapper.sh` (288 bytes)
- `create-agent-memory-files.sh` (2,589 bytes)
- `fix-all-auth-bypasses.sh` (1,291 bytes)
- `get-amazon-api-credentials.sh` (3,834 bytes)
- `manage-agents.sh` (4,222 bytes)
- `update-all-agent-auth.sh` (2,589 bytes)
- `update-auth-constants.sh` (1,786 bytes)
### Configuration Files
- `ecosystem.config.js` (7,090 bytes) - PM2 configuration for 20+ agents
- `package.json` (1,135 bytes) - Node.js dependencies
- `package-lock.json` (176,489 bytes) - Dependency lock
- `.env` (680 bytes) - Environment variables (credentials)
- `.env.example` (473 bytes) - Example configuration
### Data Files (*.json)
- `tasks-database.json` (6,538,486 bytes - 6.5MB) - Central task database
- `task-memory.json` (4,611 bytes) - Task orchestrator memory
- `parallel-tasks.json` (713 bytes) - Parallel task queue
- `known-fixes.json` (1,578 bytes) - Known issue fixes
- `todays-real-highlights.json` (3,635 bytes) - Current day highlights
### Documentation Files (*.md)
**System Documentation**:
- `README.md` (10,953 bytes) - Main project README
- `AGENTS_INDEX.md` (5,134 bytes) - Agent registry
- `COMPLETE-SYSTEM.md` (13,350 bytes) - System overview
- `QUICK_REFERENCE.md` (4,065 bytes) - Quick start guide
- `VERSION.txt` (314 bytes) - System version
**Feature Documentation**:
- `CHAT-FEATURES.md` (10,602 bytes)
- `CHAT_FEATURE_SUMMARY.md` (4,449 bytes)
- `CHAT_IMPLEMENTATION_GUIDE.md` (8,929 bytes)
- `COMPLETE-MONITORING-OVERVIEW.md` (9,822 bytes)
- `FULL-MONITORING-COMPLETE.md` (9,372 bytes)
- `MEMORY-SYSTEM-COMPLETE.md` (3,394 bytes)
- `MEMORY-SYSTEM-USAGE.md` (4,209 bytes)
- `TASK-ORCHESTRATOR-COMPLETE.md` (5,237 bytes)
- `TASK-ORCHESTRATOR-INTEGRATION.md` (7,170 bytes)
**Implementation Documentation**:
- `AMAZON-PAAPI-SETUP.md` (5,239 bytes)
- `DAILY-REPORTING-SYSTEM-COMPLETE.md` (14,900 bytes)
- `FIREWALL-PORT-MANAGEMENT.md` (3,709 bytes)
- `GOOGLE-DRIVE-SETUP.md` (3,518 bytes)
- `HANDOFF-IMPLEMENTATION.md` (8,323 bytes)
- `IMPLEMENTATION-COMPLETE.md` (5,412 bytes)
- `INFINITE_SCROLL_IMPLEMENTATION.md` (8,701 bytes)
- `SECURITY-UPDATE-SUMMARY.md` (5,939 bytes)
- `SETUP_COMPLETE.md` (4,544 bytes)
---
## Directory Relationships
### Data Flow
```
Shopify Store (7238)
↓
Task Orchestrator (9900) → Agent Routing
↓ ↓
Digital Samples (9879) Purchasing (9880)
↓ ↓
Google Drive Amazon APIs
↓ ↓
Customer Email Office Inventory
```
### Monitoring Flow
```
All Agents → Logs Directory
↓
Log Monitor (7239) → Error Detection
↓
Needs Attention (9886) → Alert Escalation
↓
Task Orchestrator (9900) → Task Creation
```
### Reporting Flow
```
All Agents → Data Collection
↓
Today's Highlights (9885) → Daily Summary
↓
Reports Directory → Storage
↓
Archives → Long-term Retention
```
### Executive Dashboard Flow
```
All Operational Data
↓
COO Dashboard (7124) → Operations View
CFO Dashboard (7122) → Financial View
↓
CEO Dashboard (7121) → Strategic View
```
---
## Port Allocation Map
| Port | Agent | Purpose |
|------|-------|---------|
| 7121 | CEO Dashboard | Executive overview |
| 7122 | CFO Dashboard | Financial metrics |
| 7123 | VP Ops Dashboard | Tactical operations |
| 7124 | COO Dashboard | Operational oversight |
| 7238 | Shopify Store | Store management |
| 7239 | Log Monitor | Log analysis |
| 7240 | UI Manager | UI coordination |
| 7241 | Restart Analyzer | Stability analysis |
| 9111 | Agents Viewer | Agent directory |
| 9878 | Legal Team | Compliance monitoring |
| 9879 | Digital Samples | Sample fulfillment |
| 9880 | Purchasing Office | Supply ordering |
| 9881 | Marketing | Campaign management |
| 9882 | Accounting | Financial tracking |
| 9883 | Trend Research | Market analysis |
| 9884 | Zendesk Chat | Customer support |
| 9885 | Today's Highlights | Daily summaries |
| 9886 | Needs Attention | Issue escalation |
| 9888 | Server Uptime | Health monitoring |
| 9890 | Parallel Processes | Multi-process |
| 9891 | In Parallel | Batch processing |
| 9893 | Master Hub | Central dashboard |
| 9894 | Skills Manager | Skills registry |
| 9900 | Task Orchestrator | Task coordination |
---
## Storage Breakdown
### Large Files (>1MB)
- `tasks-database.json` - 6.5MB
- `package-lock.json` - 176KB
- `legal-agent.ts` (DWLegalTeam) - 86KB
- `zendesk-chat-agent.ts` - 59KB
- `task-orchestrator-agent.ts` - 61KB
### Total Storage
- Root TypeScript files: ~500KB
- Agent directories: ~2MB
- Node modules: ~100MB
- Data files: ~10MB
- Logs: Variable (10-200MB)
- Archives: ~500MB (growing)
---
## Quick Navigation
### By Function
- **Executive View**: agent-executive-* directories
- **Operations**: agent-purchasing-office, agent-digital-samples
- **Customer**: agent-shopify-store, agent-zendesk-chat
- **System**: agent-server-uptime, agent-log-monitor
- **Reporting**: agent-todays-highlights, reports/
### By Role
- **CEO**: CEO Dashboard (7121), Master Hub (9893)
- **CFO**: CFO Dashboard (7122), Accounting (9882)
- **COO**: COO Dashboard (7124), All operational agents
- **Developer**: Logs, Task Orchestrator, Restart Analyzer
- **Legal**: Legal Team (9878), DWLegalTeam/
---
## Maintenance & Backups
### Backup Strategy
- **Hourly**: tasks-database.json
- **Daily**: All data/ files, agent memories
- **Weekly**: Complete system backup
- **Monthly**: Long-term archive
### Cleanup Schedule
- **Daily**: Logs rotation, cache cleanup
- **Weekly**: Old highlight archives
- **Monthly**: Database optimization
---
## Related Documentation
- [Main README](README.md)
- [Agent Index](AGENTS_INDEX.md)
- [Complete System](COMPLETE-SYSTEM.md)
- [Quick Reference](QUICK_REFERENCE.md)
---
**Last Updated**: November 10, 2025
**Maintained By**: DW-Agents System
**Version**: 1.0