Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileForge - Modern Drive & Folder Organizer

FileForge is an ultra-modern, high-performance desktop application built using JavaFX and Maven. It provides an intuitive, glassmorphic dark-themed UI that enables users to scan local storage drives or directories, identify scattered files, and consolidate them into typewise folders (Photos, Videos, PDFs, Excel sheets, etc.) recursively in one go.


🎨 Design & Theme Aesthetics (2026 Trends)

  • Glassmorphism: Visual cards and panels are rendered with a translucent appearance (rgba(255, 255, 255, 0.05)) over a deep dark background (#0B0C10).
  • Dynamic Gradient Accents: Buttons, logos, and progress highlights utilize radiant violet, electric indigo, and cyber-teal gradients.
  • Micro-Animations: Clean hover and click scales implemented globally for cards and action buttons.
  • Undecorated Window Layout: Features a custom-built, draggable window title bar with integrated close/minimize buttons to replicate a premium native experience.
  • Responsive Category Cards: Flow-based layout displaying file distribution dynamically with HSL-themed accent colors and sharp scaling SVG vector icons.

🏗️ System Architecture

FileForge utilizes a clean separation of concerns leveraging the Model-View-ViewModel (MVVM) pattern:

graph TD
    View[dashboard.fxml & style.css] <--> Controller[DashboardController]
    Controller <--> ViewModel[DashboardViewModel]
    ViewModel <--> Service[ScanService & OrganizeService]
    Service --> Task[ScanTask & MoveTask]
    Task --> Mover[FileMover & FileUtils]
    Task --> Scanner[DriveScanner & PathValidator]
Loading

📁 Project Directory Layout

FileForge-Scaffold/
├── pom.xml                             # Maven build system with JavaFX dependencies
└── src/
    └── main/
        ├── java/
        │   ├── module-info.java        # Java modular configuration (exports & opens)
        │   └── com/sushilpawar/fileforge/
        │       ├── FileForgeApplication.java # JavaFX main application launcher
        │       ├── config/
        │       │   └── ApplicationConfig.java # Versioning & app meta constants
        │       ├── constants/
        │       │   └── AppConstants.java   # App constants placeholder
        │       ├── controller/
        │       │   └── DashboardController.java # FXML view controller & event coordinator
        │       ├── enums/
        │       │   ├── ConflictResolutionStrategy.java # Duplicate handling policies (Rename, Overwrite, Skip)
        │       │   └── FileCategory.java   # Mappings of extensions, icons, and HSL colors
        │       ├── model/
        │       │   ├── FileItem.java       # Represents metadata of a scanned file
        │       │   └── ScanResult.java     # Summarizes folder contents & sizes
        │       ├── mover/
        │       │   └── FileMover.java       # Physical file moving core logic
        │       ├── organizer/
        │       │   └── FileOrganizer.java   # Factory orchestrating workers
        │       ├── scanner/
        │       │   ├── DriveScanner.java   # Retrieves drive paths & mount points
        │       │   └── FileScanner.java    # Quick helper mapping to scan tasks
        │       ├── service/
        │       │   ├── OrganizeService.java # Thread executor service for file movement
        │       │   └── ScanService.java     # Thread executor service for drive traversal
        │       ├── task/
        │       │   ├── MoveTask.java       # Background worker for moves & empty folder deletions
        │       │   └── ScanTask.java       # Background worker traversing paths recursively
        │       ├── util/
        │       │   └── FileUtils.java       # Format sizes, base name, extension helpers
        │       └── validator/
        │           └── PathValidator.java   # Safety checks for OS system directories
        └── resources/
            ├── css/
            │   └── style.css           # Custom theme colors, gradients, and custom components
            └── fxml/
                └── dashboard.fxml       # Layout containers & form components

🛠️ Key Components & Design Logic

1. Multi-threaded Safety (ScanTask & MoveTask)

Traversing a large drive and moving thousands of files block JavaFX's single application thread (which handles animations and inputs).

  • We wrap all operations in javafx.concurrent.Task.
  • Status messages and progress updates are pushed dynamically using updateMessage() and updateProgress() properties which are bound to the view.

2. Built-in OS Safeguards

Scanning and moving folder structures can be dangerous. FileForge implements a custom PathValidator to prevent actions in:

  • System directories (e.g. C:\Windows, /bin, /usr, /proc).
  • Trash and recovery mount points (e.g. $RECYCLE.BIN, Recovery).
  • Hidden configurations (directories starting with .).
  • It blocks users from organizing system-level roots directly.

3. File Extension Categorizations

Files are automatically grouped into clean category directories inside the target directory based on their extension:

  • 🖼️ Photos: png, jpg, jpeg, gif, webp, heic, raw
  • 🎥 Videos: mp4, mkv, avi, mov, wmv, flv, webm, m4v
  • 📑 PDF Documents: pdf
  • 📊 Excel & Sheets: xlsx, xls, csv, ods
  • 📝 Documents: docx, doc, txt, rtf, odt, pptx, ppt
  • 🎵 Music & Audio: mp3, wav, flac, aac, ogg, m4a, wma
  • 📦 Archives: zip, rar, 7z, tar, gz, bz2
  • 💻 Developer Files: java, py, js, ts, html, css, cpp, rs, json, xml
  • 📁 Other Files: Catch-all for any other extension.

4. Duplicate Collision Handling

When organizing files from multiple scattered locations, name collisions are common. FileForge provides three customizable strategies:

  • Auto-Rename (Safe): Retains both files by appending a counter suffix (e.g. image_1.png).
  • Overwrite: Replaces the destination file with the newly scanned file.
  • Skip: Leaves the duplicate file in its source folder.

⚙️ Running the Application

Prerequisites

  1. Java Development Kit (JDK): Version 21 or later.
  2. Maven: Package manager (command path must be set, or run using Maven wrapper).

Commands

To clean and compile the project:

mvn clean compile

To launch the graphical interface:

mvn javafx:run

🌟 How To Use

  1. Launch the App: Run mvn javafx:run. The undecorated dark frame will fade in. Drag it using the title bar.
  2. Pick a Source: Click Browse Folder and select the folder or drive you want to organize.
  3. Scan: Click Start Scanning. Watch the real-time file counters and visual progress bar update.
  4. Choose Categories: Scanned categories appear as cards with sizes and counts. Uncheck any categories you wish to exclude from movement.
  5. Set Options:
    • Choose whether you want to move files in-place or export them to a custom target folder.
    • Configure collision strategy (Rename is recommended).
    • Check Remove parent folders if they become empty to clean up the source directory structure.
    • Run a Dry Run simulation first if you want to preview without executing writes.
  6. Organize: Click Organize Files Now to complete the sorting process!

About

FileForge is an ultra-modern, high-performance desktop application built using JavaFX and Maven. It provides an intuitive, glassmorphic dark-themed UI that enables users to scan local storage drives or directories, identify scattered files, and consolidate them into typewise folders (Photos, Videos, PDFs, Excel sheets, etc.) recursively in one go.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages