How tadanobutaaaaa/vrc_avatar_library works
Main Components
• Frontend User Interface:
• Located in the "frontend" directory.
• Contains entry points like index.html, main.jsx, and several React components and pages (e.g., home.jsx, manual.jsx, processing.jsx, result.jsx, setupProcess.jsx).
• Utilizes Vite as the build tool (see vite.config.js) with supporting configurations for integrating with the Wails runtime (notably in the "frontend/wailsjs" folder that contains Go API bindings and runtime scripts).
• Backend Service:
• Built using Go, as seen from files like app.go, githubAPI.go, goServer.go, and main.go.
• Go modules configured via go.mod and go.sum.
• The backend contains business logic that likely powers functionality related to handling avatar data or processing VRChat avatars.
• Wails Integration and Configuration:
• The presence of the wails.json file indicates configuration details for the Wails framework, providing the glue between the Go backend and the web-based frontend.
• This integration allows for seamless calling of Go functions from the frontend through JavaScript APIs, as evidenced by folders like "frontend/wailsjs".
• Build and Deployment Artifacts:
• The "build" directory has subdirectories for different platforms (darwin for macOS and windows for Windows), including installer scripts and manifest/installer files.
• This shows that the project includes a packaging pipeline for distributing the desktop application on multiple operating systems.
Relationships and Interactions
• Communication Flow:
• The frontend (React) communicates with the backend (Go) via the Wails framework. This is typically achieved through well-defined API calls which may use websockets or other inter-process communication methods (hinted at by frontend/src/hooks/goWebSocket.jsx).
• Build Pipeline:
• A component that represents the multi-platform build system. This involves separate build artifacts for macOS and Windows, perhaps showing them as output from the build process that compiles and packages the application.
Architectural Patterns and Technologies
• Wails Framework:
• That the system leverages Wails to integrate a Go backend with a modern web UI, bridging native OS features with a responsive frontend.
• Full-Stack (Desktop Application) Architecture:
• The separation of concerns is clear: the UI is independently developed in the frontend, while business and system logic lives in the Go backend.
• Use of Modern Web Technologies:
• React components, Vite build tool, and JavaScript modules are crucial to the functioning of the UI, along with the inclusion of helper libraries (as seen in the "frontend/src/components/ui" folder).