How wass08/r3f-virtual-girlfriend-frontend works
Project type and purpose
• This is a single-page web application built with Vite and React (JSX), augmented by React Three Fiber (r3f) for 3D rendering. Its goal is to present a “virtual girlfriend” avatar in a browser: loading 3D models and animations, rendering them in a scene, and handling chat-driven interactions via an external backend.
File structure
• Top level:
• index.html – the HTML entry point
• vite.config.js, package.json – build/config files
• postcss.config.js, tailwind.config.js – CSS tooling
• public/
• animations/ (.fbx) – raw animation clips
• models/ (.glb, .fbx) – 3D assets
• src/
• main.jsx, App.jsx – application bootstrap and root component
• components/
– Avatar.jsx – 3D character wrapper
– Experience.jsx – scene setup (lights, camera, renderer)
– UI.jsx – chat input/output interface
• hooks/useChat.jsx – custom hook for communicating with the backend chat API
• index.css – global styles
• There is no backend here; the README links to a separate repository for chat/message handling.
Key insights from the README
• The frontend is run via “yarn dev” in this repo.
• All chat logic is abstracted in the useChat hook and powered by the external backend service.
• The tutorial video shows how models and animations are loaded and how chat drives avatar expressions.