Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
66 changes: 66 additions & 0 deletions docs/overview/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,72 @@ as well as users who want to use the app. A postman collection has also been add
<br>
<br>

## High Level System Flow

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Hyphenate the section title.

High Level should be High-Level here for consistency and cleaner documentation style. As per path instructions, documentation and comments must be free of spelling mistakes.

Suggested edit
-## High Level System Flow
+## High-Level System Flow
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## High Level System Flow
## High-Level System Flow
🧰 Tools
🪛 LanguageTool

[grammar] ~36-~36: Use a hyphen to join words.
Context: ...d in our API section.

## High Level System Flow The following diagram...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/overview/architecture.md` at line 36, The section title in the
architecture documentation needs a hyphen for consistency: update the “High
Level System Flow” heading to “High-Level System Flow.” Make the change directly
in the markdown heading text so the documentation style matches the rest of the
docs and the title uses the correct wording.

Source: Path instructions


The following diagram illustrates how different components of PictoPy interact with each other.

```mermaid
graph TD

User[User]

Frontend[React Frontend]
Tauri[Tauri Bridge]

Rust[Rust Backend]

FastAPI[FastAPI Backend]

SQLite[(SQLite Database)]

ONNX[ONNX Runtime]
YOLO[YOLO Detection Models]
FaceNet[FaceNet Embeddings]

User --> Frontend

Frontend --> Tauri

Tauri --> Rust

Rust --> FastAPI

FastAPI --> SQLite

FastAPI --> ONNX

ONNX --> YOLO
ONNX --> FaceNet
```



The diagram above illustrates the interaction between the frontend, Tauri bridge, Rust backend, Python backend, database, and AI models.

## Backend rust (via Tauri)

The Rust backend, integrated through Tauri, is a core component of our application. It leverages Rust's performance and safety features to handle file system operations, provide a secure bridge between the frontend and the local system, and manage OS-level interactions. This backend efficiently manages tasks such as reading and writing image files, extracting metadata, and ensuring secure access to system resources. It communicates with the React frontend through an IPC mechanism, allowing for seamless integration of low-level functionalities with the user interface. This architecture enables high-performance, secure operations on the local system while maintaining a smooth user experience.

## Image Processing Workflow

```mermaid
sequenceDiagram
participant User
participant Frontend
participant Rust
participant FastAPI
participant Models
participant Database

User->>Frontend: Select Images
Frontend->>Rust: Request Processing
Rust->>FastAPI: Send Processing Task
FastAPI->>Models: Run Detection & Recognition
Models-->>FastAPI: Return Results
FastAPI->>Database: Store Metadata
Database-->>FastAPI: Confirm Storage
FastAPI-->>Rust: Return Response
Rust-->>Frontend: Processed Results
Frontend-->>User: Display Results
```
This workflow shows how images are processed, analyzed, and stored before results are presented to the user.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ const FolderManagementCard: React.FC = () => {
</div>

<Button
onClick={() => deleteFolder(folder.folder_id)}
onClick={() => {
const confirmed = window.confirm(
'Are you sure you want to delete this folder? This action cannot be undone.',
);

if (confirmed) {
deleteFolder(folder.folder_id);
}
}}
variant="outline"
size="sm"
className="h-8 w-8 cursor-pointer text-gray-500 hover:border-red-300 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400"
Expand Down
Loading