Skip to content

A lightweight PHP-based file upload and management system with user accounts, expiring links, admin controls, and no external dependencies.

License

Notifications You must be signed in to change notification settings

ZacharyKeatings/DataDock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ DataDock

A lightweight, self-hosted PHP web application that allows registered users to upload, manage, and share files securely. Includes an admin dashboard for site management, user control, and file purging functionality.

⭐ If you found this project useful, please consider starring the repository β€” it helps others discover the project and keeps development going!


DataDock Roadmap

A forward-looking plan for upcoming features, improvements, and maintenance of the DataDock self-hosted file manager.


πŸ“¦ Features

βœ… User & Account Settings

  • User registration, login, and dashboard
  • Session-based authentication
  • Change user roles and delete users (admin only)
  • Enable/disable user registration
  • Optional guest uploads with quota enforcement (file count + size)
  • Enforce max storage and file limits per user
  • User account & profile system
  • Public file browsing (anonymous access to uploads)
  • Default file expiry duration setting
  • Enforce unique email toggle
  • Invite-only registration – Only allow signups from a link/token created by the admin.
  • User-to-user file sharing – Share a file only with specific usernames.

πŸ—‚οΈ File Upload & Storage Settings

  • File upload with optional expiry
  • Auto-thumbnail generation for image files
  • Upload file size validation (frontend + backend)
  • Drag-and-drop + preview file upload support
  • Date/time storage in UTC with frontend conversion
  • Max number of files per user
  • Max total storage per user (quota)
  • File management view for all users (admin panel)
  • Allowed file types (restrict extensions/MIME types)
  • Enable/disable thumbnail generation
  • Custom storage path support
  • File upload progress bar
  • Zip multiple files for download – Let users select files and download them as a single .zip.
  • Download as QR code – Generate and display QR code to link directly to file.
  • One-time download links (auto-expire after single use)
  • File checksum display – Show MD5/SHA1/SHA256 so users can verify integrity.
  • Terms of Service / Acceptable Use – User must agree before uploading.
  • Download counter per file

πŸ‘‘ Admin Panel

  • Admin panel with user and file management
  • Update site settings (e.g., site name, max upload size)
  • Enable/disable brute force protection and configure thresholds
  • Configure guest upload limits (max files and storage)
  • Manual purging of expired files with stats
  • View all uploaded files (with admin delete/download options)
  • Reset site to post-install state (remove all users, files, and settings except admin)
  • Sidebar-based admin panel UI improvements
  • Maintenance mode toggle (admin-only access)
  • Debug mode toggle (verbose errors)
  • Log file path and verbosity setting
  • Site stats overview (uploads, storage used, user count, etc.)

πŸ’¬ Interface & Branding Settings

  • Install.php warning if not deleted post-setup
  • Custom logo and favicon URLs
  • Welcome banner or message field
  • Install.php warning toggle
  • Dark mode / light mode UI toggle
  • Mobile responsiveness improvements
  • Localization/multilanguage support
  • Accessibility (WCAG) improvements
  • Custom file icons – Icon preview per file type (PDF, MP3, PNG, etc.)

πŸ“§ Email / Notification Settings

  • Admin contact email field
  • Email notifications on upload, expiry, etc.
  • SMTP configuration (host, port, user, pass, encryption)
  • Email registration confirmation

πŸ”’ Security Settings

  • Secure password hashing
  • Session management and role-based access
  • config/ directory secured via .htaccess
  • CSRF-safe architecture (form-only POST)
  • Brute-force login protection (with configurable limits and lockout window)
  • CAPTCHA on login/register forms
  • Session timeout duration setting

πŸ” Versioning & Updates

  • Version display in admin panel / footer
  • One-click update system (GitHub release fetcher)
  • Changelog and release notes viewer

⚠️ Reporting & Abuse

  • Users can report files for malicious/adult content

βš™οΈ Tech Stack

  • Backend: PHP 8+ (Vanilla, no frameworks)
  • Frontend: HTML5, CSS3 (Vanilla)
  • Database: MySQL (via PDO)
  • Thumbnailing: GD library
  • Sessions: Native PHP session handling
  • Security:
    • CSRF-safe architecture (form-only POST)
    • Passwords hashed with password_hash
    • Session management and role-based access
    • install.php warning if not deleted post-setup

πŸš€ Installation

  1. Clone the repo

    git clone https://github.com/ZacharyKeatings/DataDock.git
    cd datadock
  2. Upload to your server
    Host it on Apache, Nginx, or your shared hosting.

  3. Create a MySQL database

  4. Run the installer
    Visit /install.php in your browser and fill out:

    • Database credentials
    • Site name
    • Admin user info
  5. You're live!
    Delete install.php immediately.


πŸ›‘οΈ Security Notes

  • All user inputs are sanitized
  • Uses htmlspecialchars() and custom sanitize_data()
  • File extensions are preserved, but MIME-type is validated via mime_content_type
  • Admin panel is locked behind session + role checks
  • install.php existence triggers a global warning until deleted

πŸ§‘β€πŸ’» Contributing

Pull requests are welcome. Please open an issue to discuss any major changes before submitting one.


πŸ“„ License

This project is open-source and licensed under the UniLicense.