🔴 Let's build a Modern Portfolio with NEXT.JS (Framer Motion, Tailwind CSS, Sanity.io, React) | 2023
Вставка
- Опубліковано 5 тра 2024
- 🚨 Join the world’s BEST developer community & course Zero to Full Stack Hero: www.papareact.com/course
🫂 Join my Community, "University of Code" for FREE: www.universityofcode.com
🔴 LOOKING FOR THE CODE? 🛠️
links.papareact.com/github
📩 Want coding problems (with solutions!) delivered to your inbox daily? www.papareact.com/dailycoding...
Join me as I teach you how to build a RESPONSIVE Modern Portfolio with NEXT.JS. You'll learn how to do the following in this build:
👉 Optimise Next.js to its FULL potential to build a website which loads in milliseconds!
👉 Use Sanity.io and its incredible CMS capabilities to power the backend, allowing you to easily update the contents of your portfolio from anywhere in the world!
👉 Add Silky smooth animations with Framer Motion for a unique & breathtaking UI/UX experience!
👉 Use Tailwind CSS to build a beautiful & responsive Modern website!
👉 Deploy your masterpiece to Vercel to showcase your skills to the world!
+ SO MUCH MORE!
🎙️ PODCAST
links.papareact.com/podcast
🌍 SOCIALS:
Instagram: links.papareact.com/instagram
Facebook: links.papareact.com/facebook
LinkedIn: links.papareact.com/linkedin
Twitter: links.papareact.com/twitter
Discord: links.papareact.com/discord
Newsletter: links.papareact.com/newsletter
❤️ SUPPORT
PAPA Merch: links.papareact.com/merch
Donate: links.papareact.com/donate
🕐 TIMESTAMPS:
00:00 Introduction
00:50 Build Showcase
05:01 Build Explanation (1/2)
06:09 Sanity Sponsorship
06:50 Build Explanation (2/2)
10:02 Setting up Next.js & TypeScript
15:12 Setting up Tailwind CSS
22:28 Initialising the Build
23:55 Building the Header Section (1/2)
27:42 Implementing React Social Icons Library
31:37 Building the Header Section (2/2)
36:10 Implementing Framer Motion
43:50 Building the Hero Section (1/2)
44:46 Implementing React Simple Typewriter Library
50:12 Adding Background Circles with Framer Motion
1:01:41 Building the Hero Section (2/2)
1:12:24 Building the About Section
1:25:10 Building the Work Experience Section
1:29:15 Building the Experience Cards in the Work Experience Section
1:41:26 Building the Skills Section
1:46:31 Building the Skill Component in the Skills Section
1:54:49 Building the Projects Section
2:07:12 Building the Contact Me Section (1/3)
2:10:14 Implementing Heroicons v2
2:14:42 Building the Contact Me Section (2/3)
2:20:24 Implementing React Hook Forms Library
2:23:41 Building the Contact Me Section (3/3)
2:28:59 Implementing Tailwind Scroll Bar Library
2:33:37 Adding the Home Button
2:35:16 Implementing Sanity
2:39:25 Changing & Adding in Sanity Schemas
2:51:49 Using GROQ to Query Data
2:54:27 Connecting Sanity to the Build
3:03:06 Creating Type Definitions
3:10:30 Creating Utility Functions to Fetch Data
3:14:11 Implementing Incremental Static Regeneration
3:19:33 Adding Sanity Data in the Header Section
3:22:46 Adding Sanity Data in the Hero Section
3:25:21 Adding Sanity Data in the About Section
3:27:36 Adding Sanity Data in the Work Experience Section
3:35:00 Adding Sanity Data in the Skills Section
3:37:05 Animating Icons in the Skills Section
3:39:25 Adding Sanity Data in the Projects Section
3:43:34 Final Build Explanation & Demo
3:45:45 Deploying to Vercel
3:52:32 Final Deployed Build Demo
3:53:30 Outro
#nextjs #portfolio #tutorial #javascript #sanityio #cms #beginner #tailwindcss #framermotion
📬Do you want DAILY coding problems sent DIRECTLY to your Inbox? (with solutions the next day) 👉 links.papareact.com/university
@@vnm_8945 use axios instead of the fetch method.then it will work. Worked for me.
I concur. . . Bro is the DMX of the software engineering realm
If anyone has completed this project, could you kindly share your code? I am encountering numerous issues with the responsiveness of the project.
This dude kept the exact same energy level for almost 4 hours. Last time I saw someone do that, it was DMX in concert.
Hahahahaha love this comment
Wow! Just started learning React and Next JS, this livestream/tutorial was quite helpful! Thank you Sonny! I'll look forward to more streams like this! :)
I think this channel is just underrated yet, am a web dev youtube channels nomad and I can say this is going to the moon!!!
In case you have a prerendering error at "./". The problem is from getStaticProps. This function is trying to request from an api endpoint that hasn't been built yet. The api routes in this application are in the next js application which is getting built. To solve this issue take the logic from the getPageInfo, getExperience...etc and put it in the respective helper methods in the utils folder. Basically, make your request to sanity straight from the helper utils without the api routes. After I did this it deployed.
So you will be fetching like this
const res = await sanityClient.fetch(query)
const experiences: Experience [ ] = result
return experiences
The query is your groq query string.
Thanks for your explanation buddy! It really helped me out! 😁
any chance you could show the repo for this to compare? trying to figure out where i've gone wrong. thanks
I also am facing issues with deploy I used try catch in the index.tsx cause the data was not coming up now when giving "vercel deploy --prebuilt" then it's not working.
ENOENT: no such file or directory, stat '/vercel/path0/.vercel/output/functions/_next/data/td_4cUkOhbVy6u7Kx0Fm8/index.json.func'
though I see this dir in the .vercel build folder
any thoughts on that?
thanks in advance
@@muhammadshadreza1636 Just delete this "data" folder and then run "vercel deploy --prebuilt"
Thank you for explanation, that makes sense, so basically you can't call internal Next.JS APIs from getStaticProps. But I wonder then why vercel build worked on video?
Thanks Sonny! It's always a pleasure to watch you working and explaining the code! Appreciate a lot!
I was scrolling and searching who help me to build my next portfolio. after passing through many youtubers i finally came to ur channel. u r just awsm bro. keep ir up my prayer are with u bro
appreciate the hardwork put behind this. such a underrated youtuber
Really awesome video Sonny! Your energy throughout was great to see and I definitely learned a lot of new things 👍
you never disappoint with your content keep up the good work !
had so much fun building this. Cant thank you enough Sonny!
Best soft soft tutorial for beginners on UA-cam! I'm an absolute beginner and all the other tutorials I've found on UA-cam have been so
Love your energy, and the content is gold, you're a blessing !
For anyone having problem with smaller screen devices, you can add zoom 67% at the first div on index tsx. Then replace h-screen on each component by 150vh. Mine looks good on Laptop and Phone.
@Rizki Rajar my comment do you have any idea about that??
can you please share your code? i have some issues
@@binodkhatri7738 no idea, sry
awesome bro love your toturials and respect your effort to teach us like this
If you're getting issues with Hydration after making the Email logo clickable, its because you have nested tags.
Social Icon is a component which contains an tag and Link is just a fancy a tag, so it will complain.
I solved this by just using the url property of the social Icon and wrapping the get in touch with me text in a Link tag, which works since they are on the same level now and no longer nested.
Thanks! This helped me a lot!
or you can just give LegacyBehavior to tag its gonna work
@@mustafa-bilen that worked perfectly thank you!
I removed the link tag and just added onClick={() => (window.location.href = "#contact")} to motion.div
@@SatyamKumar-vz6kg THANK YOU
Sonny - amazing!!! Your knowledge, delivery and energy (for the entire video) - wow - you're the man!!!
coding is so much enjoyable with Sonny, thank you
This is amazing. And this is 100 times better than the best selling udemy bootcamp. Thank you for sharing it for free.
Love this guy's energy on a topic can overwhelmingly be a bit dry from other content creators!
Thanks as always for your amazing content Sonny.
You, as usual, just killing it. Thanks Sonny.
This guy is amazing, great video and the way you solve the errors its just amazing good trainer.
For anyone having error while deployment -
reason - using the baseurl when vercel builds the app there are no api functions present at the moment. They will be present after the deployment but the same doesnt let us deploy the function. What we can do is first deploy rest of the code which doesn't use those functions so that later when we deploy the whole code vercel wont have any problem fetching the apis. Because it will already be present there.
Solution - Comment out the code which uses api then deploy the app. Then uncomment the code and deploy it again.
Thnx buddy
Hi Sharad Please a little more help regarding this issue. Sonny mentioned at the end of the VIdeo to change the baseURL. In which file to change the base url and whats is the base URL please a little help will be great help for me thanks.
Issue i am having is the following anything i am updating in SANITY studio and showing/ updating on LIVE link. :(
@@atiati83 if we change anything on sanity our vercel app will require a rebuild to show the changes. Thats what happening with my code. Maybe we can automate this thing, will have to find this out.
@@atiati83 The base url is present in .env files
@@sharadkushwah1307 I meant what url to use so sanity works. At the moment sanity not updating vessel app/site. Sonny didn't show in the video how to do do it. It only updating localhost:3000
I don't know what I m missing
I love any projects you can configure contents in cms after deployed. That makes more sense to customer based products.
I love this video!
My bro, even though I'm a skilled NextJS developer, your videos especially this one still have room to add value myself. Really Appreciated!
@Crypto D do you have any idean about my issue please read the comment the issue am facing??
The energy in this channel is insane, never thought coding can be this energetic
Thanks, this is a great video!!! Any suggestion on using clip path for backdrop of images in react or framer motion?
sonny This is my first testing react web and no words to say really.......... good Thanks sonny, love you 🖤🖤💯💥🍻
Thanks. This project helped me understanding how NextJs work.
And additionaly, it helped me understanding about Sanity and Framer Motion.
Big thanks, Sonny 👍
You’re welcome!!
Thanks for your videos! They help a lot. Can you do a NextAuth video using an Email provider using a mySQL database? Please use more mySQL database setups in your projects.
The video is very good. I enjoy watching them. One comment though:
Not everyone has a 4k screen resolution (3840 x 2160), so the apps need to usually be tweaked (sizes scaled down) to fit traditional smart phones and screen resolutions.
I’m new to tailwind css, I got mine uploaded but having an issue with smooth scroll that he got, would that be the issue with Google by any chance? Cause I went to his deployed page and it was the same thing there too
the website is'n really responsive. so thats something we'll have to do on our own
If anyone has completed this project, could you kindly share your code? I am encountering numerous issues with the responsiveness of the project.
there is a way in react to make your redundant code look more cleaner, its using the loop method (map in the jsx). Makes the code alot cleaner and easy to use. You also edit the element only one time and all of them get the changes
I use this method all the time for duplicates components nice tip
can any one face the issue of CSS styling not showing in the page
@@ahmed27218is it imported properly?
thank you straight to the point
This is what i was looking for . Franer motion ❤
You the one and only always make the most energetic tutorial 💯
amazing energy and content .thank you sonny sangha..
The way Sonny sold me on this tutorial in the intro, I just had to watch it. 😂😂
Great learning experience thank you .
This video is so interesting. I've watched it several times without getting tired of it, it's amazing!
love your vibe and your content sonny I want to be more like you
was watching live in 5am in the morning , Liked , Subscribed and saved to Playlist .
In the hero component for useTypeWriter you defined both a text and count const. Did you ever use the count variable?
Learning coding from the best teacher out there) If you were my teacher in my Engineering school I would not wasted those 4 years :)
If anyone ran into the problem of the image not rendering
use this in the terminal
yarn add next-images
use the Image component inside a div like so
bro if u have completed can u please share your git hub repo for this project
@@lokeshnegi5051 me to bro
@Haroon Albar do you have any idea about this issue help me
can anybody help me with the my skill section in his project the animation somewhat paused for a while and collaps together i have tried same code as his but in my context the animation is like linear there is no paused for a moment whyy is that so i am doing with reactjs does that make a difference ?? or am missing something ??
the animation on the skills section is not getting triggered for 3 column in small screen, similarly in project section animation is not getting triggered hence image is also not rendering. I have checked the container div size, that is not the issue. Can you tell me how to solve this issue?
Thanks Sonny! Loved the code along!
Wow! That’s amazing! Are you able to do a tutorial for beginners like myself on how to convert a Wordpress website into an app using react js?
Love the video! Would love to have this portfolio but with svelte/sveltekit or Astro with sanity cms
I'm going to modify this project and use it as my portfolio website. Thanks man for such amazing content
smart me too
I’m new to tailwind css, I got mine uploaded but having an issue with smooth scroll that he got, would that be the issue with Google by any chance? Cause I went to his deployed page and it was the same thing there
Guys if you are get getting "projectId" error when deploying or 500 internal error on vercel. Follow these steps:
1. Make sure your gitignore file does not have # local env files
# .env*.local in it.
2. Change the NEXT_PUBLIC_BASE_URL in .env.local to your vercel site url NOT localhost:3000.
thanks man !!!! it worked.
same problem but i can't fixed this error. could you help me?
Thanks man
@@mamunahmed8113 same here. Let me know if you find a solution
@@mamunahmed8113 same problem.. have you solved it?
Your channel is a nice surprise. I'm looking forward to watch other good content.
Thank you for sharing your knowledge!
You’re welcome!!! Thanks for supporting!
great ui! It'd be much appreciated if you try to make these fully responsive starting from phone to desktop
51:00
For windows users, select multiple things --> ctrl + alt + arrow key
Very niceee 👑❤️
Can you teach us how to build website with ruby and rails?
Thank you 😊😍
I checked - everything is clean
you are changing my life bro ... keep doing what you do best
am learning so much in a short time
Simply the best Sonny you are doing the best work Champ!!!
THANK YOU!! THIS WAS THE BEST AND EASIEST TUTORIAL
Did you deployed this tutorial project?
hey man if u have completed can u please share your gituhb code link
works, chock-full thanks!
Hi Sonny, I love you videos they are full of energy, thank you. Wath do you think about Flowbite? I love it, then it saves a lot of work when you use Tailwind.
This is a good video but heres some advice, instead of using the responsive tab in the browser, instead change it to a device size so that you can check if it is truly is responsive. The build is somewhat broken when you test it on iPhone. nevertheless keep up the great work.
Same. Btw could you be able to resolve that?
killer build man, wtf i love you
For building the header section, something neat i saw another developer do was to create an array (in this case, it would just hold the url", .map() over that with a key and url and return the fc with that url as the normal argument. Dry at its best
another develper who?please can yo tell ?
At 30:31 you can press SHIFT+OPTION+DOWNARROW to get multiple lines of the SocialIcon
@Dale Stewart do you have any idea about this
Binod khatri
1 second ago
can anybody help me with the my skill section in his project the animation somewhat paused for a while and collaps together i have tried same code as his but in my context the animation is like linear there is no paused for a moment whyy is that so i am doing with reactjs does that make a difference ?? or am missing something ??
also, for people having issues deploying to vercel, change the getstaticprops function inside the index.tsx to getserversideprops, and put all the get queries inside the function, for ex. "
const pageInfoQuery = `
*[_type == "pageInfo"][0]
`;
const pageInfo: PageInfo = await sanityClient.fetch(pageInfoQuery); "
I tried that and it still didn't work. If you could please explain more. Like do you remove the original code that has the groq query and just move it to the index.tsx ?
@@dante1672 Just changing getStaticProps to getServerSideProps should do it, it worked for me. And remove the "revalidate" property.
@@Pierrot24382 can u please share ur gitHub getting same error
@@Pierrot24382 I tried what you said still doesnt work :(
Just amazing bro!!!!!!
Add
" | order(dateStarted desc, dateEnded)" to the end of your GroQ experience query and
" | order(dateStarted desc)" to your projects query to get the array in a nice ordered list for rendering..
thanks man
I just love your content. Hard work matters
this channel is Amazing ... THANK YOU
Hi sonny, love your videos and channel, I am wondering if you do a video for e-commerce that supports English and Arabic languages using next js ✌️
Great video. Is there a good reason to why you create the endpoints to get the data when everything is rendered server side? Can’t you just call sanity directly from getStaticProps?
great topic, thanks 👍
Sonny, first time watching one of your videos and I am impressed with how much content you cover in a matter of a few hours! Being a manager I don't get to code as often as I would like, but videos like this keep me energized. Quick question, in the projects section how did you make the images that show the project in the different form factors? That is a nice visual for each project that I would be interested in replicating.
Thanks Brian!!
Could you elaborate on your question and send it to our team email at papareact.team@gmail.com as it always gets buried here!
did you get an answer for this question ?
Great work Sonny!
Good video. You should change your VSCode CMD + S shortcut to Save All.
Amazing content. 🥰👍
Im a Controls engineer. .. meaning I program machines and industrial software systems. I came across this in my suggested feeds. . . dude. . .your video totally makes me want to leave the industrial and manufacturing sector and come into the full stack developer arena. just your energy and style was enough and has me hooked. . . i got to get out of the dark
This is such an awesome comment haha thank you!!! I’m glad you enjoyed it!
Sonny thank you very much for this tutorial. When I was following the build I noticed that anytime i refreshed the page it snaped to the about section or the experience section instead of the Hero section. Please how can i fix this?
You are the best Sonny Sangha.
You have helped and inspired me a lot brother.
Because of I become a freelancer.
Incredible!!! #PAPAFAM
@@SonnySangha Error: getStaticProps is not supported in app/, detected in.
I am getting this error.. Is it due to next13?
Thank you!
Thank you !!!
absolutely amazing sonny. keept it up bro
thanx, bro. Nice words - I'm in full agreement, 💯percent
Love this video, but I am having issues with proper spacing of the images throughout the course, maybe because of the resolution?
Thank you 🙏
i needed this!!
great teacher wish i could make you proud by learning
hey im getting Server Error
TypeError: Only absolute URLs are supported. What did I do wrong here?
I have a question about the section projects and the slide. There is a mapping and it cunts each project, but how to make it display different paragraphs while keeping the counting?
Quality content you earned a sub
I couldn't finish the stream... thanks for posting it early
Nice video pro, keep it up!
Very good video. Thanks for sharing. I am a new subscriber. When I come to watch you video it is very nice contents. Please upload more clips. I am waiting to watch
This is the portfolio project for now to the future !
❤🎉
@@SonnySangha Error: getStaticProps is not supported in app/, detected in.
I am getting this error.. Is it due to next13?
Sangha bhaijaan your content always rocked everyone.
Hi Sonny! how is it that youre hovering over projects and experience and its scrolling on the x axis? i have same code but i cant scroll left to right
genius and angel to the community
Wow, thanks for tutorial nice..
1:18:24 You cant use the from next with the , like you have to use the default . Or at least i couldent.
Thanks for the excellent video. + 1 subscriber.🙃
Man I appreciate your tutorial, I used to hate web and front end dev as a back end guy, but now it's so much easier and straight forward! BTW, what extension are you using that makes the suggested code at 1:06:51?
its called autopilot