This commit is contained in:
IGNY8 VPS (Salman)
2025-11-29 16:44:22 +00:00
parent d412651875
commit 98396cb7b9
4 changed files with 1496 additions and 146 deletions

View File

@@ -1947,152 +1947,6 @@ docker-compose -f docker-compose.app.yml up -d
---
## Folder Status Analysis
### Active Folders
#### `/sites/` - **ACTIVE & IN USE** ✅
**Status:** Currently deployed and running in production
**Container:** `igny8_sites` (running on port 8024)
**Purpose:** Unified Sites Renderer and Site Builder container
**Evidence:**
- Docker container running: `igny8_sites` (Up 6+ hours)
- Referenced in `docker-compose.app.yml` (lines 104-123)
- Active backend integration via `/api/v1/publisher/sites/{site_id}/definition/`
- Loads site definitions from `/data/app/sites-data/` filesystem
- Has complete React application with routing, components, and build configuration
**Functionality:**
1. **Public Site Renderer** (No auth required)
- Routes: `/:siteSlug/:pageSlug?`
- Loads site definitions from filesystem or API
- Renders published sites for public viewing
2. **Site Builder Interface** (Auth required)
- Routes: `/builder/*` (wizard, preview, dashboard)
- Protected by JWT authentication
- Integrated with main IGNY8 API
**Migration History:**
- Previously separated into two containers (`site-builder` + `sites`)
- Successfully merged in November 2025 (see `MIGRATION_SUMMARY.md`)
- Old `site-builder` container removed, functionality merged into `sites`
**Key Files:**
```
sites/
├── package.json ✅ Active (vite 7.2.2, react 19.2.0)
├── Dockerfile.dev ✅ Active (used by docker-compose)
├── vite.config.ts ✅ Active (port 5176)
└── src/
├── App.tsx ✅ Unified router (builder + renderer)
├── builder/ ✅ Site builder UI (lazy loaded)
│ ├── pages/
│ └── components/
├── pages/
│ └── SiteRenderer.tsx ✅ Public site renderer
└── loaders/
└── loadSiteDefinition.ts ✅ Filesystem/API loader
```
**Backend Integration:**
- API: `/api/v1/site-builder/blueprints/` (active, 20+ endpoints)
- Service: `igny8_core.business.publishing.services.adapters.sites_renderer_adapter`
- Data path: `/data/app/sites-data/clients/{site_id}/v{version}/`
**Verdict:** **ESSENTIAL - Must be included in portable package**
---
#### `/site-builder/` - **REDUNDANT & DEPRECATED** ❌
**Status:** Empty folder, functionality migrated to `/sites/`
**Last Active:** Before November 2025
**Container:** None (removed from docker-compose)
**Evidence:**
- Folder contains only: `dist/` and `node_modules/` (no source code)
- No `.tsx`, `.ts`, or configuration files found
- Removed from `docker-compose.app.yml` (commented out)
- Migration documented in `/sites/MIGRATION_SUMMARY.md`
**Migration History:**
According to `MIGRATION_SUMMARY.md`:
- Site Builder functionality merged into `/sites/src/builder/` directory
- Unified routing created in `/sites/src/App.tsx`
- Docker service `igny8_site_builder` removed
- All builder API calls now route through `/sites/` container
**What Happened:**
```
Old Structure: New Structure:
/site-builder/ → /sites/src/builder/
src/ pages/
pages/ components/
components/ (integrated into sites)
api/
```
**Verdict:** **REDUNDANT - Can be safely deleted**
**Cleanup Recommendation:**
```bash
# Safe to remove (after final verification)
rm -rf /data/app/igny8/site-builder/
```
---
### Frontend Module Analysis
#### `/frontend/src/modules/siteBuilder/` - **REDUNDANT & DEPRECATED** ❌
**Status:** Empty folders, no active code
**Structure:**
```
frontend/src/modules/siteBuilder/
├── components/
│ ├── common/ (empty)
│ └── steps/ (empty)
└── state/ (empty)
```
**Evidence:**
- No `.tsx` or `.ts` files found in directory tree
- No imports reference this path (`grep` search returned 0 matches)
- Site Builder functionality moved to `/sites/src/builder/`
**Verdict:** **REDUNDANT - Can be safely deleted**
**Cleanup Recommendation:**
```bash
# Safe to remove
rm -rf /data/app/igny8/frontend/src/modules/siteBuilder/
```
---
### Updated Portable Package Structure
Based on analysis, here's the corrected essential package:
#### Include These Folders:
`/backend/` - Main Django application (excluding venv, cache, logs)
`/frontend/` - Main React application (excluding node_modules, dist)
`/sites/` - **ACTIVE** Sites Renderer & Builder (excluding node_modules, dist)
`/docs/` - Documentation
`docker-compose.app.yml` - Deployment configuration
`README.md`, `CHANGELOG.md` - Project documentation
#### Exclude These Folders:
`/site-builder/` - **DEPRECATED** (empty, migrated to `/sites/`)
`/frontend/src/modules/siteBuilder/` - **DEPRECATED** (empty folders)
`node_modules/`, `dist/`, `.venv/` - Dependencies (installed on deployment)
`__pycache__/`, `*.pyc` - Compiled Python
`logs/`, `*.log` - Log files
❌ Database files, backups - Environment-specific
---
## Deployment Architecture
### Production Stack