How nhat-tien/graph-theory works
Project type and purpose
• This is a hybrid desktop application built on Tauri.
• The UI is a Vue 3/Vite single-page app (SPA) for visualizing graph theory algorithms (Prim, Kruskal).
• The backend is a Rust binary (via Tauri) implementing graph data structures, algorithms, and file I/O commands.
File structure
Top‐level:
• index.html, package.json, src/… → Vue/Vite front-end
• public/ → static assets (fonts, images)
• src-tauri/ → Rust/Tauri backend
• .github/workflows → CI pipeline
• config files: vite.config.ts, tsconfig.json, tauri.conf.json
Frontend details (src/):
• App.vue, main.ts → entry point
• components/ → Vue components (Graph.vue, AlgorithmPage, UI controls)
• composables/ → Composition API hooks for graph state and animations
• stores/ → Pinia stores for global state (graph data, modes, timers)
• assets/styles → global SCSS, variables
• directives, global.scss → utility code
Backend details (src-tauri/):
• main.rs → Tauri command registration, app bootstrap
• edge.rs, graph.rs → core graph data structures
• prim.rs, kruskal.rs → algorithm implementations
• file_command.rs → file read/write logic
• tauri.conf.json, build.rs → build & config
README
• Short description: “Graph Theory Visualization built based on Tauri”
• Screenshots only; no explicit architecture section