Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5f72593
Build fixes
SirWellington Jul 21, 2026
e47287f
Adds github actions
SirWellington Jul 21, 2026
9737a0c
Merge branch 'main' into code/build-updates
SirWellington Jul 21, 2026
c02541a
Build updates
SirWellington Jul 21, 2026
b145381
Build updates
SirWellington Jul 21, 2026
81b4daa
Update PROMPT.md
SirWellington Jul 21, 2026
12de58f
Builds UI Skeleton
SirWellington Jul 21, 2026
4eea5e6
Update acl-manifests.json
SirWellington Jul 21, 2026
c71b7f8
Revert "Update acl-manifests.json"
SirWellington Jul 21, 2026
0fa3aba
json updates
SirWellington Jul 21, 2026
769b2fe
Updates checkout action
SirWellington Jul 21, 2026
c109f34
Updates setup-node@v7
SirWellington Jul 21, 2026
8d0d02b
Build fixes
SirWellington Jul 22, 2026
ccc96b1
Implements the libvips background worker to generate thumbnails and s…
SirWellington Jul 22, 2026
841ade5
Integrates ONNX Runtime for face detection using GPU acceleration.
SirWellington Jul 22, 2026
0962dd8
Updates design mockups
SirWellington Jul 22, 2026
cb22391
Update PROMPT.md
SirWellington Jul 22, 2026
fa573b6
Updates
SirWellington Jul 22, 2026
020c90b
Create main-gallery-grid-option-2.png
SirWellington Jul 23, 2026
58b2e4f
Create people-faces-dialog.png
SirWellington Jul 23, 2026
5a4966f
Fixes
SirWellington Jul 23, 2026
ae8a3fa
Update capabilities.json
SirWellington Jul 23, 2026
36e93c0
Update .gitignore
SirWellington Jul 23, 2026
01a154d
Update .gitignore
SirWellington Jul 23, 2026
8c8812b
Update .gitignore
SirWellington Jul 23, 2026
3598eaf
Merge branch 'main' into code/phase-4-features-1-scan-logic
SirWellington Jul 23, 2026
bdbbeeb
Build fixes
SirWellington Jul 23, 2026
15c5ada
Update manager.rs
SirWellington Jul 23, 2026
59b6912
Update manager.rs
SirWellington Jul 23, 2026
816c69e
Update acl-manifests.json
SirWellington Jul 23, 2026
cadbade
Create AGENTS.md
SirWellington Jul 23, 2026
fb9e075
Update manager.rs
SirWellington Jul 23, 2026
aef483d
Update src-tauri/src/catalog/manager.rs
SirWellington Jul 23, 2026
a8fe19c
Update src-tauri/src/catalog/manager.rs
SirWellington Jul 23, 2026
2d7a33d
Update src-tauri/src/catalog/manager.rs
SirWellington Jul 23, 2026
e1da519
Update src-tauri/src/catalog/manager.rs
SirWellington Jul 23, 2026
8539632
Update src-tauri/src/catalog/manager.rs
SirWellington Jul 23, 2026
3dff743
Update manager.rs
SirWellington Jul 23, 2026
9162f32
Update src-tauri/src/image/pipeline.rs
SirWellington Jul 23, 2026
2d20af7
Update lib.rs
SirWellington Jul 24, 2026
088e085
Merge branch 'code/phase-3-ui-shell' of https://github.com/RedRoma/Pr…
SirWellington Jul 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ cache/

# Build artifacts
*.log

#Playwright
playwright-report/
test-results/

# AI Tools
beledarian_info.md
40 changes: 40 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Praetorian AI Agent Instructions

These instructions help AI coding agents understand the workspace structure, build commands, and the current model/face-detection architecture.

## Key points

- This is a Tauri desktop app with a React frontend in `src/` and a Rust backend in `src-tauri/`.
- Frontend UI calls backend commands through `src/services/catalog.ts` and state is managed in `src/hooks/useCatalog.ts`.
- The Rust backend exposes catalog, image, face, and Python-upscaling commands in `src-tauri/src/lib.rs`.
- The catalog engine is implemented in `src-tauri/src/catalog/manager.rs` with SQLite and image metadata handling.
- Face detection is implemented under `src-tauri/src/face/` using ONNX Runtime and a RetinaFace model.
- The Python bridge is implemented under `src-tauri/src/python/` and is used for external upscaling workflows.

