This is a modern and responsive portfolio website built with React, Vite, and Tailwind CSS. It integrates rich interactive animations and an AI Assistant feature, aiming to showcase personal skills, project experience, and a personal bio in a unique and innovative way.
You can visit my portfolio online at the following link:
https://my-portfolio-project-463508.de.r.appspot.com/
- Rich Interactive Animations:
- Page elements use
Framer Motionfor elegant entry and staggered animations. - Skill cards feature a cool 3D flip effect on hover.
- Smooth in-page scroll navigation.
- Page elements use
- AI Career Assistant:
- Integrates the Gemini API to provide a floating AI chat window.
- Users can input their project descriptions or personal bios, and the AI will provide professional optimization suggestions from the perspective of a senior technical interviewer.
- Modern Design:
- Built with Tailwind CSS for a fully responsive design, providing a perfect visual experience on both PC and mobile devices.
- The Hero section features a dynamic gradient background implemented with pure CSS, which is both beautiful and high-performance.
- Componentization & Performance Optimization:
- Uses React Hooks for clear and logical state management.
- Implements
React.lazyandSuspensefor lazy loading of non-core components to optimize initial page load speed.
This project aims to comprehensively showcase front-end development capabilities, from UI/UX design and animation interaction to back-end integration and cloud deployment.
- Build Tool: Vite was chosen for its extremely fast development server based on native ES Modules and its optimized build output.
- Core Framework: Built with React 18, fully utilizing functional components and Hooks (like
useState,useEffect,useMemo) to create declarative and reusable UI components. - Component-Based Design: The entire application is broken down into highly cohesive, loosely coupled components (e.g.,
Navbar,Hero,Skills,FloatingAIAssistant), making the code structure clear and easy to maintain and extend. - Styling Solution: Adopts Tailwind CSS, a utility-first CSS framework. It allows us to build complex responsive interfaces directly in JSX without writing separate CSS files, significantly improving development efficiency.
- Animation Library: The core animation capabilities are provided by
Framer Motion.- Entry Animations: Using preset
variantsandstaggerChildren, it achieves an elegant, layered loading effect for page content. - 3D Interaction: In the "Skills" section, by setting the
perspectiveproperty on the parent container and addingwhileHover={{ rotateY: 180 }}to the cards, a 3D flip animation on hover is easily implemented, enhancing user interaction.
- Entry Animations: Using preset
- Dynamic Background: The initial attempt to use WebGL (Three.js) for a 3D Earth background encountered intractable rendering conflicts in certain environments. To ensure project stability and final delivery, a switch was decisively made to a dynamic gradient animation background implemented with pure CSS. This not only solved the technical problem but also demonstrated the engineering mindset of choosing mature, stable technical solutions when facing complex issues.
The AI Assistant is a highlight of this project, implemented following the best security practice of "Frontend Request -> Backend Proxy -> AI Service" to ensure the API key is not exposed on the client side.
- Frontend:
- The user inputs text into a floating chat window.
- Upon clicking the button, a POST request is sent via
fetchto our self-hosted backend proxy service, with the user'spromptin the request body.
- Backend (Secure Proxy):
- A lightweight backend service is built with Node.js + Express.
- The backend service securely reads the
GEMINI_API_KEYfrom the server's environment variables using thedotenvmodule. - Upon receiving a request from the frontend, the backend constructs a complete request body by combining the user's
promptwith a predefined instruction (e.g., "You are a senior interviewer..."). - It then uses
axiosto send this complete request to the actual Gemini API. - After receiving the response from the Gemini API, it forwards it back to the frontend.
- Security: This proxy pattern is the industry standard for protecting sensitive credentials. The user's browser only communicates with our backend service, never coming into contact with the private API key.
Google App Engine was chosen to deploy this full-stack application due to its highly automated deployment and management experience.
- Dual-Service Architecture:
defaultService (Frontend): Configured via the rootapp.yaml, it is deployed as a static web service. Thehandlersconfiguration directs all static assets (JS, CSS, etc.) to thedistdirectory generated by Vite and routes all other requests toindex.htmlto allow React Router to handle client-side routing.apiService (Backend): Configured viaserver/app.yaml, it is deployed as an independent Node.js service. The"start": "node index.js"script inpackage.jsontells App Engine how to start this service.
- Environment Variables: The backend's
GEMINI_API_KEYis securely injected into the production environment via theenv_variablessection inserver/app.yaml. - Communication: In production, the frontend application calls the backend
apiservice using the auto-generated service URL provided by App Engine (https://api-dot-[Project-ID]...).
To run this project locally, please follow these steps.
-
Clone the repository:
git clone [https://github.com/](https://github.com/)[Your-GitHub-Username]/my-portfolio.git cd my-portfolio -
Install frontend dependencies (using pnpm):
pnpm install
-
Install backend dependencies:
cd server pnpm install cd ..
-
Configure environment variables:
- Create a
.envfile in theserverdirectory (server/.env). - Add your Gemini API key to the file:
GEMINI_API_KEY="YOUR_API_KEY_HERE"
- Create a
-
Run both frontend and backend concurrently:
- Open your first terminal and start the frontend development server:
pnpm dev
- Open a second terminal and start the backend proxy service:
cd server node index.js
- Open your first terminal and start the frontend development server:
-
Open
http://localhost:5173(or the address shown in the terminal) in your browser.
This project is licensed under the MIT License.
