CLONE THIS https://github.com/KnifeLemon/Filee THEN FOLLOW T...
Prompt
CLONE THIS https://github.com/KnifeLemon/Filee THEN FOLLOW THIS PROMT ADD AA FUTHURE LIKE THAY CAN SHARE A PDF OR ANYTHING IIT SUPPORTS FOR MOBILE LIKE THE FEAURE IS LIKE IF WE SHARE THE FILE TO THE APP IT NEEDS TO GO TO THE APP AND UPLOAD SO THE USER CAN CHANGE TO ANY FILE # ROLE & OBJECTIVE You are an Autonomous Principal .NET & Mobile Systems Architect operating in a strict **Self-Correcting Execution Loop**. Your mission is to clone `https://github.com/KnifeLemon/Filee.git` (an MIT-licensed C# / .NET 10 / Avalonia desktop drag-and-drop file converter) and transform it into a standalone, lightweight, 100% offline-capable **Mobile Application (Android & iOS)** focused on the formats mobile users actually need (PDFs, Images, Office Documents, Archives, and Data files), complete with a touch-friendly Mobile UI and native **"Share to App"** file intake. --- # CRITICAL EPISTEMIC RULE: DO NOT BLINDLY TRUST PRELIMINARY FINDINGS Below are preliminary architectural findings from an initial audit of `KnifeLemon/Filee`. **WARNING: Some of these findings may be incomplete, outdated, or wrong due to recent commits.** Before deleting, modifying, or keeping ANY file, NuGet package, or conversion route, you MUST inspect the actual cloned source code, verify its dependencies, and rethink whether it can run natively on Android/iOS (`net10.0-android` / `net10.0-ios`) or if it relies on desktop-only OS APIs/binaries. ### Preliminary Findings (Verify & Challenge Every Item): 1. **`src/Filee.Core` (Domain & Routing):** Intended to hold pure C# domain rules (routes, presets, output naming, and `Conversion/JobQueue.cs`) with no UI or OS code. *Verify this:* Check if any classes inside `Filee.Core` secretly invoke `System.Diagnostics.Process`, P/Invoke, or desktop file paths, and refactor them if found. 2. **`src/Filee.Engines` (Engines & Archives):** Contains the built-in archive extraction/packing engine and wrappers for external engines. *Verify this:* Keep pure C# / mobile-compatible libraries (e.g., `SkiaSharp`, `OpenXml`, pure C# PDF/PostScript/SVG/Archive handlers) and strip or disable engines that shell out to desktop binaries (`rhwp`, `pandoc`, `calibre`, `Ghostscript`, `LibreOffice`, desktop `7z.exe`, or desktop `ffmpeg.exe`). 3. **`src/Filee.App` (Desktop Avalonia UI & OS Hooks):** Built around holding `Ctrl`/`Option` to spawn a radial "donut" menu at the mouse cursor, Windows Explorer/macOS/Linux context menus, Watch Folders, system tray icons, and `Services/` for downloading desktop engines. *Verify this:* Inspect `Filee.App` to see which XAML styles, radial donut math, and ViewModels can be salvaged for a touch screen, and delete all desktop window/cursor/tray/watch-folder hooks. 4. **`src/Filee.Cli`, `installer/`, and `build/fetch-engines.ps1`:** Desktop CLI tool, Inno Setup/shell installers, and the PowerShell script that fetches desktop binaries (`rhwp`, `pandoc`, etc.). *Verify this:* Confirm that nothing in the mobile build depends on them, then remove them cleanly. --- # CORE MOBILE REQUIREMENTS TO IMPLEMENT ### 1. Strip Unwanted PC Bloat & Keep Mobile-First Formats - **REMOVE PC-Only Specs:** Delete `src/Filee.Cli`, `installer/`, `build/fetch-engines.ps1`, Watch Folders, global mouse/keyboard hooks, Explorer/Finder shell extensions, desktop hardware GPU video flags (`NVENC`, `Quick Sync`, `AMF`, `VA-API`), and routes requiring external desktop executables (`HWP/HWPX` via `rhwp`, `LaTeX/Typst` via `Pandoc`, `Calibre` e-book CLI, `Ghostscript` CLI). - **KEEP & VERIFY Mobile-First Conversions (100% On-Device):** - **PDF Suite:** Merge PDF, Split PDF, Compress PDF (72/150/300 DPI image downsampling), `PDF β JPG/PNG`, `PDF β PPTX (slides)`, `PDF β DOCX/TXT`. - **Images & Graphics:** `HEIC/HEIF`, `WEBP`, `JPG`, `PNG`, `AVIF`, `GIF`, `BMP`, `TIFF`, `ICO`, and `Image β SVG` (built-in vector tracing). - **Office & Documents:** Built-in OpenXML routes (`DOCX`, `XLSX`, `PPTX`, `CSV`, `TXT`, `HTML`, `Markdown`). - **Archives & Data:** `ZIP`, `TAR`, `GZ`, `7Z/RAR` extraction, `JSON β CSV/YAML/XML`, `vCard (.vcf) β CSV`. ### 2. Redesign UI for Mobile Touch (`Filee.Mobile` / Adapted `Filee.App`) Replace the desktop cursor-following window with a clean, single-window, touch-first mobile navigation flow: - **Screen 1: Home & File Intake View:** A prominent "Tap to Select Files" button (using native mobile file/photo pickers) + a list of recent conversions with thumbnails. - **Screen 2: Touch Radial "Donut" Format Selector:** Adapt Filee's signature radial donut menu so it renders centered on the mobile screen when files are loaded. Only display target formats valid for the selected input file(s). Include a bottom sheet or toolbar for Preset options (e.g., PDF Compression DPI, Image Quality/Resize). - **Screen 3: Active Job Queue & Output Actions:** Connect directly to `Filee.Core`'s `JobQueue.cs` to show real-time progress bars. Once converted, provide two instant mobile buttons: **"Save to Device"** and **"Share Converted File"** (via native OS Share Sheet). ### 3. Mandatory Feature: Incoming OS "Share to App" Integration When a user is inside another mobile app (e.g., WhatsApp, Gmail, iOS Files, Android Gallery, or a PDF viewer) and selects **"Share" β "[Our App]"** on a single file or multiple files: - **Android:** Configure `AndroidManifest.xml` and `MainActivity` with `Intent.ActionSend` and `Intent.ActionSendMultiple` (`mimeType="*/*"` or supported types like `application/pdf`, `image/*`, `text/*`, `application/*`). - **iOS:** Configure `Info.plist` (`CFBundleDocumentTypes` / `LSSupportsOpeningDocumentsInPlace` / Share intake handler) to accept incoming shared file URLs. - **App Behavior on Share:** The app must automatically wake up, copy/stream the shared file URI(s) into a safe local cache directory, auto-populate the conversion intake queue with the shared file(s), and immediately present the **Touch Radial Format Selector** showing compatible target formats for that shared file. --- # MANDATORY SELF-LOOP EXECUTION PROTOCOL You must execute this project autonomously using the following continuous **Chain-of-Thought Self-Loop**. Do not stop to ask for permission between steps. After every code change, run the compiler/tests and loop until zero errors remain. ### LOOP PHASE 1: CLONE & DEEP AUDIT (THINK BEFORE ACTING) 1. Clone `https://github.com/KnifeLemon/Filee.git` and inspect the solution (`.sln` / `.slnx`), project files (`.csproj`), and directory tree. 2. Output an **Audit Log** comparing the Preliminary Findings against the actual code you see: - What did the prompt get right? - What did the prompt get wrong or miss? - Exact list of files/classes to DELETE, REFACTOR, or KEEP. ### LOOP PHASE 2: PRUNE PC BLOAT & ISOLATE MOBILE CORE 1. Remove `Filee.Cli`, desktop installers, and desktop engine fetch scripts from the solution. 2. Audit every converter in `src/Filee.Core` and `src/Filee.Engines`. Prune or guard any converter that shells out to an unbundled desktop executable. 3. Update the route graph so the UI only offers routes backed by working on-device C#/mobile engines. 4. **Verification Gate 1:** Run `dotnet build` on `Filee.Core` and `Filee.Engines`. If any build errors or missing references occur, enter the **Error Rectification Sub-Loop** (read compiler output β identify root cause β fix code β rebuild) until `0 Errors, 0 Warnings`. ### LOOP PHASE 3: MOBILE TARGETS, TOUCH UI & "SHARE TO APP" PIPELINE 1. Configure/create the mobile head targets (`net10.0-android` and `net10.0-ios`) referencing `Filee.Core` and `Filee.Engines`. 2. Strip out desktop window hooks (`Ctrl`/mouse polling, tray icons, Explorer menus, Watch Folders) from the UI project. 3. Implement the responsive Mobile Touch UI (File Picker Home, Centered Touch Donut Format Selector, Preset Bottom Sheet, and JobQueue Progress/Result screen). 4. Implement the native **"Share to App"** receiver pipeline (Android `ACTION_SEND` / `ACTION_SEND_MULTIPLE` + iOS `OpenUrl` / Document intake) that pipes incoming shared streams directly into the app's file intake controller and opens the format selector. ### LOOP PHASE 4: COMPILE, TEST & SELF-RECTIFY LOOP Repeat the following cycle autonomously until all checks pass: 1. Run `dotnet build` across all active projects and run existing unit tests (`dotnet test`) adapted for the mobile core. 2. **If ANY error, broken route, invalid XAML binding, or platform API mismatch appears:** - **Analyze:** State the exact file, line number, and root cause of the failure. - **Rethink:** Ask yourself if a desktop dependency leaked into the mobile build or if a route table entry still points to a deleted PC converter. - **Rectify:** Patch the code and re-run `dotnet build` / `dotnet test`. 3. Only exit the loop when the solution compiles cleanly with `0 Errors`, the route table contains only verified mobile-compatible formats, and the "Share to App" -> "Select Format" -> "Convert & Share Output" flow is fully wired end-to-end. Begin now with **LOOP PHASE 1: CLONE & DEEP AUDIT**. BE EFFIENT IN CODE USE PONYTAIL SKILLS [ponytail](slashCommand;ponytail) [/grill-me](slashCommand;grill-me) [/goal](slashCommand;goal)