How centiverse-solutions/centiverse-desktop works
Project Type and Purpose
• This project is a hybrid desktop/web application utilizing a React-based frontend bootstrapped with Create React App and a Tauri-based backend written in Rust.
• The purpose is to create a desktop application with a modern UI (React) while taking advantage of native capabilities through Tauri. The backend handles REST-like routes, database migrations, entity management, and business logic.
File Structure
• The top-level directory shows typical React project files including "src", "public", and build configuration files (package.json, etc.).
• The presence of the "src-tauri" directory indicates that the native part of the application is implemented in Rust. Within this directory, key directories include:
• /src-tauri/src: Contains main Rust code with controllers, entity definitions, models, routes, and custom errors.
• /src-tauri/migration: Contains database migration scripts in Rust indicating an evolving database schema.
• /src-tauri/gen: Holds generated schema files for various components (e.g., ACL manifests, desktop-schema, etc.).
• Configurations and environment files (e.g., tauri.conf.json, .env) that control native application behavior.
• The projects clearly separate concerns between the UI (React) and the business logic and system access layer (Rust/Tauri).
Insights from the README
• The README primarily focuses on the Create React App side, explaining build and deployment steps for the UI. While it doesn’t cover backend specifics, the front-end instructions imply that the React code interacts with the backend via APIs or Tauri commands.
Elements
• Clear Labels: Each component should be clearly labeled (e.g., “React Frontend”, “Tauri Backend – Controllers”, “Database”, etc.).
• Frontend and Tauri API layer,
• Controllers handling specific routes,
• Models/Entities interacting with the Database,
• Auxiliary modules dealing with authentication and error handling.
Final Advice
• Drill down into the backend layer by showcasing the key modules (controllers, migrations, models/entities, utilities).