add a basic gui with Tauri + React frontend + Rust core#2
Open
Adeliu4239 wants to merge 2 commits intomainfrom
Open
add a basic gui with Tauri + React frontend + Rust core#2Adeliu4239 wants to merge 2 commits intomainfrom
Adeliu4239 wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new desktop/ Tauri application with a React + Vite frontend and a Rust Tauri core that bridges to the existing soteric crate (profiles + process scan) via invoke commands.
Changes:
- Introduces a Vite + React + Tailwind (shadcn/base-ui) UI with pages for Dashboard, Profiles, Monitor, and Activity Log.
- Adds a Tauri v2 Rust layer exposing profile management + process scanning commands backed by the
sotericcrate. - Adds Tauri config/capabilities plus app icons/assets for bundling.
Reviewed changes
Copilot reviewed 29 out of 52 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| desktop/vite.config.ts | Vite config tailored for Tauri dev (port/HMR) + alias setup |
| desktop/tsconfig.node.json | TS config for Node-side tooling (Vite config) |
| desktop/tsconfig.json | Frontend TS config + path aliasing |
| desktop/src/vite-env.d.ts | Vite client type references |
| desktop/src/types.ts | Shared frontend types for profiles/process/activity |
| desktop/src/store.ts | React hook-based app state + Tauri invoke calls |
| desktop/src/pages/Profiles.tsx | Profiles management UI |
| desktop/src/pages/Monitor.tsx | Manual scan UI + monitored tools display |
| desktop/src/pages/Dashboard.tsx | Overview UI tying together active profile, scans, activity |
| desktop/src/pages/ActivityLog.tsx | Activity log UI and coloring |
| desktop/src/main.tsx | React entrypoint |
| desktop/src/lib/utils.ts | Tailwind class merging helper (cn) |
| desktop/src/index.css | Tailwind/shadcn + theme variables |
| desktop/src/components/ui/separator.tsx | UI primitive wrapper (separator) |
| desktop/src/components/ui/scroll-area.tsx | UI primitive wrapper (scroll area) |
| desktop/src/components/ui/card.tsx | UI component (card) |
| desktop/src/components/ui/button.tsx | UI component (button) |
| desktop/src/components/ui/badge.tsx | UI component (badge) |
| desktop/src/assets/react.svg | React asset |
| desktop/src/App.tsx | App shell + sidebar navigation + page routing |
| desktop/src/App.css | Template CSS (legacy Vite/Tauri starter styles) |
| desktop/src-tauri/tauri.conf.json | Tauri v2 app configuration |
| desktop/src-tauri/src/main.rs | Tauri binary entrypoint |
| desktop/src-tauri/src/lib.rs | Tauri command handlers bridging to soteric |
| desktop/src-tauri/icons/icon.png | App icon asset |
| desktop/src-tauri/icons/StoreLogo.png | Store logo asset |
| desktop/src-tauri/icons/Square89x89Logo.png | App icon asset (89x89) |
| desktop/src-tauri/icons/Square71x71Logo.png | App icon asset (71x71) |
| desktop/src-tauri/icons/Square44x44Logo.png | App icon asset (44x44) |
| desktop/src-tauri/icons/Square310x310Logo.png | App icon asset (310x310) |
| desktop/src-tauri/icons/Square30x30Logo.png | App icon asset (30x30) |
| desktop/src-tauri/icons/Square284x284Logo.png | App icon asset (284x284) |
| desktop/src-tauri/icons/Square150x150Logo.png | App icon asset (150x150) |
| desktop/src-tauri/icons/Square142x142Logo.png | App icon asset (142x142) |
| desktop/src-tauri/icons/Square107x107Logo.png | App icon asset (107x107) |
| desktop/src-tauri/icons/32x32.png | App icon asset (32x32) |
| desktop/src-tauri/icons/128x128@2x.png | App icon asset (256x256) |
| desktop/src-tauri/icons/128x128.png | App icon asset (128x128) |
| desktop/src-tauri/capabilities/default.json | Tauri capabilities/permissions configuration |
| desktop/src-tauri/build.rs | Tauri build script |
| desktop/src-tauri/Cargo.toml | Rust/Tauri crate manifest + deps |
| desktop/public/vite.svg | Vite asset |
| desktop/public/tauri.svg | Tauri asset |
| desktop/package.json | Frontend dependencies + scripts |
| desktop/index.html | Vite HTML entry template |
| desktop/components.json | shadcn config (aliases, css path, etc.) |
| desktop/README.md | Desktop app README stub |
| .gitignore | Ignore rules for Rust + Node + Tauri generated output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+7
to
+8
| let home = std::env::var("HOME").unwrap_or_else(|_| ".".to_string()); | ||
| PathBuf::from(home).join(".soteric").join("profiles.json") |
Comment on lines
+17
to
+20
| export default function Profiles({ profiles, onActivate, onDeactivate, onDelete }: Props) { | ||
| const [selected, setSelected] = useState<string>(profiles[0]?.name ?? ""); | ||
| const selectedProfile = profiles.find((p) => p.name === selected) ?? null; | ||
|
|
Comment on lines
+33
to
+64
| async function activateProfile(name: string) { | ||
| await invoke("activate_profile", { name }); | ||
| await loadProfiles(); | ||
| addActivity(`Profile activated: ${name}`); | ||
| } | ||
|
|
||
| async function deactivateProfile(name: string) { | ||
| await invoke("deactivate_profile", { name }); | ||
| await loadProfiles(); | ||
| addActivity(`Profile deactivated: ${name}`); | ||
| } | ||
|
|
||
| async function deleteProfile(name: string) { | ||
| await invoke("delete_profile", { name }); | ||
| await loadProfiles(); | ||
| addActivity(`Profile deleted: ${name}`); | ||
| } | ||
|
|
||
| async function runScan() { | ||
| const result = await invoke<DetectedProcess[]>("scan_processes"); | ||
| setProcesses(result); | ||
| const now = new Date(); | ||
| const time = `${now.getHours()}:${String(now.getMinutes()).padStart(2, "0")}`; | ||
| setLastScan(time); | ||
| if (result.length > 0) { | ||
| addActivity( | ||
| `Scan completed — ${result.length} AI tool(s) detected: ${result.map((p) => p.name).join(", ")}` | ||
| ); | ||
| } else { | ||
| addActivity("Scan completed — no AI tools detected"); | ||
| } | ||
| } |
Comment on lines
+11
to
+14
| function eventColor(event: string) { | ||
| if (event.includes("detected") || event.includes("encrypted")) return "text-destructive"; | ||
| if (event.includes("activated") || event.includes("completed")) return "text-emerald-600 dark:text-emerald-400"; | ||
| return "text-foreground"; |
Comment on lines
+13
to
+15
| alias: { | ||
| "@": path.resolve(__dirname, "./src"), | ||
| }, |
Comment on lines
+20
to
+22
| "security": { | ||
| "csp": null | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.