Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SortiQ

SortiQ

Release Platform License

SortiQ is a desktop file organizer that identifies files by their actual content type (magic bytes) rather than their file extension. A .docx masquerading as a .zip? A .jpg that's actually a .png? SortiQ sees through that.

Built with Tauri v2 (Rust backend + web frontend).


Screenshots

SortiQ screenshot


Features

Smart detection

Reads the first bytes of every file and matches them against a database of known signatures (infer crate). Falls back to extension-based guessing (mime_guess), then a UTF-8 text heuristic. No misidentified files.

Custom rules

Each rule has a match pattern (MIME type glob) and a destination folder. Rules are evaluated top-down; the first match wins.

image/*                    →  Images
application/pdf            →  Documents/PDFs
text/plain                 →  Documents/Text
application/zip            →  Archives
*                          →  Others

Pattern format: type/subtype where * matches any value.

  • image/* — all images
  • application/pdf — exact match
  • * — catch-all (must be last)

Presets

Quick one-click rule sets:

Preset Rules
Media image/*, video/*, audio/*
Documents application/pdf, text/plain, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document
Developer text/javascript, text/html, text/css, application/json
Clean All image/*, video/*, audio/*, application/*, text/*

Dry run

Preview the full sort operation without moving a single file. See exactly where each file would land before committing.

Undo

Every sort operation is logged to sortiq.log in the target folder. The Undo button reads that log and moves every file back to its original location.

Keyboard shortcuts

Key Action
Ctrl+S Save rules
Ctrl+Shift+S Sort now
Escape Close presets panel

How it works

File → Read magic bytes → infer crate → MIME type
                                      ↓
                           Match against rules (top-down)
                                      ↓
                           Move to destination folder
                                      ↓
                           Log to sortiq.log (for undo)

The detection pipeline:

  1. Magic bytesinfer crate reads the file header and returns a MIME type
  2. Extension fallback — if magic bytes don't match, mime_guess guesses by extension
  3. Text heuristic — if both fail, checks if the file is valid UTF-8 text

Install

Download the latest installer from Releases:

File Type
SortiQ_1.0.0_x64-setup.exe NSIS installer (recommended)
SortiQ_1.0.0_x64_en-US.msi MSI installer
sortiq.exe Portable — no installation required

Build from source

Prerequisites

  • Rust (stable toolchain)
  • Node.js v18 or later
  • Tauri v2 system dependencies
    • On Windows: Microsoft Visual Studio Build Tools or Visual Studio with C++ workload, and WebView2 (included in Windows 10+)

Steps

git clone https://github.com/hernataramadhan79-bit/sortiq.git
cd sortiq
npm install
npx tauri build

The compiled binary will be at src-tauri/target/release/sortiq.exe.

Installers are generated to:

  • src-tauri/target/release/bundle/msi/SortiQ_1.0.0_x64_en-US.msi
  • src-tauri/target/release/bundle/nsis/SortiQ_1.0.0_x64-setup.exe

Development

Run the app in development mode with hot-reload:

npm run dev

The dev server starts at http://localhost:1420 and the Tauri window opens automatically.


Project structure

sortiq/
├── src/                    # Frontend (HTML + CSS + JS)
│   ├── index.html
│   ├── style.css
│   ├── app.js
│   └── logo.png
├── src-tauri/              # Rust backend
│   ├── src/
│   │   ├── main.rs         # Entry point
│   │   ├── lib.rs           # Tauri commands
│   │   └── core/
│   │       ├── config.rs    # Rule data model + YAML serialization
│   │       ├── detector.rs  # Magic byte MIME detection
│   │       ├── logger.rs    # Sort operation logging (for undo)
│   │       ├── organizer.rs # File organization engine
│   │       ├── mod.rs
│   │       └── walker.rs    # Recursive file tree walker
│   ├── tauri.conf.json
│   ├── Cargo.toml
│   └── icons/
├── .github/workflows/      # GitHub Actions CI/CD
├── package.json
├── LICENSE                  # MIT
└── README.md

Tech stack

Layer Technology
Frontend Vanilla HTML, CSS, JavaScript (no framework)
Backend Rust with Tauri v2
Dialog tauri-plugin-dialog
MIME detection infer (magic bytes) + mime_guess (extension fallback)
Serialization serde + serde_yaml
Build tool Tauri CLI (npx tauri build)

FAQ

Q: Why not just sort by file extension?
A: Extensions lie. A .docx is actually a .zip. A .js file could be anything. Magic bytes tell the truth.

Q: Can I undo a sort?
A: Yes. Every sort writes a log file (sortiq.log) in the target folder. The Undo button reads that log and restores every file.

Q: Does it handle nested folders?
A: No — it only sorts files in the selected folder (non-recursive). Subdirectories are left untouched.

Q: Can I have multiple rule sets?
A: Each folder has its own rules.yaml. You can configure different rules for different folders.


License

MIT — use it, modify it, share it freely.

About

SortiQ — Desktop file organizer that sorts files by actual content (magic bytes), not extensions. Built with Tauri + Rust.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages