# Project Cleanup Log

This log details the files and folders that were archived as part of the architecture refactoring, ensuring only active, verified React and FastAPI components remain in the production codebase.

## Archive Location

All legacy and unused files have been moved to the root `unusedFiles/` directory:

```
unusedFiles/
├── backend_old/       # Legacy backend modules (databases, old models, local AI)
├── frontend_old/      # Deprecated React views, stores, modules, and routes
└── old_scripts/       # Seed and setup scripts
```

---

## Log of Archived Files

### Category A: Backend Modules (moved to `unusedFiles/backend_old/`)
- `database/session.py` — Legacy SQLAlchemy session initializer (unused since switching to pure Firestore).
- `models/models.py` — Old SQLAlchemy database model definitions (replaced by firestore collections).
- `core/celery_app.py` — Redis/Celery queue setup (unused since migrating to synchronous, serverless-friendly request flows).
- `services/ai_service_legacy.py` — Legacy local AI service handler.
- `services/ai_service_enterprise.py` — Redundant enterprise fallback routing service.
- `services/subscription_service.py` — Obsolete SaaS Stripe subscription service.
- `sql_app.db` — Obsolete SQLite database file.

### Category B: Frontend Modules (moved to `unusedFiles/frontend_old/`)
- `frontend/src/pages/dashboard/Billing.jsx` — Legacy billing & plan upgrades manager (disabled).
- `frontend/src/pages/admin/AITrainingQueue.jsx` — Obsolete local training log viewer.
- `frontend/src/pages/admin/AILab.jsx` — Unused generative fallback lab testing interface.
- `frontend/src/pages/admin/SystemErrors.jsx` — Unused backend trace viewer.
- `frontend/src/routes/ProtectedRoute.jsx` — Unused React Router route guard (replaced by `components/RouteGuards.jsx`).
- `frontend/src/store/authStore.js` — Legacy client-side store module.
- `frontend/src/modules/analytics/UsageAnalytics.jsx` — Unused duplicate analytics tracker.
- `frontend/src/modules/subscriber/SubscriberDashboard.jsx` — Unused dashboard template.

### Category C: Scripts (moved to `unusedFiles/old_scripts/`)
- `create_user.py` — Initial super admin user creator script.
- `seed_firestore.py` — Initial Firestore sample dataset seeder script.
