Files
sharey/docs/ORGANIZATION.md
2025-09-27 17:45:52 +01:00

3.4 KiB

Project Organization Summary

📁 Reorganized Structure

The Sharey project has been reorganized into a clean, professional structure:

🏗️ Directory Structure

sharey/
├── src/                    # Main application code
│   ├── app.py             # Flask application
│   ├── config.py          # Configuration management
│   ├── config_util.py     # Config utilities
│   ├── static/            # CSS, JS, assets
│   │   ├── script.js      # Main JavaScript
│   │   ├── style.css      # Stylesheets
│   │   └── script_backup.js
│   └── templates/         # HTML templates
│       ├── index.html     # Main page
│       ├── admin.html     # Admin panel
│       ├── admin_login.html
│       ├── maintenance.html
│       ├── view_file.html # File viewer
│       └── view_paste.html # Paste viewer
├── tests/                 # Test files
│   ├── test_b2.py
│   ├── test_bucket_contents.py
│   └── test_paste.py
├── scripts/               # Utility scripts
│   ├── clean.sh          # Cleanup script
│   ├── migrate.py        # Database migration
│   ├── set_admin_password.py
│   ├── setup.py
│   └── setup.sh
├── docs/                  # Documentation
│   ├── CONFIG_SYSTEM.md
│   ├── DEPLOYMENT.md
│   ├── MAINTENANCE.md
│   ├── MIGRATION_SUMMARY.md
│   └── README.md (old)
├── logs/                  # Application logs
│   ├── app.log
│   └── migration_log_20250815_121855.txt
├── config.json           # Main configuration
├── config.json.example   # Configuration template
├── requirements.txt      # Python dependencies
├── run.py                # Application entry point
├── dev-setup.sh          # Development setup
└── README.md             # Project documentation

🚀 Running the Application

New Entry Point

python run.py

Development Setup

./dev-setup.sh

Cleanup

./scripts/clean.sh

Changes Made

  1. Moved core application (app.py, config.py) to src/
  2. Organized static assets (static/, templates/) under src/
  3. Collected tests in dedicated tests/ directory
  4. Grouped scripts in scripts/ directory
  5. Centralized documentation in docs/ directory
  6. Created logs directory for log files
  7. Added entry point (run.py) for easy execution
  8. Created development setup script for easy onboarding
  9. Added cleanup script for maintenance
  10. Removed temporary files and debug artifacts
  11. Updated README.md with new structure

🎯 Benefits

  • Cleaner root directory - Only essential files at project root
  • Logical grouping - Related files organized together
  • Professional structure - Follows Python project best practices
  • Easy navigation - Clear separation of concerns
  • Better maintainability - Easier to find and modify files
  • Development friendly - Scripts for common tasks

🔧 Next Steps

  1. Update any deployment scripts to use new structure
  2. Test the new entry point thoroughly
  3. Update CI/CD pipelines if applicable
  4. Consider adding more development tools (linting, formatting)

The project is now much cleaner and follows modern Python project conventions!