Key Concepts
ReactJS, CSS, Personal Developer Portfolio, Hero Section, Project Section, Contact Section, Brilliant (interactive learning platform), Vite, Components, Navbar, Framer Motion, Animations, Responsiveness, Media Queries, React Syntax Highlighter, EmailJS, Vercel, Deployment, Environment Variables.
Building a Modern Personal Developer Portfolio with ReactJS and CSS
Introduction
The video demonstrates how to build a modern personal developer portfolio website using ReactJS and CSS, incorporating animations and a smooth design. The portfolio includes a hero section, a project section, and a contact section. The video also promotes Brilliant, an interactive learning platform.
Setting Up the ReactJS App with Vite
- Creating the App: The process begins by using the command
npx create viteto create a new ReactJS application using Vite. - Project Configuration: The framework is set to React, and JavaScript is chosen as the language.
- Installing Dependencies: The command
npm installis used to install the necessary dependencies. - Running the Development Environment:
npm run devstarts the development server, allowing the application to be viewed in the browser atlocalhost:5173. - Assets: The video provides assets (project images) to be placed in the
publicfolder.
Structuring the Application Components
- Creating Components Folder: A
componentsfolder is created to house the different sections of the portfolio. - Defining Sections: Four main sections are defined:
- Hero Section: The initial section users see upon visiting the website.
- Projects Section: Showcases the developer's projects.
- Contact Section: Allows visitors to send emails.
- Navbar: A navigation bar at the top of the app.
- Component Files: Separate
.jsxfiles are created for each section (e.g.,Hero.jsx,Projects.jsx,Contact.jsx,Navbar.jsx). - Exporting Components: Each component is exported using
export const [ComponentName].
Assembling the App in App.jsx
- Importing Components: The components are imported into
App.jsxusingimport [ComponentName] from './components/[ComponentName]'. - Rendering Components: The components are rendered in the desired order:
Navbar,Hero,Projects,Contact. - Footer: A footer is added with a copyright notice using the
©HTML entity.
Styling with CSS
- Global Styles (index.css): The video provides a CSS file (
index.css) with general styling for the entire website, including fonts, color schemes, and a custom scroll bar. - Resetting Base Styles (app.css): The
app.cssfile begins by resetting the base styles for all elements using the universal selector (*). - Defining Root Colors (app.css): Custom CSS variables are defined for primary, secondary, text, navbar background, and card colors.
- Body Styling (app.css): Generic body styles are applied, including
line-height,color, andbackground. - App Container (app.css): The entire app is wrapped in a
divwith the class nameapp, and styles are applied to this container, including opacity, transform, transition, width, and min-height.
Implementing Animations with Framer Motion
- Installing Framer Motion: The
framer-motionlibrary is installed usingnpm install framer-motion. - Importing Motion: The
motionobject is imported fromframer-motionusingimport motion from 'framer-motion'. - Animating UI Elements: UI elements are wrapped with
motion.[element](e.g.,motion.nav,motion.div) to enable animations. - Navbar Animation: The navbar is animated to slide down from above its original position using
initial,animate, andtransitionproperties.initial: Sets the starting position (e.g.,y: -100).animate: Defines the final position (e.g.,y: 0).transition: Configures the animation's duration and easing (e.g.,duration: 0.6, ease: 'easeOut').
- Logo Hover Effect: A hover effect is added to the logo using the
whileHoverprop to scale the text. - Link Animations: Animations are added to the navigation links to fade in and move up from their initial positions.
- Staggered Animations: The
staggerChildrenproperty is used to create a staggered animation effect for the navigation links. - Creating Variants: Animation configurations are stored in JavaScript objects (variants) for reusability.
Handling App Loading and API Integration
- Using
useStateanduseEffect: TheuseStatehook is used to manage the loading state of the app (isLoaded). TheuseEffecthook is used to setisLoadedtotrueafter the component renders. - Conditional Class Names: Conditional class names are used to apply styles based on the loading state.
- Preparing for API Integration: The loading state is used to ensure that the page only renders when the API for sending emails is ready.
Building the Hero Section
- Section Structure: The hero section is wrapped in a
motion.sectionwith an ID ofhome. - Hero Container: A
divwith the class namehero-containeris used to structure the content. - Hero Content: A
divwith the class namehero-contentcontains the main text and information. - Hero Badge: A badge is created with the text "Hello, I am" and styled with a background, border radius, and backdrop filter.
- Glitchy Title: An
h1tag is used to display the developer's name with a "glitch" effect using CSS. - Subtitle and Description: An
h2tag is used for the subtitle, and aptag is used for the description. - Call to Action Buttons: Two
atags are used as call to action buttons, styled with primary and secondary styles. - Social Links: A
divwith the class namesocial-linkscontains links to social media profiles using Font Awesome icons. - Code Section: A
divwith the class namehero-image-containeris used to display a code snippet using thereact-syntax-highlighterlibrary. - Floating Card: A
divwith the class namefloating-cardis used to display a "currently working on" message with a bouncing animation.
Implementing Responsiveness with Media Queries
- Media Queries: Media queries are used to adjust the layout and styling for different screen sizes.
- Medium-Sized Screens: For medium-sized screens (max-width: 1024px), the hero container is changed to a column layout, the text is centered, and the call to action buttons and social links are justified to the center.
- Small Screens: For small screens (max-width: 768px), the code section and floating card are hidden to improve the layout.
Building the Projects Section
- Section Structure: The projects section is wrapped in a
motion.sectionwith an ID ofprojects. - Project Grid: A
divwith the class nameproject-gridis used to display the projects in a grid layout. - Project Card: Each project is displayed in a
divwith the class nameproject-card. - Project Image: The project image is displayed using a
divwith the class nameproject-imageand a background image. - Project Title, Description, and Tags: The project title, description, and tags are displayed using
h3,p, andspantags. - Hover Effect: A hover effect is added to each project card to move it up slightly and change the box shadow and border color.
- Glass Effect: A glass effect is added to the project image using CSS
beforeandafterpseudo-elements.
Building the Contact Section
- Section Structure: The contact section is wrapped in a
motion.sectionwith an ID ofcontact. - Contact Form: A
formwith the class namecontact-formis used to collect user input. - Input Fields: Input fields are created for name, email, and message using
motion.inputandmotion.textarea. - Submit Button: A
buttonwith the class namesubmit-buttonis used to submit the form. - Styling: The contact form is styled with CSS to create a clean and modern look.
- Glass Effect: A glass effect is added to the submit button using CSS
beforepseudo-elements.
Implementing Form Functionality with EmailJS
- Setting Up EmailJS: An account is created on EmailJS, and an email service is connected.
- Creating an Email Template: An email template is created on EmailJS with placeholders for name, email, and message.
- Installing EmailJS Browser SDK: The EmailJS browser SDK is installed using
npm install @emailjs/browser. - Initializing EmailJS: The EmailJS SDK is initialized in
App.jsxusing the public API key. - Handling Input Changes: The
handleInputChangefunction is used to update the form data state as the user types. - Submitting the Form: The
handleSubmitfunction is used to send the email using the EmailJS SDK. - Form Status: The
formStatusstate is used to track the status of the form submission (submitting, success, error). - Displaying Messages: Success and error messages are displayed based on the form status.
Deploying the Portfolio with Vercel
- Creating a GitHub Repository: A new GitHub repository is created for the project.
- Pushing the Code to GitHub: The code is pushed to the GitHub repository.
- Importing the Repository to Vercel: The GitHub repository is imported into Vercel.
- Configuring Environment Variables: The EmailJS environment variables are configured in Vercel.
- Deploying the Project: The project is deployed to Vercel.
Conclusion
The video provides a detailed guide on building a modern personal developer portfolio website using ReactJS, CSS, Framer Motion, and EmailJS. The portfolio includes a hero section, a project section, and a contact section, and it is deployed to Vercel. The video emphasizes the importance of animations, responsiveness, and a clean design.
AI summaries can miss context or contain errors. Check important details against the original video.





