How jkanishkha0305/3d-portfolio works
Main Components
• Frontend Application – This is the core of the project and includes all the React components, pages, and layout files. Key directories include /src, which contains:
• Component files (e.g., Navbar, Hero, Project, About, Experience, etc.)
• Higher Order Components (HOCs) in the /src/hoc folder that help wrap sections or add common behavior.
• Global styling and utility files (global.scss, tailwind.config.js, postcss.config.js, etc.).
• The main entry points (src/App.jsx, src/main.jsx) that boot up the React app.
• 3D Rendering Module – Within the /src/components/canvas folder, there are distinct components (Ball, Computers, Earth, Stars) for ThreeJS 3D scenes. This module leverages React Three Fiber for integrating 3D graphics into React.
• Assets & Static Resources – These are managed in directories like /public and /dist as well as in the /src/assets folder. They include:
• 3D model files (such as scene.bin, scene.gltf, textures, license.txt) for desktop_pc and planet variants.
• Media and other project-specific assets organized neatly.
• Deployment & Build Infrastructure – Evident from the node configurations (package.json, package-lock.json) and build files (vite.config.js) alongside GitHub actions for deployment located in .github/workflows/deploy.yml.
• External Services & Libraries – The project integrates several external libraries:
• ThreeJS + React Three Fiber for 3D.
• TailwindCSS and Sass for styling.
• Framer Motion for animations.
• Potential email service integration (as explained in the README) for contact forms.
• Various utility libraries like ityped and react-parallax-tilt for interactive UX.
Relationships and Interactions
• The React application acts as the client-facing layer, driving interactions and navigation among components.
• Specific components within the /src/components folder are interconnected via routing and props. Higher order components (HOCs) in /src/hoc wrap and enhance these pages with additional behavior (e.g., consistent styling, animations).
• 3D-related components in the canvas folder are integrated within the React component tree and interact with the DOM and user events. They serve as dedicated modules for 3D modeling and animations.
• The static assets (3D scenes and textures) are loaded dynamically into the 3D components using ThreeJS. This involves data flow from the static file system (in /dist and /public) to the rendering components.
• External libraries and configuration files (e.g., tailwind.config.js, vite.config.js) ensure the project’s build process is smooth and optimized for both development and production.
Architectural Patterns and Technologies
• Component-Based Architecture – The project is built entirely with React by separating UI segments into individual, reusable components.
• Composition with Higher Order Components (HOCs) – Enhances reusability and consistency across the different sections of the portfolio.
• 3D Rendering using React Three Fiber – Integrates ThreeJS within the React ecosystem, managing 3D scene complexity with React’s lifecycle.
• Build and Deployment Patterns – Use of Vite for fast builds and a clear distinction between source code (/src), public assets (/public), and the build/distribution output (/dist).