Add comprehensive cleanup recommendations for project maintenance
This commit is contained in:
parent
bfb7aef7f3
commit
e6de6d14ac
|
|
@ -0,0 +1,410 @@
|
||||||
|
# Project Cleanup Recommendations
|
||||||
|
|
||||||
|
**Generated:** November 9, 2025
|
||||||
|
|
||||||
|
This document identifies files that are no longer actively used and recommends cleanup actions to keep the project organized and maintainable.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
- **SAFE TO DELETE:** 14 files (backups, completed migrations, unused components)
|
||||||
|
- **ARCHIVE (move to `/archive`):** 11 files (completed setup guides, old audits)
|
||||||
|
- **REVIEW & DECIDE:** 8 files (partially used features, documentation overlap)
|
||||||
|
- **KEEP:** All actively used components, scripts, and documentation
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. SAFE TO DELETE
|
||||||
|
|
||||||
|
These files are no longer needed and can be safely removed:
|
||||||
|
|
||||||
|
### Backup Files
|
||||||
|
- `src/data/claims.ts.backup` - Old backup of claims data
|
||||||
|
- `scripts/extract-article-data-old.ts.bak` - Old version of extraction script
|
||||||
|
- `public/.DS_Store` - macOS system file (should be in .gitignore)
|
||||||
|
- `public/assets/.netlify/` - Empty Netlify metadata folder
|
||||||
|
|
||||||
|
### Unused Components
|
||||||
|
- `src/components/Bio.tsx` - Functionality merged into Header.tsx (not imported anywhere)
|
||||||
|
- `src/components/CopyButton.tsx` - Not imported anywhere (copy functionality is inline)
|
||||||
|
- `src/components/ErrorBoundary.tsx` - Not used
|
||||||
|
- `src/components/UpdateGuide.tsx` - Not used
|
||||||
|
|
||||||
|
### One-Time Migration/Fix Scripts
|
||||||
|
These were used during initial setup and are no longer needed:
|
||||||
|
- `scripts/comprehensive-claim-fixer.ts` - One-time fix script for token counts
|
||||||
|
- `scripts/fix-all-claims.ts` - One-time bulk fix script
|
||||||
|
- `scripts/generate-claim-fixes.ts` - One-time fix generation script
|
||||||
|
- `scripts/merge-migrated-data.ts` - Migration from old system complete
|
||||||
|
|
||||||
|
### Unused Images
|
||||||
|
- `public/aiacubkamilsmal.jpg` - Not referenced in any component
|
||||||
|
- `public/placeholder.svg` - Not referenced in any component
|
||||||
|
|
||||||
|
**Deletion Command:**
|
||||||
|
```bash
|
||||||
|
rm src/data/claims.ts.backup
|
||||||
|
rm scripts/extract-article-data-old.ts.bak
|
||||||
|
rm public/.DS_Store
|
||||||
|
rm -rf public/assets/.netlify
|
||||||
|
rm src/components/Bio.tsx
|
||||||
|
rm src/components/CopyButton.tsx
|
||||||
|
rm src/components/ErrorBoundary.tsx
|
||||||
|
rm src/components/UpdateGuide.tsx
|
||||||
|
rm scripts/comprehensive-claim-fixer.ts
|
||||||
|
rm scripts/fix-all-claims.ts
|
||||||
|
rm scripts/generate-claim-fixes.ts
|
||||||
|
rm scripts/merge-migrated-data.ts
|
||||||
|
rm public/aiacubkamilsmal.jpg
|
||||||
|
rm public/placeholder.svg
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. ARCHIVE (Move to /archive folder)
|
||||||
|
|
||||||
|
These files document completed setup steps and historical information. They're useful for reference but clutter the root directory.
|
||||||
|
|
||||||
|
### Completed Setup Guides
|
||||||
|
- `DOMAIN_SETUP_GUIDE.md` - Domain setup is complete
|
||||||
|
- `NAMECHEAP_DNS_SETUP.md` - DNS setup is complete
|
||||||
|
- `AUTO_ARTICLE_SETUP.md` - Automation setup is complete
|
||||||
|
- `MIGRATION_SUMMARY.md` - Migration from old system is complete
|
||||||
|
|
||||||
|
### Historical Documentation
|
||||||
|
- `GEO_AUDIT_2025-11-04.md` - Old audit (Nov 4), superseded by current implementation
|
||||||
|
- `ARTICLE_PUBLICATION_DATES.md` - Static reference data, not actively maintained
|
||||||
|
|
||||||
|
### Potentially Redundant Documentation
|
||||||
|
These overlap significantly with `PROJECT_STATUS.md`:
|
||||||
|
- `ADDING_NEW_CLAIMS.md` - Process documented in PROJECT_STATUS.md
|
||||||
|
- `CITATION_SYSTEM_GUIDE.md` - System documented in PROJECT_STATUS.md
|
||||||
|
- `CLAIMS_PAGE_GUIDELINES.md` - Guidelines documented in PROJECT_STATUS.md
|
||||||
|
- `VALIDATION_SYSTEM.md` - System documented in PROJECT_STATUS.md
|
||||||
|
- `DOCUMENTATION_INDEX.md` - Index not needed with single PROJECT_STATUS.md
|
||||||
|
|
||||||
|
**Archive Commands:**
|
||||||
|
```bash
|
||||||
|
mkdir -p archive/setup-guides archive/historical archive/old-docs
|
||||||
|
|
||||||
|
mv DOMAIN_SETUP_GUIDE.md archive/setup-guides/
|
||||||
|
mv NAMECHEAP_DNS_SETUP.md archive/setup-guides/
|
||||||
|
mv AUTO_ARTICLE_SETUP.md archive/setup-guides/
|
||||||
|
mv MIGRATION_SUMMARY.md archive/setup-guides/
|
||||||
|
|
||||||
|
mv GEO_AUDIT_2025-11-04.md archive/historical/
|
||||||
|
mv ARTICLE_PUBLICATION_DATES.md archive/historical/
|
||||||
|
|
||||||
|
mv ADDING_NEW_CLAIMS.md archive/old-docs/
|
||||||
|
mv CITATION_SYSTEM_GUIDE.md archive/old-docs/
|
||||||
|
mv CLAIMS_PAGE_GUIDELINES.md archive/old-docs/
|
||||||
|
mv VALIDATION_SYSTEM.md archive/old-docs/
|
||||||
|
mv DOCUMENTATION_INDEX.md archive/old-docs/
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. REVIEW & DECIDE
|
||||||
|
|
||||||
|
These files require a decision - they're partially used or their status is unclear.
|
||||||
|
|
||||||
|
### CSV Download Files (`public/assets/*.csv`)
|
||||||
|
|
||||||
|
**Status:** Partially implemented feature
|
||||||
|
- Individual claim pages have a "Download CSV" button
|
||||||
|
- Only ~10 of 24 articles have corresponding CSV files
|
||||||
|
- Not actively maintained or generated by build process
|
||||||
|
- Located in: `public/assets/`
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
```
|
||||||
|
ai-roi-measurement-claims.csv
|
||||||
|
alpha-school-claims.csv
|
||||||
|
amazon-ai-playbook-claims.csv
|
||||||
|
chatgpt-features-claims.csv
|
||||||
|
chatgpt-setup-claims.csv
|
||||||
|
data-template.csv
|
||||||
|
market-entry-study-claims.csv
|
||||||
|
skill-gap-mapping-claims.csv
|
||||||
|
systems-thinking-claims.csv
|
||||||
|
undetectable-writing-claims.csv
|
||||||
|
```
|
||||||
|
|
||||||
|
**Options:**
|
||||||
|
1. **Delete all CSVs** - Remove download feature from claim pages (simplifies maintenance)
|
||||||
|
2. **Generate CSVs for all claims** - Add script to auto-generate CSV for each article at build time
|
||||||
|
3. **Keep as-is** - Leave partial implementation (not recommended)
|
||||||
|
|
||||||
|
**Recommendation:** Option 1 (delete) unless CSV downloads are actually being used by visitors.
|
||||||
|
|
||||||
|
### Documentation: WORKFLOW.md
|
||||||
|
|
||||||
|
**Status:** Overlaps with PROJECT_STATUS.md
|
||||||
|
- `WORKFLOW.md` = 18,615 bytes, technical workflow details
|
||||||
|
- `PROJECT_STATUS.md` = 7,009 bytes, high-level overview
|
||||||
|
|
||||||
|
**Options:**
|
||||||
|
1. **Keep both** - WORKFLOW.md for detailed technical docs, PROJECT_STATUS.md for quick reference
|
||||||
|
2. **Merge into PROJECT_STATUS.md** - Single source of truth
|
||||||
|
3. **Archive WORKFLOW.md** - PROJECT_STATUS.md is newer and cleaner
|
||||||
|
|
||||||
|
**Recommendation:** Keep both OR merge detailed sections from WORKFLOW.md into PROJECT_STATUS.md, then archive WORKFLOW.md.
|
||||||
|
|
||||||
|
### Image Assets (`public/assets/*.png`)
|
||||||
|
|
||||||
|
**Status:** Used in article pages but unclear if all are needed
|
||||||
|
- Various diagrams and headers for articles
|
||||||
|
- Not all articles use images
|
||||||
|
- Takes up significant space (~1.5MB total)
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
```
|
||||||
|
amazon-process-diagram.png (188KB)
|
||||||
|
chatgpt-career-leverage.png (103KB)
|
||||||
|
chatgpt-features-header.png (90KB)
|
||||||
|
claude-skills-excel-performance.png (184KB)
|
||||||
|
claude-skills-implementation.png (199KB)
|
||||||
|
claude-skills-workflow-diagram.png (159KB)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Recommendation:** Verify which images are actually displayed on live site, delete unused ones.
|
||||||
|
|
||||||
|
### Maintenance Scripts
|
||||||
|
|
||||||
|
**Status:** Useful for maintenance but rarely used
|
||||||
|
- `scripts/audit-claims.ts` - Claims audit tool
|
||||||
|
- `scripts/find-duplicates.ts` - Duplicate detection
|
||||||
|
- `scripts/find-similar-articles.ts` - Similarity detection
|
||||||
|
- `scripts/remove-duplicates.ts` - Duplicate removal
|
||||||
|
- `scripts/add-claim-to-data.ts` - Manual claim addition helper
|
||||||
|
|
||||||
|
**Recommendation:** Keep all - these are genuinely useful for occasional maintenance tasks.
|
||||||
|
|
||||||
|
### Shadcn UI Components (`src/components/ui/`)
|
||||||
|
|
||||||
|
**Status:** 40+ UI components, likely many unused
|
||||||
|
- Installed via shadcn CLI
|
||||||
|
- Project uses minimal UI (mostly custom components)
|
||||||
|
- Adds ~60 files to the project
|
||||||
|
|
||||||
|
**Commonly Used:**
|
||||||
|
- `button.tsx` - Used in multiple places
|
||||||
|
- `card.tsx` - Used for claim cards (likely)
|
||||||
|
|
||||||
|
**Likely Unused:**
|
||||||
|
- `accordion.tsx`, `alert-dialog.tsx`, `avatar.tsx`, `breadcrumb.tsx`
|
||||||
|
- `checkbox.tsx`, `command.tsx`, `context-menu.tsx`, `dropdown-menu.tsx`
|
||||||
|
- `form.tsx`, `hover-card.tsx`, `menubar.tsx`, `navigation-menu.tsx`
|
||||||
|
- `pagination.tsx`, `popover.tsx`, `radio-group.tsx`, `resizable.tsx`
|
||||||
|
- `scroll-area.tsx`, `sheet.tsx`, `sidebar.tsx`, `slider.tsx`
|
||||||
|
- `sonner.tsx`, `switch.tsx`, `table.tsx`, `tabs.tsx`, `toggle.tsx`
|
||||||
|
- And many more...
|
||||||
|
|
||||||
|
**Options:**
|
||||||
|
1. **Keep all** - No harm, future-proofing (but clutters codebase)
|
||||||
|
2. **Audit and remove unused** - Time-consuming but cleaner
|
||||||
|
3. **Leave as-is** - Standard shadcn practice
|
||||||
|
|
||||||
|
**Recommendation:** Audit and remove unused components (save ~50 files).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. KEEP
|
||||||
|
|
||||||
|
These files are actively used and essential:
|
||||||
|
|
||||||
|
### Active Documentation
|
||||||
|
- `PROJECT_STATUS.md` - **Primary status document**
|
||||||
|
- `README.md` - Project overview
|
||||||
|
- `WORKFLOW.md` - (pending review per section 3)
|
||||||
|
|
||||||
|
### Active Scripts
|
||||||
|
- `scripts/validate-claims.ts` - **Critical:** Build-time validation
|
||||||
|
- `scripts/generate-sitemap.ts` - **Critical:** SEO
|
||||||
|
- `scripts/generate-rss.ts` - **Critical:** RSS feed
|
||||||
|
- `scripts/extract-article-data.ts` - **Critical:** Automation
|
||||||
|
- `scripts/check-new-articles.ts` - **Critical:** Automation
|
||||||
|
- Maintenance scripts (audit, duplicates, etc.) - Useful utilities
|
||||||
|
|
||||||
|
### Active Components
|
||||||
|
- All components in `src/components/` except those listed in "DELETE" section
|
||||||
|
- Keep: Header, Footer, ClaimsLibrary, StatsBar, HowToUse, Services, etc.
|
||||||
|
|
||||||
|
### Active Images
|
||||||
|
- `public/favicon.ico` - K BANC logo
|
||||||
|
- `public/favicon.png` - K BANC logo
|
||||||
|
- `public/kamil-banc.jpg` - Header photo
|
||||||
|
- `public/kamil-banc-og.jpg` - Open Graph image
|
||||||
|
- `public/ai-adopters-mug.gif` - Footer image
|
||||||
|
- `public/assets/*.png` - Article images (pending review)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Recommended Cleanup Sequence
|
||||||
|
|
||||||
|
### Phase 1: Safe Deletions (5 minutes)
|
||||||
|
Delete the 14 files listed in section 1. Zero risk.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# From project root
|
||||||
|
rm src/data/claims.ts.backup
|
||||||
|
rm scripts/extract-article-data-old.ts.bak
|
||||||
|
rm public/.DS_Store
|
||||||
|
rm -rf public/assets/.netlify
|
||||||
|
rm src/components/Bio.tsx
|
||||||
|
rm src/components/CopyButton.tsx
|
||||||
|
rm src/components/ErrorBoundary.tsx
|
||||||
|
rm src/components/UpdateGuide.tsx
|
||||||
|
rm scripts/comprehensive-claim-fixer.ts
|
||||||
|
rm scripts/fix-all-claims.ts
|
||||||
|
rm scripts/generate-claim-fixes.ts
|
||||||
|
rm scripts/merge-migrated-data.ts
|
||||||
|
rm public/aiacubkamilsmal.jpg
|
||||||
|
rm public/placeholder.svg
|
||||||
|
|
||||||
|
# Test build
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# If successful, commit
|
||||||
|
git add -A
|
||||||
|
git commit -m "Remove unused files and backups"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Phase 2: Archive Old Docs (5 minutes)
|
||||||
|
Move completed setup guides and old documentation to archive folder.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p archive/setup-guides archive/historical archive/old-docs
|
||||||
|
|
||||||
|
mv DOMAIN_SETUP_GUIDE.md archive/setup-guides/
|
||||||
|
mv NAMECHEAP_DNS_SETUP.md archive/setup-guides/
|
||||||
|
mv AUTO_ARTICLE_SETUP.md archive/setup-guides/
|
||||||
|
mv MIGRATION_SUMMARY.md archive/setup-guides/
|
||||||
|
|
||||||
|
mv GEO_AUDIT_2025-11-04.md archive/historical/
|
||||||
|
mv ARTICLE_PUBLICATION_DATES.md archive/historical/
|
||||||
|
|
||||||
|
mv ADDING_NEW_CLAIMS.md archive/old-docs/
|
||||||
|
mv CITATION_SYSTEM_GUIDE.md archive/old-docs/
|
||||||
|
mv CLAIMS_PAGE_GUIDELINES.md archive/old-docs/
|
||||||
|
mv VALIDATION_SYSTEM.md archive/old-docs/
|
||||||
|
mv DOCUMENTATION_INDEX.md archive/old-docs/
|
||||||
|
|
||||||
|
# Add archive to .gitignore if you don't want it tracked
|
||||||
|
echo "archive/" >> .gitignore
|
||||||
|
|
||||||
|
git add -A
|
||||||
|
git commit -m "Archive completed setup guides and old documentation"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Phase 3: Decisions Required (User Input)
|
||||||
|
|
||||||
|
**Decision 1: CSV Downloads**
|
||||||
|
```bash
|
||||||
|
# If removing CSV feature:
|
||||||
|
rm public/assets/*.csv
|
||||||
|
# Then remove download button from src/app/claims-library/[slug]/page.tsx
|
||||||
|
|
||||||
|
# If keeping, create script to generate CSVs for all articles at build time
|
||||||
|
```
|
||||||
|
|
||||||
|
**Decision 2: WORKFLOW.md**
|
||||||
|
```bash
|
||||||
|
# If merging into PROJECT_STATUS.md:
|
||||||
|
# 1. Copy relevant sections from WORKFLOW.md into PROJECT_STATUS.md
|
||||||
|
# 2. mv WORKFLOW.md archive/old-docs/
|
||||||
|
|
||||||
|
# If keeping both, no action needed
|
||||||
|
```
|
||||||
|
|
||||||
|
**Decision 3: UI Components**
|
||||||
|
```bash
|
||||||
|
# Audit which components are actually imported
|
||||||
|
# Remove unused ones manually (time-consuming but thorough)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Impact Summary
|
||||||
|
|
||||||
|
### After Phase 1 & 2:
|
||||||
|
- **Files removed:** 14
|
||||||
|
- **Files archived:** 11
|
||||||
|
- **Space saved:** ~5MB (mostly duplicate docs)
|
||||||
|
- **Clarity gained:** Root directory with 3-4 docs instead of 15+
|
||||||
|
|
||||||
|
### File count comparison:
|
||||||
|
- **Before cleanup:** ~140 files in project root + src
|
||||||
|
- **After cleanup:** ~115 files (-25 files, -18%)
|
||||||
|
|
||||||
|
### Root directory before:
|
||||||
|
```
|
||||||
|
15 markdown files (guides, docs, indexes)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Root directory after:
|
||||||
|
```
|
||||||
|
3-4 markdown files (PROJECT_STATUS.md, README.md, possibly WORKFLOW.md)
|
||||||
|
1 archive folder (for reference)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Maintenance Going Forward
|
||||||
|
|
||||||
|
### Keep the project clean:
|
||||||
|
|
||||||
|
1. **Update .gitignore:**
|
||||||
|
```
|
||||||
|
# macOS
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Archives
|
||||||
|
archive/
|
||||||
|
|
||||||
|
# Backups
|
||||||
|
*.backup
|
||||||
|
*.bak
|
||||||
|
*.old
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **One-time scripts:**
|
||||||
|
- Move to `scripts/maintenance/` or `scripts/archived/` when done
|
||||||
|
- Don't keep in main scripts folder
|
||||||
|
|
||||||
|
3. **Documentation:**
|
||||||
|
- Keep PROJECT_STATUS.md as single source of truth
|
||||||
|
- Archive old documentation instead of deleting
|
||||||
|
- Update PROJECT_STATUS.md when making significant changes
|
||||||
|
|
||||||
|
4. **Images:**
|
||||||
|
- Audit every 6 months, remove unused images
|
||||||
|
- Consider moving article images to a CDN if they grow significantly
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Questions to Answer
|
||||||
|
|
||||||
|
Before proceeding with Phase 3, decide:
|
||||||
|
|
||||||
|
1. **Do visitors actually download CSV files?**
|
||||||
|
- Check Netlify analytics if available
|
||||||
|
- If yes: Generate CSVs for all articles
|
||||||
|
- If no: Remove feature entirely
|
||||||
|
|
||||||
|
2. **Do you prefer comprehensive docs (WORKFLOW.md) or concise docs (PROJECT_STATUS.md)?**
|
||||||
|
- Comprehensive: Keep both, update WORKFLOW.md
|
||||||
|
- Concise: Merge and archive WORKFLOW.md
|
||||||
|
|
||||||
|
3. **Are the article images (*.png) all being used?**
|
||||||
|
- Audit by checking each article page
|
||||||
|
- Remove unused images
|
||||||
|
|
||||||
|
4. **Should we audit and remove unused shadcn UI components?**
|
||||||
|
- Yes: Better codebase cleanliness, faster builds
|
||||||
|
- No: Keep for future flexibility
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**End of Cleanup Recommendations**
|
||||||
Loading…
Reference in New Issue