3D Robotic Portfolio Website
The 3D Robotic Portfolio Website is a high-performance, visually immersive web application designed to showcase a developer's portfolio with cinematic flair. Leveraging state-of-the-art web technologies including React 18, Three.js, and Framer Motion, it delivers a seamless, interactive user experience. Key differentiators include a physics-based robotic drone simulation, smooth "cinematic" scrolling via Lenis, and a responsive, glassmorphism-inspired UI. This report documents the complete technical state, architecture, and implementation details of the project following recent enhancements to the navigation and skills display systems.
- ๐งฉ Project Overview
- ๐ฏ Objectives & Goals
- โ Acceptance Criteria
- ๐ป Prerequisites
- โ๏ธ Installation & Setup
- ๐ API Documentation
- ๐ฅ๏ธ UI / Frontend
- ๐ข Status Codes
- ๐ Features
- ๐งฑ Tech Stack & Architecture
- ๐ ๏ธ Workflow & Implementation
- ๐งช Testing & Validation
- ๐ Validation Summary
- ๐งฐ Verification Testing Tools
- ๐งฏ Troubleshooting & Debugging
- ๐ Security & Secrets
- โ๏ธ Deployment
- โก Quick-Start Cheat Sheet
- ๐งพ Usage Notes
- ๐ง Performance & Optimization
- ๐ Enhancements & Features
- ๐งฉ Maintenance & Future Work
- ๐ Key Achievements
- ๐งฎ High-Level Architecture
- ๐๏ธ Folder Structure
- ๐งญ How to Demonstrate Live
- ๐ก Summary, Closure & Compliance
A single-page portfolio application that serves as a digital resume and showcase associated with Mohit Kumar Dey. It transitions from a standard static site into a dynamic, 3D interactive experience. The core interaction model relies on a custom "Scroll Lock" mechanism that guides users through narrative sections (Hero, About, Services, Skills, Projects) with precise timing and animation.
- Immersive UX: Provide a "wow" factor using 3D elements and smooth scrolling.
- Performance: Maintain 60fps animations even with heavy graphical elements.
- Responsiveness: Ensure full functionality across desktop and mobile devices.
- Maintainability: Use a modular component architecture with TypeScript for type safety.
- Robust Navigation: Guarantee error-free navigation regardless of scroll state or device type.
- Mobile Menu: Hamburger menu must open/close smoothly and navigate correctly to sections without scroll locking issues.
- Skills Carousel: Must scroll infinitely in a seamless loop at a constant 100px/s speed, pausing on hover and resuming instantly.
- Hero Section: 3D Drone must load and respond to interaction; initial scroll lock must automatically release after intro animation.
- Performance: No layout shifts or jank during scrolling.
- Node.js: v18.0.0 or higher
- npm: v9.0.0 or higher
- Operating System: Windows, macOS, or Linux
- Browser: Modern browser with WebGL support (Chrome/Edge/Firefox/Safari)
- Clone the Repository:
git clone <repository_url> cd 3D-Robotic-Portfolio-Website
- Install Dependencies:
npm install # or npm ci - Start Development Server:
npm run dev
- Build for Production:
npm run build
This project is primarily client-side. The backend (server/index.ts) serves as a static file host and API proxy.
GET /api/*: Reserved for future backend API routes (currently minimal).GET /*: Serves the React SPA (Client-side routing via Wouter).
- Pages:
Home(client/src/pages/home.tsx): The main entry point orchestrated byFullPage.tsx.
- Key Components:
Header: Responsive navigation bar with mobile hamburger menu, ScrollLockManager integration, and Lenis scroll control.Hero: 3D Canvas integration, typing text effect, and intro scroll lock logic.Skills: Infinite carousel withuseAnimationFramecustom loop for precise speed control.Projects,Services,About: Informational sections with reveal animations.
- State Flow:
- Global Layout:
FullPage.tsxinitializesLenis(smooth scroll) and exposes it towindow.lenis. - Scroll Locking:
ScrollLockManagersingleton coordinates scroll freezing for specific durations (e.g., during Hero intro). - Theme:
ThemeProvidercontext manages Light/Dark mode.
- Global Layout:
Where to change styles:
- Global:
client/src/index.css(Tailwind directives & custom animations). - Component-specific: Inline Tailwind classes within
.tsxfiles. - Configuration:
tailwind.config.ts.
- 200 OK: Successful resource load / API response.
- 404 Not Found: Client-side route not found (handled by
NotFoundpage). - 500 Internal Server Error: Backend processing failure.
- Cinematic Scrolling: Custom-tuned Lenis integration for buttery smooth vertical traversal.
- 3D Drone Interaction: Interactive Spline/Three.js model in the Hero section.
- Infinite Skills Loop: Custom-engineered carousel that never stutters or resets visibly.
- Glassmorphism UI: High-end aesthetic using backdrop filters and transparency.
- Mobile-First Navigation: Touch-friendly menu with intelligent scroll unlocking.
- Frontend: React 18, TypeScript, Vite
- Styling: Tailwind CSS, PostCSS, Lucide Icons
- Animation: Framer Motion, GSAP, Tailwind-Animate
- 3D/Graphics: Three.js, @react-three/fiber, @react-three/drei
- State/Routing: Wouter, TanStack Query
- Backend: Express (Node.js)
+-------------------------------------------------------+
| App.tsx |
| [QueryClientProvider] -> [ThemeProvider] -> [Router] |
+-------------------------------------------------------+
|
v
+-------------------------------------------------------+
| Home.tsx |
| [FullPage.tsx] |
| (Manages Lenis Scroll & ScrollLockManager Singleton) |
+---------------------------+---------------------------+
|
+-------------+---------+---------+-------------+
| | | |
+---+----+ +----+---+ +-----+----+ +----+---+
| Header | | Hero | | Skills | | Footer |
+--------+ +--------+ +----------+ +--------+
| | |
[MobileMenu] [Canvas3D] [InfiniteLoop]
| | |
[UnlockScroll] [LockScroll] [RAF_Animation]
- Initialization:
App.tsxsets up providers. - Routing:
Woutermatches/toHome.tsx. - Layout Mount:
FullPagemounts, initializesLenis, and assigns it towindow.lenis. - Hero Entry:
Herocomponent mounts,ScrollLockManagerlocks scroll for ~6s for intro. - User Interaction:
- Desktop: User scrolls naturally; Lenis interpolates for smoothness.
- Mobile Nav: User opens hamburger menu -> clicks link ->
Headerunlocks scroll manager -> forces overflow unset -> invokeslenis.scrollTo.
- Skills Section:
Skillscomponent runs auseAnimationFrameloop to translate the X-axis of the skill track at constant speed.
| ID | Area | Command / Action | Expected Output | Explanation |
|---|---|---|---|---|
| T-01 | Build | npm run build |
Build complete. (Exit 0) |
Verifies TypeSafety and bundling. |
| T-02 | Mobile Nav | Open Menu -> Click Projects | Menu closes, Page scrolls to Projects. | Ensures ScrollLockManager unlock logic works. |
| T-03 | Carousel | Hover over Skills | Carousel pauses instantly. | Verifies interaction handler. |
| T-04 | Carousel | Mouse Leave Skills | Carousel resumes at full speed IMMEDIATELY. | Verifies useAnimationFrame custom logic (no easing lag). |
| T-05 | Responsiveness | Resize width < 768px | Hamburger menu appears. | Verifies Tailwind breakpoints. |
- Mobile Menu Fix: Confirmed effective. The race condition between
overflow: hiddenremoval andscrollToexecution was resolved by explicitly unsetting overflow and unlocking the global manager before scrolling. - Carousel Speed: Confirmed effective. The switch from
useAnimationControls(Framer Motion internal) touseAnimationFrame(Manual loop) successfully eliminated the "slow ramp-up" issue.
- ESLint:
npm run lint(if configured) - TypeScript Check:
npx tsc --noEmit - Vite Preview:
npm run build && npm run startto test production build locally.
- Scroll stuck on mobile?
- Fix: Ensure
ScrollLockManageris unlocked. Reload page to reset singleton.
- Fix: Ensure
- Carousel disappearing?
- Fix: Check for duplicate
layoutIdprops inSkills.tsx. EnsuretotalWidthcalculation is > 0.
- Fix: Check for duplicate
- "window.lenis is undefined"
- Fix: Ensure
FullPagecomponent is mounted and has finished initialization effect.
- Fix: Ensure
- No sensitive API keys are currently stored in the client.
- Express server should implement rate limiting and Helmet middleware for production deployment.
- Dependencies are managed via
package-lock.jsonto ensure version consistency.
- Push to GitHub.
- Import in Vercel.
- Settings:
- Framework Preset:
Vite - Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
- Framework Preset:
- Environment Variables: None currently required for static features.
npm run dev: Start working.ctrl+c: Stop server.npx tsc: Check for type errors.Header.tsx: Go here to edit menu links.
- Images: Stored in
client/src/components/uior external assets. - Content: Edit text directly in React components (e.g.,
Hero.tsxfor bio). - Colors: Modify
index.cssCSS variables for global theme changes.
- Lazy Loading: Components can be lazy-loaded using
React.lazyif bundle size grows. - Asset Optimization: Ensure 3D models are GLB/GLTF compressed (Draco).
- Tree Shaking: Vite automatically tree-shakes unused exports.
- Current: 3D Intro, Infinite Scroll, Sticky Navigation.
- Planned: Blog section, Dark mode toggle (UI present, logic extensible), Backend CMS integration.
- Regular Updates: Keep
threeandframer-motionupdated for performance wins. - Refactoring:
FullPagelogic could be moved to a context provider for cleaner access to Lenis instance.
- Solved complex Framer Motion + Infinite Loop conflict (Layout ID collisions).
- Engineered a physics-independent animation loop for the carousel to bypass default spring physics.
- Fixed mobile scroll locking architecture without rewriting the core
LockManager.
Client-Side Rendered (CSR) Application -> Wrapped in Express Proxy -> Delivered via CDN (Vercel Edge). Data Flow: Unidirectional (Parent -> Child props).
3D-Robotic-Portfolio-Website/
โโโ client/
โ โโโ src/
โ โ โโโ components/ # UI Components (Hero, Header, Skills...)
โ โ โโโ hooks/ # Custom hooks (useMobile, useScroll)
โ โ โโโ lib/ # Utilities (queryClient, scrollLockManager)
โ โ โโโ pages/ # Route Views (home.tsx)
โ โ โโโ App.tsx # Main App Entry
โ โ โโโ main.tsx # DOM Mount Point
โ โโโ index.html # HTML Template
โโโ server/
โ โโโ index.ts # Express Server Entry
โ โโโ routes.ts # API Routes
โโโ package.json # Dependencies & Scripts
โโโ tailwind.config.ts # Styling Config
โโโ vite.config.ts # Build Config
- Open Terminal.
- Run:
npm install(if fresh). - Run:
npm run dev. - Open browser to:
http://localhost:3001. - Demo Flow:
- Wait for typed text intro.
- Scroll down to Skills. Hover to pause. Mouse out to resume instantly.
- Resize browser to mobile width.
- Open hamburger menu -> Click "Projects" -> Watch it scroll smoothly.
This report confirms that the 3D Robotic Portfolio Website is feature-complete regarding the requested enhancements. The codebase is clean, typed, and modular. The critical issues regarding mobile navigation and animation timing have been resolved with robust, verified solutions. The project is ready for deployment and handover.