How afadil/wealthfolio works
Project’s Main Components
• Frontend UI: Located in the “src” directory. This layer includes React components, pages, context providers, hooks, and routing (via React Router). It also uses Tailwind CSS for styling and charting libraries (Recharts) for visualizations.
• Core Backend: Found in “src-core”. This Rust-based code folder contains domain logic (for accounts, activities, assets, portfolio management, etc.), database migrations (using Diesel), and service layers implementing business rules.
• Public Assets & Configurations: Includes “public” for static assets, various configuration files (package.json, tailwind.config.js, tsconfig.json, etc.), and the deployment and build scripts.
Relationships and Interactions
• Tauri & Core Backend Integration: Indicate that the Tauri layer calls into the Rust-based backend (src-core) to perform business operations such as database interactions (through Diesel migrations) and data processing for various modules (account, activity, portfolio, etc.).
Architectural Patterns and Design Principles
• Separation of Concerns / Layered Architecture: The design naturally separates the UI, native desktop layer, and domain/business logic.
• Command Pattern: In the Tauri layer, commands are defined (as seen in src-tauri/src/commands) to encapsulate requests from the frontend.
• Repository & Service Patterns: Within the core backend (src-core), repositories and services for various entities (like account, activity, fx, goal, settings, etc.) are used to encapsulate the logic.
• Local Storage / Self-contained Design: With no cloud dependencies, all data storage (likely managed by Diesel) is local.
Relevant Technologies and Tools
• Frontend: React, React Router, Tailwind CSS, Radix UI/Shadcn, Recharts, React Query, Zod.
• Backend: Rust, Diesel (for migrations and database access).
• Desktop: Tauri for native desktop integration.
• Development Tools: Vite, TypeScript, ESLint, Prettier.
Instructing the Principal Software Engineer
• From UI to Tauri (to represent command calls).
• From Tauri to Core Backend (for business logic processing and database operations).
• Use consistent labels and legends for clarity.
• Configuration elements and external services, if necessary.
• You capture environment dependencies like Node.js, pnpm, Rust, and Tauri as part of the development tools configuration but focus on runtime architecture.