Welcome to my interactive portfolio showcasing my skills and projects
Hi, I'm [Your Name], a passionate developer specializing in [your skills].
With [X] years of experience building web applications, I love creating...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Portfolio</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
{
"name": "portfolio",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@react-three/drei": "^9.67.5",
"@react-three/fiber": "^8.13.0",
"framer-motion": "^10.12.16",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.14.2",
"react-tilt": "^0.1.4",
"three": "^0.152.0"
},
"devDependencies": {
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.14",
"eslint": "^8.45.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"postcss": "^8.4.27",
"tailwindcss": "^3.3.3",
"vite": "^4.4.5"
}
}
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
colors: {
primary: "#050816",
secondary: "#aaa6c3",
tertiary: "#151030",
"black-100": "#100d25",
"black-200": "#090325",
"white-100": "#f3f3f3",
},
boxShadow: {
card: "0px 35px 120px -15px #211e35",
},
screens: {
xs: "450px",
},
backgroundImage: {
"hero-pattern": "url('/src/assets/herobg.png')",
},
},
},
plugins: [],
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer utilities {
.padding {
@apply sm:px-16 px-8 sm:py-24 py-12;
}
.padding-x {
@apply sm:px-16 px-8;
}
.padding-y {
@apply sm:py-24 py-12;
}
.padding-l {
@apply sm:pl-16 pl-8;
}
.padding-r {
@apply sm:pr-16 pr-8;
}
.padding-t {
@apply sm:pt-24 pt-12;
}
.padding-b {
@apply sm:pb-24 pb-12;
}
}
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
import { BrowserRouter, Route, Routes } from 'react-router-dom'
import {
About,
Contact,
Experience,
Feedbacks,
Hero,
Navbar,
Tech,
Works,
StarsCanvas
} from './components'
const App = () => {
return (
<BrowserRouter>
<div className="relative z-0 bg-primary">
<div className="bg-hero-pattern bg-cover bg-no-repeat bg-center">
<Navbar />
<Hero />
</div>
<About />
<Experience />
<Tech />
<Works />
<Feedbacks />
<div className="relative z-0">
<Contact />
<StarsCanvas />
</div>
</div>
</BrowserRouter>
)
}
export default App
export const styles = {
boxWidth: "xl:max-w-[1280px] w-full",
heading2: "font-poppins font-semibold xs:text-[48px] text-[40px] text-white xs:leading-[76.8px] leading-[66.8px] w-full",
paragraph: "font-poppins font-normal text-dimWhite text-[18px] leading-[30.8px]",
flexCenter: "flex justify-center items-center",
flexStart: "flex justify-center items-start",
paddingX: "sm:px-16 px-6",
paddingY: "sm:py-16 py-6",
padding: "sm:px-16 px-6 sm:py-12 py-4",
marginX: "sm:mx-16 mx-6",
marginY: "sm:my-16 my-6",
}
import { useState } from 'react'
import { logo, menu, close } from '../assets'
import { navLinks } from '../constants'
const Navbar = () => {
const [active, setActive] = useState('')
const [toggle, setToggle] = useState(false)
return (
<nav className="w-full flex items-center py-5 fixed top-0 z-20 bg-primary">
<div className="w-full flex justify-between items-center max-w-7xl mx-auto">
<a
href="/"
className="flex items-center gap-2"
onClick={() => {
setActive('')
window.scrollTo(0, 0)
}}
>
<img src={logo} alt="logo" className="w-9 h-9 object-contain" />
<p className="text-white text-[18px] font-bold cursor-pointer">
Portfolio <span className="sm:block hidden">| Web Developer</span>
</p>
</a>
<ul className="list-none hidden sm:flex flex-row gap-10">
{navLinks.map((link) => (
<li
key={link.id}
className={`${
active === link.title ? 'text-white' : 'text-secondary'
} hover:text-white text-[18px] font-medium cursor-pointer`}
onClick={() => setActive(link.title)}
>
<a href={`#${link.id}`}>{link.title}</a>
</li>
))}
</ul>
<div className="sm:hidden flex flex-1 justify-end items-center">
<img
src={toggle ? close : menu}
alt="menu"
className="w-[28px] h-[28px] object-contain cursor-pointer"
onClick={() => setToggle(!toggle)}
/>
<div
className={`${
!toggle ? 'hidden' : 'flex'
} p-6 black-gradient absolute top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl`}
>
<ul className="list-none flex justify-end items-start flex-col gap-4">
{navLinks.map((link) => (
<li
key={link.id}
className={`${
active === link.title ? 'text-white' : 'text-secondary'
} font-poppins font-medium cursor-pointer text-[16px]`}
onClick={() => {
setToggle(!toggle)
setActive(link.title)
}}
>
<a href={`#${link.id}`}>{link.title}</a>
</li>
))}
</ul>
</div>
</div>
</div>
</nav>
)
}
export default Navbar
import { motion } from 'framer-motion'
import { styles } from '../styles'
import { ComputersCanvas } from './canvas'
const Hero = () => {
return (
<section className="relative w-full h-screen mx-auto">
<div className={`${styles.paddingX} absolute inset-0 top-[120px] max-w-7xl mx-auto flex flex-row items-start gap-5`}>
<div className="flex flex-col justify-center items-center mt-5">
<div className="w-5 h-5 rounded-full bg-[#915EFF]" />
<div className="w-1 sm:h-80 h-40 violet-gradient" />
</div>
<div>
<h1 className={`${styles.heroHeadText} text-white`}>
Hi, I'm <span className="text-[#915EFF]">John</span>
</h1>
<p className={`${styles.heroSubText} mt-2 text-white-100`}>
I develop web applications, user <br className="sm:block hidden" />
interfaces and 3D visuals
</p>
</div>
</div>
<ComputersCanvas />
<div className="absolute xs:bottom-10 bottom-32 w-full flex justify-center items-center">
<a href="#about">
<div className="w-[35px] h-[64px] rounded-3xl border-4 border-secondary flex justify-center items-start p-2">
<motion.div
animate={{
y: [0, 24, 0],
}}
transition={{
duration: 1.5,
repeat: Infinity,
repeatType: 'loop',
}}
className="w-3 h-3 rounded-full bg-secondary mb-1"
/>
</div>
</a>
</div>
</section>
)
}
export default Hero
import { motion } from 'framer-motion'
import { styles } from '../styles'
import { SectionWrapper } from '../hoc'
import { fadeIn, textVariant } from '../utils/motion'
import { testimonials } from '../constants'
const FeedbackCard = ({ index, testimonial, name, designation, company, image }) => (
<motion.div
variants={fadeIn('', 'spring', index * 0.5, 0.75)}
className="bg-black-200 p-10 rounded-3xl xs:w-[320px] w-full"
>
<p className="text-white font-black text-[48px]">"</p>
<div className="mt-1">
<p className="text-white tracking-wider text-[18px]">{testimonial}</p>
<div className="mt-7 flex justify-between items-center gap-1">
<div className="flex-1 flex flex-col">
<p className="text-white font-medium text-[16px]">
<span className="blue-text-gradient">@</span> {name}
</p>
<p className="mt-1 text-secondary text-[12px]">
{designation} of {company}
</p>
</div>
<img
src={image}
alt={`feedback-by-${name}`}
className="w-10 h-10 rounded-full object-cover"
/>
</div>
</div>
</motion.div>
)
const Feedbacks = () => {
return (
<div className="mt-12 bg-black-100 rounded-[20px]">
<div className={`${styles.padding} bg-tertiary rounded-2xl min-h-[300px]`}>
<motion.div variants={textVariant()}>
<p className={styles.sectionSubText}>What others say</p>
<h2 className={styles.sectionHeadText}>Testimonials.</h2>
</motion.div>
</div>
<div className={`${styles.paddingX} -mt-20 pb-14 flex flex-wrap gap-7`}>
{testimonials.map((testimonial, index) => (
<FeedbackCard key={testimonial.name} index={index} {...testimonial} />
))}
</div>
</div>
)
}
export default SectionWrapper(Feedbacks, '')
import { motion } from 'framer-motion'
import { styles } from '../styles'
import { SectionWrapper } from '../hoc'
import { fadeIn, textVariant } from '../utils/motion'
import { experiences } from '../constants'
const ExperienceCard = ({ experience }) => {
return (
<div className="mt-12 flex flex-col gap-6">
{experiences.map((experience, index) => (
<motion.div
variants={fadeIn('right', 'spring', index * 0.5, 0.75)}
className="w-full"
key={experience.title}
>
<div className="green-pink-gradient p-[1px] rounded-[20px]">
<div className="bg-tertiary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col">
<img
src={experience.icon}
alt={experience.company_name}
className="w-16 h-16 object-contain"
/>
<h3 className="text-white text-[20px] font-bold text-center">
{experience.title}
</h3>
<p className="text-secondary text-[16px] font-semibold">
{experience.company_name}
</p>
<div className="mt-5 flex flex-col gap-1">
<p className="text-white-100 text-[14px] pl-1 tracking-wider">
{experience.date}
</p>
<ul className="mt-5 list-disc ml-5 space-y-2">
{experience.points.map((point, index) => (
<li
key={`experience-point-${index}`}
className="text-white-100 text-[14px] pl-1 tracking-wider"
>
{point}
</li>
))}
</ul>
</div>
</div>
</div>
</motion.div>
))}
</div>
)
}
const Experience = () => {
return (
<>
<motion.div variants={textVariant()}>
<p className={styles.sectionSubText}>What I have done so far</p>
<h2 className={styles.sectionHeadText}>Work Experience.</h2>
</motion.div>
<div className="mt-20 flex flex-col">
<ExperienceCard />
</div>
</>
)
}
export default SectionWrapper(Experience, 'work')
import { motion } from 'framer-motion'
import { styles } from '../styles'
import { technologies } from '../constants'
import { SectionWrapper } from '../hoc'
import { fadeIn, textVariant } from '../utils/motion'
const Tech = () => {
return (
<>
<motion.div variants={textVariant()}>
<p className={styles.sectionSubText}>Technologies I work with</p>
<h2 className={styles.sectionHeadText}>My Tech Stack.</h2>
</motion.div>
<div className="mt-20 flex flex-wrap justify-center gap-10">
{technologies.map((technology) => (
<motion.div
variants={fadeIn('up', 'spring', 0.5, 0.75)}
className="w-28 h-28 flex items-center justify-center"
key={technology.name}
>
<div className="w-full h-full green-pink-gradient rounded-full p-[2px]">
<div className="bg-tertiary rounded-full flex justify-center items-center flex-col p-3 h-[calc(100%-4px)] w-[calc(100%-4px)]">
<img src={technology.icon} alt={technology.name} className="w-16 h-16 object-contain" />
<p className="text-white text-[14px] mt-2">{technology.name}</p>
</div>
</div>
</motion.div>
))}
</div>
</>
)
}
export default SectionWrapper(Tech, '')
import { motion } from 'framer-motion'
import { Tilt } from 'react-tilt'
import { styles } from '../styles'
import { github } from '../assets'
import { SectionWrapper } from '../hoc'
import { projects } from '../constants'
import { fadeIn, textVariant } from '../utils/motion'
const ProjectCard = ({ index, name, description, tags, image, source_code_link }) => {
return (
<motion.div variants={fadeIn('up', 'spring', index * 0.5, 0.75)}>
<Tilt
options={{
max: 45,
scale: 1,
speed: 450,
}}
className="bg-tertiary p-5 rounded-2xl sm:w-[360px] w-full"
>
<div className="relative w-full h-[230px]">
<img
src={image}
alt={name}
className="w-full h-full object-cover rounded-2xl"
/>
<div className="absolute inset-0 flex justify-end m-3 card-img_hover">
<div
onClick={() => window.open(source_code_link, '_blank')}
className="black-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer"
>
<img
src={github}
alt="github"
className="w-1/2 h-1/2 object-contain"
/>
</div>
</div>
</div>
<div className="mt-5">
<h3 className="text-white font-bold text-[24px]">{name}</h3>
<p className="mt-2 text-secondary text-[14px]">{description}</p>
</div>
<div className="mt-4 flex flex-wrap gap-2">
{tags.map((tag) => (
<p key={tag.name} className={`text-[14px] ${tag.color}`}>
#{tag.name}
</p>
))}
</div>
</Tilt>
</motion.div>
)
}
const Works = () => {
return (
<>
<motion.div variants={textVariant()}>
<p className={styles.sectionSubText}>My work</p>
<h2 className={styles.sectionHeadText}>Projects.</h2>
</motion.div>
<div className="w-full flex">
<motion.p
variants={fadeIn('', '', 0.1, 1)}
className="mt-3 text-secondary text-[17px] max-w-3xl leading-[30px]"
>
Following projects showcase my skills and experience through real-world examples of my work. Each project is briefly described with links to code repositories and live demos in it. It reflects my ability to solve complex problems, work with different technologies, and manage projects effectively.
</motion.p>
</div>
<div className="mt-20 flex flex-wrap gap-7">
{projects.map((project, index) => (
<ProjectCard key={`project-${index}`} index={index} {...project} />
))}
</div>
</>
)
}
export default SectionWrapper(Works, '')
import { motion } from 'framer-motion'
import { styles } from '../styles'
import { SectionWrapper } from '../hoc'
import { fadeIn, textVariant } from '../utils/motion'
import { testimonials } from '../constants'
const FeedbackCard = ({ index, testimonial, name, designation, company, image }) => (
<motion.div
variants={fadeIn('', 'spring', index * 0.5, 0.75)}
className="bg-black-200 p-10 rounded-3xl xs:w-[320px] w-full"
>
<p className="text-white font-black text-[48px]">"</p>
<div className="mt-1">
<p className="text-white tracking-wider text-[18px]">{testimonial}</p>
<div className="mt-7 flex justify-between items-center gap-1">
<div className="flex-1 flex flex-col">
<p className="text-white font-medium text-[16px]">
<span className="blue-text-gradient">@</span> {name}
</p>
<p className="mt-1 text-secondary text-[12px]">
{designation} of {company}
</p>
</div>
<img
src={image}
alt={`feedback-by-${name}`}
className="w-10 h-10 rounded-full object-cover"
/>
</div>
</div>
</motion.div>
)
const Feedbacks = () => {
return (
<div className="mt-12 bg-black-100 rounded-[20px]">
<div className={`${styles.padding} bg-tertiary rounded-2xl min-h-[300px]`}>
<motion.div variants={textVariant()}>
<p className={styles.sectionSubText}>What others say</p>
<h2 className={styles.sectionHeadText}>Testimonials.</h2>
</motion.div>
</div>
<div className={`${styles.paddingX} -mt-20 pb-14 flex flex-wrap gap-7`}>
{testimonials.map((testimonial, index) => (
<FeedbackCard key={testimonial.name} index={index} {...testimonial} />
))}
</div>
</div>
)
}
export default SectionWrapper(Feedbacks, '')
Email: you@example.com
Phone: (123) 456-7890
import { motion } from 'framer-motion'
import { styles } from '../styles'
import { EarthCanvas } from './canvas'
import { SectionWrapper } from '../hoc'
import { slideIn } from '../utils/motion'
const Contact = () => {
return (
<div className="xl:mt-12 xl:flex-row flex-col-reverse flex gap-10 overflow-hidden">
<motion.div
variants={slideIn('left', 'tween', 0.2, 1)}
className="flex-[0.75] bg-black-100 p-8 rounded-2xl"
>
<p className={styles.sectionSubText}>Get in touch</p>
<h3 className={styles.sectionHeadText}>Contact.</h3>
<form className="mt-12 flex flex-col gap-8">
<label className="flex flex-col">
<span className="text-white font-medium mb-4">Your Name</span>
<input
type="text"
name="name"
placeholder="What's your name?"
className="bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"
/>
</label>
<label className="flex flex-col">
<span className="text-white font-medium mb-4">Your Email</span>
<input
type="email"
name="email"
placeholder="What's your email?"
className="bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"
/>
</label>
<label className="flex flex-col">
<span className="text-white font-medium mb-4">Your Message</span>
<textarea
rows="7"
name="message"
placeholder="What do you want to say?"
className="bg-tertiary py-4 px-6 placeholder:text-secondary text-white rounded-lg outline-none border-none font-medium"
/>
</label>
<button
type="submit"
className="bg-tertiary py-3 px-8 outline-none w-fit text-white font-bold shadow-md shadow-primary rounded-xl"
>
Send
</button>
</form>
</motion.div>
<motion.div
variants={slideIn('right', 'tween', 0.2, 1)}
className="xl:flex-1 xl:h-auto md:h-[550px] h-[350px]"
>
<EarthCanvas />
</motion.div>
</div>
)
}
export default SectionWrapper(Contact, 'contact')
import { Suspense } from 'react'
import { Canvas } from '@react-three/fiber'
import { OrbitControls, Preload, useGLTF } from '@react-three/drei'
const Computers = () => {
const computer = useGLTF('./desktop_pc/scene.gltf')
return (
<mesh>
<hemisphereLight intensity={0.15} groundColor="black" />
<spotLight
position={[-20, 50, 10]}
angle={0.12}
penumbra={1}
intensity={1}
castShadow
shadow-mapSize={1024}
/>
<pointLight intensity={1} />
<primitive
object={computer.scene}
scale={0.75}
position={[0, -3.25, -1.5]}
rotation={[-0.01, -0.2, -0.1]}
/>
</mesh>
)
}
const ComputersCanvas = () => {
return (
<Canvas
frameloop="demand"
shadows
dpr={[1, 2]}
camera={{ position: [20, 3, 5], fov: 25 }}
gl={{ preserveDrawingBuffer: true }}
>
<Suspense fallback={null}>
<OrbitControls
enableZoom={false}
maxPolarAngle={Math.PI / 2}
minPolarAngle={Math.PI / 2}
/>
<Computers />
</Suspense>
<Preload all />
</Canvas>
)
}
export default ComputersCanvas
import { footerLinks, socialMedia } from '../constants'
import { styles } from '../styles'
import { logo } from '../assets'
const Footer = () => {
return (
<footer className="bg-tertiary py-12">
<div className={`${styles.boxWidth} mx-auto`}>
<div className="flex md:flex-row flex-col mb-8 w-full">
<div className="flex-1 flex flex-col justify-start mr-10">
<img
src={logo}
alt="logo"
className="w-[266px] h-[72px] object-contain"
/>
<p className={`${styles.paragraph} mt-4 max-w-[310px]`}>
A modern portfolio website for developers.
</p>
</div>
<div className="flex-[1.5] w-full flex flex-row justify-between flex-wrap md:mt-0 mt-10">
{footerLinks.map((footerLink) => (
<div
key={footerLink.title}
className="flex flex-col ss:my-0 my-4 min-w-[150px]"
>
<h4 className="font-medium text-[18px] leading-[27px] text-white">
{footerLink.title}
</h4>
<ul className="list-none mt-4">
{footerLink.links.map((link, index) => (
<li
key={link.name}
className={`font-normal text-[16px] leading-[24px] text-dimWhite hover:text-secondary cursor-pointer ${
index !== footerLink.links.length - 1 ? 'mb-4' : 'mb-0'
}`}
>
{link.name}
</li>
))}
</ul>
</div>
))}
</div>
</div>
<div className="w-full flex justify-between items-center md:flex-row flex-col pt-6 border-t-[1px] border-t-[#3F3E45]">
<p className="font-normal text-center text-[18px] leading-[27px] text-white">
2023 Portfolio. All Rights Reserved.
</p>
<div className="flex flex-row md:mt-0 mt-6">
{socialMedia.map((social, index) => (
<img
key={social.id}
src={social.icon}
alt={social.id}
className={`w-[21px] h-[21px] object-contain cursor-pointer ${
index !== socialMedia.length - 1 ? 'mr-6' : 'mr-0'
}`}
onClick={() => window.open(social.link)}
/>
))}
</div>
</div>
</div>
</footer>
)
}
export default Footer
npm install to install dependenciesnpm run dev to start the development serverThis setup includes all the requested components with responsive design using TailwindCSS, React functional components with hooks, Vite as the build tool, and react-router-dom for routing. The project is ready to run with just npm install and npm run dev.