## Model / AI conventions

- Model code is primarily in Rust; do not move face-detection logic into the React frontend.
- The face detection flow is feature-gated with `#[cfg(feature = "face-detection")]` and initializes `retinaface.onnx` in `src-tauri/src/lib.rs`.
- Use the existing Tauri command patterns when adding or changing model features: backend command -> `src/services/catalog.ts` invoke -> frontend hook/component.
- Prefer GPU execution providers for ONNX Runtime when available, but maintain fallback behavior.

## Build and run commands

- `npm install` to install the frontend dependencies.
- `npm run dev` to start Vite in development.
- `npm run build` to build the frontend (`tsc && vite build`).
- `npm run tauri` to run the Tauri app.
- `npm run tauri build` to build the desktop application in `src-tauri/target/release`.

## Documentation links

- Project overview: [README.md](README.md)
- AI / model requirements: [REQUIREMENTS.md](REQUIREMENTS.md)
- Initial Prompt: [PROMPT.md](PROMPT.md)

## Guidance for AI agents

- Keep UI and backend responsibilities distinct.
- Preserve the existing Tauri command and IPC structure.
- When updating face or model-related behavior, check both Rust backend and TypeScript frontend call sites.
- Avoid duplicating README or requirements content; link to those docs instead.
146 changes: 146 additions & 0 deletions PROMPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ Prompt: Implement the libvips background worker to generate thumbnails and smart
## Iteration C
Prompt: "Integrate ONNX Runtime for face detection using GPU acceleration."


---


# Full Project Requirements

## Role
Expand Down Expand Up @@ -78,3 +80,147 @@ Please provide:
4. **Python Bridge Skeleton:** A basic example of how the Rust backend would call a Python script to upscale an image and return the result path.

Start by defining the `Cargo.toml` dependencies required for GPU-accelerated AI and libvips, then outline the core database schema.


---

# Design Mockups

```
Create a high-fidelity desktop application UI mockup for a professional photo management application named "Praetorian."

Design language:
- Modern, premium creative software
- Dark mode
- Inspired by Lightroom Cloud, Capture One, Arc Browser, and Linear
- Matte charcoal interface (#181818 to #222222)
- Soft elevation with subtle shadows
- 8px spacing system
- Rounded corners (8px)
- Thin separators instead of heavy borders
- Clean typography similar to Inter or SF Pro
- Pixel-perfect alignment
- Production-quality Figma design
- Extremely polished UX
- No futuristic or glass-heavy effects

Window:
- Native desktop application
- 16:10 aspect ratio
- Large 1440p workspace
- macOS-style window chrome
- Professional creative application

Layout:
Left Sidebar
- Library
- Collections
- Favorites
- Recent Imports
- External Drives
- Folder tree
- Smart Albums
- Collapsible sections
- Clean monochrome icons

Center Workspace
- Primary content area
- Dense but elegant layout
- Excellent spacing
- Strong visual hierarchy

Right Sidebar
- Context-sensitive inspector
- Metadata
- EXIF
- Camera
- Lens
- Histogram
- Keywords
- Rating
- Color labels

The interface should feel like software used by professional photographers managing hundreds of thousands of RAW images.

Generate the "Import Photos" dialog.

The dialog should appear centered over the library.

Dialog layout:

Left Column
- Connected devices
- SD cards
- External SSDs
- NAS locations
- Local folders
- Recently used sources

Center
- Thumbnail preview grid
- 30–50 photo thumbnails
- Portrait photography
- Every thumbnail is unique
- Mix of RAW and JPEG indicators
- Multi-select checkboxes
- File names
- Capture dates
- File sizes

Top Toolbar
- Breadcrumb navigation
- Search
- Filter
- Sort
- Select All
- Number of selected photos

Right Panel
Import Options

Destination
- Folder picker
- Create dated folder
- Custom folder name

File Handling
- Copy
- Move
- Leave in place

Renaming
- Rename using template
- Sequence numbering

Metadata
- Apply copyright
- Apply keywords
- Apply preset
- Apply star rating

AI Options
- Generate Smart Keywords
- Detect Faces
- Detect Duplicate Photos
- Estimate Image Quality
- Build Search Index

Bottom Bar
- Selected item count
- Total storage required
- Cancel button
- Large blue "Import 248 Photos" button

Visual Details
- Beautiful thumbnail photography
- Realistic icons
- Crisp typography
- Realistic spacing
- Professional UI polish
- Subtle hover states
- Soft blue accent color
- Clean monochrome iconography
- Consistent design system

The mockup should be indistinguishable from a real shipping desktop application screenshot. No placeholder boxes, no lorem ipsum, no wireframe styling.
```
Binary file removed design/mockups/00017-419623986.png
Binary file not shown.
Binary file removed design/mockups/00022-1383062596.png
Binary file not shown.
Binary file not shown.
Binary file added design/mockups/import-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/mockups/main-gallery-grid-option-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/mockups/main-gallery-grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/mockups/people-faces-dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src-tauri/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ rustflags = ["-C", "target-cpu=native"]

