โ What Was Done
All operational scripts have been moved from the project root to the scripts/
folder for better organization.
๐ New Structure
modern-reservation/
โโโ scripts/
โ โโโ README.md # ๐ Complete scripts documentation
โ โโโ infra.sh # ๐ฏ Main entry point (from root)
โ โโโ clean-restart.sh # ๐ Clean restart script (from root)
โ โโโ docker-infra.sh # ๐ณ Docker management (from root)
โ โโโ test-avro-event.sh # ๐งช Avro testing (from root)
โ โโโ start-infrastructure.sh # โ๏ธ Start infrastructure
โ โโโ stop-infrastructure.sh # โน๏ธ Stop infrastructure
โ โโโ check-infrastructure.sh # โ
Check infrastructure
โ โโโ start-business-services.sh # ๐ Start business services
โ โโโ stop-business-services.sh # ๐ Stop business services
โ โโโ check-business-services.sh # ๐ Check business services
โ โโโ setup-database.sh # ๐พ Database setup
โ โโโ backup-database.sh # ๐พ Database backup
โ โโโ check-dependencies.sh # ๐ Check dependencies
โโโ docs/
โ โโโ CLEAN_RESTART_GUIDE.md # Updated with new paths
โ โโโ AVRO_QUICK_REFERENCE.md # Avro documentation
โโโ AVRO_MIGRATION_COMPLETE.md # Avro migration summary
๐ Changes Made
1. Moved Scripts
clean-restart.sh
โscripts/clean-restart.sh
docker-infra.sh
โscripts/docker-infra.sh
infra.sh
โscripts/infra.sh
test-avro-event.sh
โscripts/test-avro-event.sh
2. Updated Path References
All scripts now use proper base directory detection:
# Before (in root)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# After (in scripts/)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BASE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$BASE_DIR"
3. Updated Script References
infra.sh
โ"$SCRIPT_DIR/infra.sh"
./scripts/setup-database.sh
โ"$SCRIPT_DIR/setup-database.sh"
infrastructure/docker
โ"$BASE_DIR/infrastructure/docker"
4. Updated Documentation
docs/CLEAN_RESTART_GUIDE.md
- All examples updatedscripts/README.md
- New comprehensive documentation
๐ How to Use
Before (Root-Level Scripts)
./clean-restart.sh
./infra.sh start-all
./docker-infra.sh health
After (Scripts Folder)
./scripts/clean-restart.sh
./scripts/infra.sh start-all
./scripts/docker-infra.sh health
โ Verified Working
All scripts tested and working with new paths:
- โ
infra.sh --help
works - โ Path detection works correctly
- โ Cross-script references work
- โ Docker paths resolved correctly
- โ Documentation updated
๐ฏ Benefits
- Better Organization: All scripts in one place
- Cleaner Root: Root directory less cluttered
- Consistent Structure: Follows convention (docs/ for documentation, scripts/ for scripts)
- Easier Maintenance: All operational scripts in one folder
- Better Documentation: Comprehensive README in scripts folder
๐ Documentation
- Scripts Overview:
scripts/README.md
- Clean Restart Guide:
docs/CLEAN_RESTART_GUIDE.md
- Avro Quick Reference:
docs/AVRO_QUICK_REFERENCE.md
- Avro Migration:
AVRO_MIGRATION_COMPLETE.md
๐ Quick Start Commands
# View all available scripts
ls -lh scripts/
# Read scripts documentation
cat scripts/README.md
# Start everything
./scripts/infra.sh start-all
# Clean restart
./scripts/clean-restart.sh
# Check status
./scripts/infra.sh status-all
# Stop everything
./scripts/infra.sh stop-all
๐ง For CI/CD
Update your CI/CD pipelines to use new paths:
# Old
- run: ./clean-restart.sh
# New
- run: ./scripts/clean-restart.sh
Date: 2025-10-07 Status: โ Complete Impact: All scripts moved and working Next: Ready for clean restart testing!