Consolidate documentation: archive 45+ historical docs

- Move completed migration docs to docs/archive/
- Move session summaries to docs/archive/sessions/
- Rename API_ASP_DOCUMENTATION.md to docs/API.md
- Archive redundant Claude reference files
- Update docs/README.md as simplified index
- Reduce active docs from 45+ files to 8 essential files

Remaining docs:
- CLAUDE.md (AI context)
- TODO.md (task tracking)
- docs/README.md, API.md, QUICK_REFERENCE.md
- docs/ASP_DEVELOPMENT_GUIDE.md, STANDARDS.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-11 13:13:41 -05:00
parent 4cdc2f0742
commit 94b421f73a
39 changed files with 33 additions and 166 deletions

View File

@@ -1,121 +1,38 @@
# ShopDB Documentation
**Last Updated:** 2025-11-25
**Current Status:** Phase 2 Complete, Phase 3 Planned
**Last Updated:** 2025-12-11
**Current Status:** Database Migration Complete
---
## Project Status Overview
## Quick Links
### Migration Progress
| Document | Purpose |
|----------|---------|
| [CLAUDE.md](../CLAUDE.md) | AI assistant context (start here) |
| [QUICK_REFERENCE.md](QUICK_REFERENCE.md) | Cheat sheets, common queries |
| [ASP_DEVELOPMENT_GUIDE.md](ASP_DEVELOPMENT_GUIDE.md) | Dev setup, VBScript patterns |
| [STANDARDS.md](STANDARDS.md) | Coding standards, security |
| [API.md](API.md) | REST API documentation |
| Phase | Status | Description | Completed |
|-------|--------|-------------|-----------|
| **Phase 1** | COMPLETE | Schema changes - new tables, columns, indexes | Nov 6, 2025 |
| **Phase 2** | COMPLETE | PC migration to unified machines table | Nov 10, 2025 |
| **Phase 3** | PLANNED | Network devices migration (servers, switches, cameras) | TBD |
---
### Current Architecture
## Current Architecture
```
machines table (unified)
├── Equipment (machinetypeid 1-24, pctypeid IS NULL)
── PCs (machinetypeid 25-29, pctypeid IS NOT NULL)
├── Equipment (machinetypeid 1-15, pctypeid IS NULL)
── PCs (machinetypeid 33-35, pctypeid IS NOT NULL)
└── Network Devices (machinetypeid 16-20)
printers table (separate - by design)
Network devices (Phase 3 will migrate):
- servers, switches, cameras, accesspoints, idfs
- Will become machinetypeid 30-36 in machines table
```
### Key Accomplishments (Oct-Nov 2025)
- Consolidated PCs into unified `machines` table (277 PCs migrated)
- Created `communications` table for all network interfaces (705+ records)
- Created `machinerelationships` table for PC/equipment relationships
- Modernized all PC pages (displaypcs, displaypc, editpc)
- Fixed 36+ API bugs for PowerShell data collection
- Added compliance and warranty tracking infrastructure
- Implemented network map for all device types
---
## Documentation Overview
### For New Team Members
**Start here in this order:**
1. **[QUICK_REFERENCE.md](QUICK_REFERENCE.md)** - Quick facts, common tasks, cheat sheets (15 min)
2. **[ASP_DEVELOPMENT_GUIDE.md](ASP_DEVELOPMENT_GUIDE.md)** - Dev environment setup, VBScript patterns (30 min)
3. **[STANDARDS.md](STANDARDS.md)** - Coding standards, security requirements (45 min)
4. **[DEEP_DIVE_REPORT.md](DEEP_DIVE_REPORT.md)** - Complete database/architecture docs (reference)
5. **[NESTED_ENTITY_CREATION.md](NESTED_ENTITY_CREATION.md)** - Complex forms, inline entity creation (20 min)
---
## Migration Documentation
### Phase 1 & 2 (Complete)
| Document | Description |
|----------|-------------|
| [DATABASE_MIGRATION_FINAL_DESIGN.md](DATABASE_MIGRATION_FINAL_DESIGN.md) | Complete Phase 1 specification |
| [MIGRATION_QUICK_REFERENCE.md](MIGRATION_QUICK_REFERENCE.md) | Quick lookup for migration |
| [PC_MACHINES_CONSOLIDATION_PLAN.md](PC_MACHINES_CONSOLIDATION_PLAN.md) | Phase 2 PC migration plan |
| [MACHINE_RELATIONSHIPS_EXAMPLES.md](MACHINE_RELATIONSHIPS_EXAMPLES.md) | Relationship query patterns |
### Phase 3 (Planned)
| Document | Description |
|----------|-------------|
| [PHASE3_NETWORK_DEVICES_MIGRATION_PLAN.md](PHASE3_NETWORK_DEVICES_MIGRATION_PLAN.md) | Network devices migration plan |
---
## Core Documentation
### Standards & Development
| Document | Purpose | Status |
|----------|---------|--------|
| [STANDARDS.md](STANDARDS.md) | Coding standards, security | Current |
| [ASP_DEVELOPMENT_GUIDE.md](ASP_DEVELOPMENT_GUIDE.md) | Dev setup, patterns | Current |
| [QUICK_REFERENCE.md](QUICK_REFERENCE.md) | Cheat sheets | Current |
| [NESTED_ENTITY_CREATION.md](NESTED_ENTITY_CREATION.md) | Complex forms | Current |
### Architecture & Design
| Document | Purpose | Status |
|----------|---------|--------|
| [DEEP_DIVE_REPORT.md](DEEP_DIVE_REPORT.md) | Complete system documentation | Current |
| [INFRASTRUCTURE_FINAL_ARCHITECTURE.md](INFRASTRUCTURE_FINAL_ARCHITECTURE.md) | Infrastructure design | Current |
| [NETWORK_DEVICES_UNIFIED_DESIGN.md](NETWORK_DEVICES_UNIFIED_DESIGN.md) | Network unification design | Current |
---
## SQL Migration Scripts
All migration scripts are in `/sql/migration_phase*/` folders:
```
sql/
├── migration_phase1/ # Schema changes (8 scripts + rollbacks)
├── migration_phase2/ # PC data migration (8 scripts)
├── migration_phase3/ # Network devices (planned)
└── *.sql # Utility scripts
printers table (separate)
communications table (all network interfaces)
machinerelationships table (PC↔equipment links)
```
---
## Quick Start
### Dev Environment
## Dev Environment
```bash
# Start dev environment
@@ -126,86 +43,36 @@ sql/
# Access application
http://192.168.122.151:8080
```
### Git (Gitea)
```bash
# Gitea web UI
http://localhost:3000
# Clone repo
git clone ssh://git@localhost:2222/cproudlock/shopdb.git
```
### Database
```bash
# Connect to MySQL
docker exec -it dev-mysql mysql -u root -prootpassword shopdb
# Quick queries
SELECT COUNT(*) FROM machines WHERE pctypeid IS NOT NULL; -- PCs
SELECT COUNT(*) FROM machines WHERE pctypeid IS NULL; -- Equipment
SELECT COUNT(*) FROM printers WHERE isactive = 1; -- Printers
```
---
## Key Database Tables
## Database Views
### Core Tables (Phase 2 Schema)
| Table | Purpose | Records |
|-------|---------|---------|
| `machines` | All equipment + PCs | 500+ |
| `communications` | Network interfaces | 700+ |
| `machinerelationships` | PC/equipment links | 50+ |
| `printers` | Printers (separate) | 200+ |
| `warranties` | Warranty tracking | var |
| `compliance` | Compliance data | var |
### Key Views
All views are defined in `sql/view_consolidation.sql`:
| View | Purpose |
|------|---------|
| `vw_network_devices` | All network devices unified |
| `vw_active_pcs` | Active PCs with details |
| `vw_machine_relationships` | Relationship summary |
| `vw_equipment_list` | Equipment with details |
| `vw_pc_list` | PCs with OS/model info |
| `vw_printer_list` | Active printers |
| `vw_network_devices` | Network devices (APs, switches, etc.) |
| `vw_machine_detail` | Full machine info for detail pages |
| `vw_active_notifications` | Current notifications |
| `vw_warranty_status` | Warranty tracking |
---
## Recent Session Summaries
## Archive
Located in project root:
| File | Date | Focus |
|------|------|-------|
| SESSION_SUMMARY_2025-11-13.md | Nov 13 | Phase 2 testing, network_map fixes |
| SESSION_SUMMARY_2025-11-10.md | Nov 10 | Relationship fixes, Phase 3 planning |
---
## Getting Help
1. Check [QUICK_REFERENCE.md](QUICK_REFERENCE.md) first
2. Search [DEEP_DIVE_REPORT.md](DEEP_DIVE_REPORT.md)
3. Review [STANDARDS.md](STANDARDS.md) for coding questions
4. Check session summaries for recent changes
---
## Version History
| Version | Date | Changes |
|---------|------|---------|
| v2.0 | 2025-11-25 | Updated for Phase 2 completion, cleanup |
| v1.3 | 2025-10-20 | Added Git workflow documentation |
| v1.2 | 2025-10-20 | Added DEEP_DIVE_REPORT, QUICK_REFERENCE |
| v1.1 | 2025-10-10 | Added STANDARDS, NESTED_ENTITY_CREATION |
| v1.0 | 2025-10-09 | Initial ASP_DEVELOPMENT_GUIDE |
Historical documentation from completed migrations is in `archive/`:
- Phase 1-4 migration plans and summaries
- Bug fix records
- Session summaries
---
**Maintained By:** Development Team
**Last Updated:** 2025-11-25