[env]
SQLX_OFFLINE = "true"
# vips-sys does not pass VIPS_ROOT/include to bindgen's clang, so we set it here.
BINDGEN_EXTRA_CLANG_ARGS = { value = "-I'C:/Program Files/vips/vips-dev-8.18/include' -I'C:/Program Files/vips/vips-dev-8.18/include/glib-2.0' -I'C:/Program Files/vips/vips-dev-8.18/lib/glib-2.0/include'", force = true }

[target.x86_64-unknown-linux-gnu]
linker = "clang"
1 change: 1 addition & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tauri-build = { version = "2", features = [] }

[dependencies]
# --- Tauri v2 ---
tauri = { version = "2" }
tauri = { version = "2", features = [] }
tauri-plugin-log = "2"
tauri-plugin-fs = "2"
tauri-plugin-dialog = "2"
Expand All @@ -27,20 +27,24 @@ serde_json = "1"
tokio = { version = "1", features = ["full"] }

# --- Database: sqlx with SQLite ---
# "offline" feature allows compile-time query checking without a live DB.
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite", "chrono", "macros"] }

# --- Image processing ---
vips = "0.1.0-alpha.5"
# vips is optional; falls back to the `image` crate when libvips is unavailable.
vips = { version = "0.1.0-alpha.5", optional = true }
vips-sys = { version = "0.1.3-beta.2", optional = true }
image = "0.25"

# --- EXIF / metadata parsing ---
exif = { package = "kamadak-exif", version = "0.6" }

# --- ONNX Runtime (GPU-accelerated face detection) ---
# Optional: enable with --features face-detection
# CUDA support enabled via the "cuda" feature.
# "load-dynamic" loads CUDA libraries at runtime rather than link time.
ort = { version = "2.0.0-rc.12", features = ["cuda", "load-dynamic"] }
ort-sys = "2.0.0-rc.12"
ort = { version = "2.0.0-rc.12", features = ["cuda", "load-dynamic"], optional = true }
ort-sys = { version = "2.0.0-rc.12", optional = true }

# --- UUID for hashed cache keys ---
uuid = { version = "1", features = ["v4"] }
Expand Down Expand Up @@ -68,6 +72,8 @@ duct = "0.13"
[features]
default = ["custom-protocol"]
custom-protocol = ["tauri/custom-protocol"]
vips = ["dep:vips", "dep:vips-sys"]
face-detection = ["dep:ort", "dep:ort-sys"]

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-updater = "2"
13 changes: 13 additions & 0 deletions src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/nicegram/tauri/v2.0.0/tooling/cli/src/helpers/json-schemas/capabilities.json",
"identifier": "default",
"description": "Default capabilities for Praetorian",
"windows": ["main"],
"permissions": [
"core:default",
"dialog:allow-open",
"dialog:allow-save",
"fs:default",
"shell:default"
]
}
Loading