How to create and implement the Developer Portfolio with Next.js (r) (r)

Mar 11, 2023
Learning how to build a portfolio website using next.js

The developer's portfolio can be described as an array of sample projects and work that demonstrate your abilities as well as your experience. Your portfolio is a great method to distinguish yourself against the other applicants in your look for jobs. It's not just it's this. Portfolios can be beneficial for networking as well as ensuring you're keeping track of your education as well as making yourself appear as an authority in the subject.

Examples of live examples on how to make a developer's portfolio which you'll create using Next.js. The portfolio is accessible via the website's GitHub repository for further information. Have a closer look, or create a fork from it Next.js Portfolio is a beginning project I developed. It is a simple code, such as the style as well as the Font Awesome CDN hyperlink images, as well as the design.

Requirements/Prerequisites

It's a "follow as you go" kind of instructional. It's easier to learn how to instructions if you've:

  • Basic understanding of React and maybe Next.js

Why is there a reason for Next.js?

  • Web pages that are static: Next.js can build static websites that are fast simple to build and require minimal upkeep like the developer portfolio website that we'll build through this article.
  • Web pages that have a dynamic nature: Next.js allows you to build dynamic websites with content that changes as a result of user interaction or the server-side download of data.
  • improving website performance By utilizing rendering at the server's side, Next.js can improve website performance by decreasing the duration it takes for the page to load.
  • The evolution of online storess: Next.js is well-suited to create e-commerce websites that need server-side rendering order to improve performance and search engine optimization.
  • The development of progressive web apps (PWAs): Next.js allows the development of PWAs, which are web-based apps that function as native apps that run on a user's device.

How Do You Set Up The Environment to Support The Environment You'll Need For Your Next.js Development Environment

npx [email protected] my-portfolio

The prompt will ask to confirm the existence of any additional dependencies. You can then start the npm run process to make the application available at the localhost address 3000.

Code showing a new next.js project.
The development of a completely new Next.js project.

In the process of creating the Next.js project, using the npx command, it automatically produces a folder structure making use of the directories below:

  1. webpages The directory in this case contains pages from the application, which are routed by the application according to their file names. For example, pages/index.js would be the homepage page. however, pages/about.js would represent the page on.
  2. Public The folder is comprised of static files that may be downloaded directly via the web including fonts, images, and many other files.
  3. components: This folder can be used for other uses and also contains the reused UI components that may be used across different various applications.
  4. styles. The styles folder is utilized to design additional styles. Also, it has global styles that are able to be applied across different software.

Additional directories and files can be made based on specific function and configuration, but they're principal directories in the base Next.js project.

In this tutorial, each of the parts we build will appear at the top of the page (our single-page site) There you'll discover components that belong to various sections, such as the hero information, projectinformation, and additional components.

How To Build A Responsive Developer Portfolio using Next.js

A typical portfolio consists of these components:

  • Navbar component
  • Hero component
  • About the component
  • Skills component
  • The section on Projects
  • Contact component
  • Footer component

It is anticipated for the Navbar and Footer components will be displayed on all pages, in the case of portfolios that have many pages. This can be accomplished this using Next.js through the creation of a design.

Layout Definition using Next.js

In Next.js Layouts can be used to create a consistent layout to the elements shown in each page. Layouts usually include elements like an header, an navigation menu as well as footer, which are displayed all over the webpages.

Start by creating an element folder within your Src (source) directory inside the directory for your Next.js project. In the next step, you'll need create an Navbar Footer , Footer elements for use with the Layout module.

It's the Navbar component of Navbar.jsx:

// components/Navbar.jsx import Link from "next/link"; const Navbar = () => return ( Joe's Portfolio Resume ) export default Navbar;

Footer is the component. Footer is located contained in Footer.jsx:

// components/Footer.jsx const Footer = () => return ( (c) new Date().getFullYear() Joel's Portfolio > ) export default Footer;

Notice: For the Font Awesome icons to function  it is required to download Font Awesome within your application or utilize its CDN. It's possible to include the CDN hyperlink to your _document.js file like the following:

http https:/http:// pages/_document.js load Html, NextScript, NextScript, and Head within the document's export function to  the default function of 'next/document'.() Return ( );

Note: If you link to a different version of Font Awesome with the CDN It is necessary to update it with the appropriate authenticity hash to match the version you are using.

Once you've created necessary elements of your layout, you'll be able to build the Layout element itself, and then incorporate it into the pages that you have created by wrapping your content within it.

The Layout component can accept children props that have a unique code. This gives users access to the information that you would like to include in your Next.js pages.

// components/Layout.jsx import Navbar from './navbar'; import Footer from './footer'; const Layout = ( children ) => return ( children > ) export default Layout;

The Layout element that includes the Navbar along with the Footer, along with children props correctly placed. It is now possible to incorporate the Layout component into your webpages by wrapping the contents of your pages within it. The procedure is performed in the _app.js file.

// pages/_app.js import '@/styles/globals.css'; import Layout from '../components/layout'; export default function App( Component, pageProps ) return ( ); 

It's time to finish creating a design for your portfolio of developers. This portfolio will focus in details on Next.js and the most effective way to incorporate it into your website . You can then import the styles styles that you've made in your styles/globals.css file into the project. If you browse your portfolio's site in dev mode, you will observe the design of your app.

Image of a layout component
Layout component

This is the perfect moment to update your portfolio site the proper contents.

Building Portfolio Components

Now, you can develop separate components for each section of your portfolio as the developer. All of these components are imported into the index page of your Next.js project. They will appear when you launch your project by making use of NPM run development.

The Hero Component

Its Hero component is the first element that is situated beneath the Navbar Its main purpose is to catch the eye of the user and to give the impression of what this application or site is about.

/components/Hero.jsx components/Hero.jsx import Image from "next/image" *Const Hero is () Export default Hero

If you look at the above code, you will notice that you will notice the fact that Next.js represents the Next.js image component is utilized rather than the HTML images tag. This allows images to be included as it allows for automated photo optimization, resizing, and resizing, among numerous other.

The About page is where you'll notice that the simple description of the developer was provided alongside the social icons of Font Awesome to add social links.

This is the way it should be done. Hero component should be:

Next.js hero component for portfolio website
Hero Component

The Hero component can be customized by adding additional content into the Hero component. It is also possible to alter styles contained in the styles/globals.css file or possibly re-create it to your liking.

The About Component

The About page is intended to provide readers or those visiting your portfolio with information about youin the number of sentences you'd like. If you want to share your personal story, you can make a separate "About Me" page. Add an option on the page that provides more information on the person you are.

/"/ components/About.jsx import image of "next/image" *const About = () = = return ( return ( About me About Me"flex-about""p" > engineer I've always had a love developing elegant and efficient solutions for difficult issues. I'm proficient within the realm of software development, with an emphasis on web-based technologies such as HTML, CSS, and JavaScript. I am a enthusiast of creating the front-end and back-ends for software applications. I'm always seeking ways to improve efficiency, enhance customer experience and provide the best level of good programming. In my professional life, I've been involved in a variety of projects, from static web pages, to advanced enterprise level applications. I'm adept at working with various software tools to develop and build frameworks such as React, Angular, Vue.js, Node.js, and Laravel. I am always eagerto learn and discover new technologies and constantly seeking ways to expand my capabilities as well as knowledge. >>>>> (/div>>>) Export the default About code below has two paragraphs about the developer as well as an picture of the developer. The About section should look in the About section of the About component. You're able to tweak the styles to add pictures and more. The Skills Component is a Skills component. skills component will highlight how the designer has the latest technologies or techniques they've utilized before. The Skills component can be simplified through the use of an array in an external file. Then, import into the components for skills. In this way it is possible to go on looping without creating duplicates of similar scripts. // components/Skills.jsx const Skills = () => return ( Skills HTML CSS JavaScript React Node Python ) export default Skills; In the code above it is possible to create cards to represent each skill. Every card has the icon of font-awesome technology as well as the name of the technology. You can also alter your style, or change the code in order to make it appealing and distinct. Projects Component Projects Component The Project component is one of the key component of an individual's portfolio. These projects provide tangible evidence of the developer's abilities and capabilities and demonstrate the capacity of putting their expertise into action. Projects component It is possible to build arrays to store the project's details and then add it to your application so that it doesn't require hardcoding these data. It will make a data.js file to store the project's data array. It's stored within the component folder or in the pages/api folder. In this case I'll put it inside the folder of components. It contains the file that is part of my project. It has its own name along with the description as well as a GitHub hyperlink. /* components/data.js export const projectData = [ id: 1, title: 'Todo List App', description: A simple Todo List app built using JavaScript. All information is locally stored locally. The application lets users review their targets and record the actions they accomplish. ', gitHubLink: 'https://github.com/olawanlejoel/Todo-List-App', , id: 2, title: 'Books Library App', description: 'A simple Book Library App built with JavaScript. The app allows users to keep an excellent list of books they're studying or are currently reading. ', gitHubLink: 'https://github.com/olawanlejoel/Book-Library', , id: 3, title: 'Quotes Generator', description: 'Helps you generate quotes from about 1600 quotes written by different authors . Quotes automatically copy into your clipboards. ', gitHubLink: 'https://github.com/olawanlejoel/random-quote-generator', , id: 4, title: 'Password Generator', description: 'Helps you generates random passwords, you can select what you want your password to entail and also you can copy generated password to clipboard. ', gitHubLink: 'https://github.com/olawanlejoel/Password-Generator', , id: 5, title: 'Twitter UI Clone', description: 'Simple Twitter UI clone built with TailwindCSS and Vue Js. It is only a part of the main page of the Twitter UI. It's an excellent way to get started with TailwindCSS because it helps users to master the most basic principles. ', gitHubLink: 'https://github.com/olawanlejoel/TwitterUI-clone', , ]; It is now possible to create a project component to make use of this data, using a looping. There are many JavaScript iteration method but for this instance you could employ this JavaScript mapping() method which permits users to navigate through the data array following the import process to The Projects component. // components/Projects.jsx import projectData from './data.js'; const Projects = () => return ( Projects projectData && projectData.map((project) => ( project.title project.description )) ) export default Projects; In the example code above you've kept from repeating yourself by looping the array and outputting each project into the Projects component making it easy to manage and create more projects. Contact Component Another reason why developers should have a portfolio is to allow potential customers to connect with the developer. A way to do this is for people to contact the developer by emails. It's exactly the purpose of this Contact component. // components/Contact.jsx const Contact = () => return ( Get In Touch If you want us to work together, have any questions or want me to speak at your event, my inbox is always open. In the event that I want to speak with you, or talk to you about something with you, I'll be sure to reply to your message! Cheers! Welcome! ) Export default Contact; Add your email address into the tag so that it will launch an email program which sends a message to the email address that you have entered. Contact component You've completed the process of creating the entire portfolio application. The next step is to include them on the page index. Browse through your pages/index.js document - the one created as default and then modify its code by including the following. // pages/index.js import Hero from '@/components/Hero'; import About from '@/components/About'; import Skills from '@/components/Skills'; import Projects from '@/components/Projects'; import Contact from '@/components/Contact'; import Head from 'next/head'; const Home = () => return ( Joel's Portfolio > ); ; export default Home; Image optimization is performed using the Next.js Image component. When deploying an application to production that makes use of an image component like the Next.js Image component, it's advised to install Sharp. This is accomplished using your terminal. Be sure to be in the directory of your project and execute the command: npm i sharp Now you can install your app, and your images will work thanks to the highest quality of performance that Next.js offers. Which is the most efficient method to get the Next.js Application ? When you're pleased with your resume that shows off your greatest achievements in developing and other important information You'll probably be keen to show it off with other people. Let's look at how you can accomplish this with GitHub as well as App Hosting. It is possible to push your code on GitHub and upload your source code to GitHub with the following steps: Create a new repository (just for local directories to save the files). This can be done through logging into your GitHub account and then pressing the plus icon in the upper-right part of the page, then selecting creating a new repository from the dropdown menu. The process can be seen in the screenshot below. Start by creating a new GitHub repository. Next, you must assign your repository a name and a description (optional) and choose whether you want your repository publicly accessible or locked. Click"Create. After that, you will be capable of transferring your application to the newly created GitHub repository. What you require to upload your application using Git is the URL for your repository , which can be located on the main repository page beneath the Clone or download buttons, or after the procedure following the creation of the repository. Connect to the repository using your GitHub repository's URL. The most effective method to accomplish this is to make sure that you're prepared to upload the program you created by entering your console, or command prompt then going to the directory that's the base of your project. Use the following procedure to launch your Git repository on your local computer: Git repository: Git init You are now able to upload your code into the local Git repository using the command"git add . The above command will add all files in the currently-running directory and its subdirectories to the new Git repository. Then, you are able to apply changes permanently using the following command: Git commit"my initial commit "my very first commit" Note: You can substitute "my very first commit" with your own brief sentence describing the changes that you've have made. Last, upload your source code to GitHub using the following commands: remote git Add origin URL remote git Create origin URL (repository URL)[repository URL] git push -u source master. Make sure to replace "[repository URL" by the URL for the personal GitHub repository. After you've completed these actions, your file will be pushed to GitHub and accessible through the URL for your repository. The next step is to move your repository's data to . Create Your Portfolio to make the transfer only take a few minutes. Start by visiting Your My dashboard, and then sign in to your account, or sign up for an account. Choose Applications on the left sidebar. Click "Add service" from the dropdown menu, select Application to run the Next.js application on . Make an application within My A The pop-up is shown where you can to select the repository which you want to share. Automatically identify the command to start. Once the application is in the process of deploying. In a matter of hours, an email will be given to give access to the deployment version of your app. In this case, it is: https://-developer-portfolio-ir8w8..app/ Deployment link on Notice: Automatic deployment was activated, which means that it automatically deploys the application every time you make changes to your codebase . After that, it uploads it into GitHub. Then, it pushes it to GitHub. of benefits developers could think about regarding making use of Next.js when working on projects that are web-based. The first version to provide optimal performance right out of the box including options like pre-fetching or code splitting. These features will help reduce page loading time. In addition, it provides an easy development environment for React developers. It supports well-known tools like stylized components, as well as React hooks. Next.js is utilized to provide a variety of deployment options that range from traditional servers-based hosting , to more modern servers like. It allows developers to select the deployment option that best suits their specific needs. They also gain from the framework's improvements to efficiency, in addition to other benefits. The next step is to include new options to the new website to showcase your portfolio. There are several possibilities to help get your creative juice flowing: add pages that provide more details and integrate blogs with MDX and implement animation. Discuss your thoughts or experience in the comment section below. Simple setup and administration within My Dashboard. My Dashboard is available 24 hours a day for expert help The most advanced Google Cloud Platform hardware and network are powered by Kubernetes to guarantee maximum capacity. An Cloudflare with an integrated Cloudflare for businesses to boost the speed of their operations and secure of Google Cloud Platform's global user base comprises more than 35 data centres and over 275 PoPs around the globe

This article was originally posted here

This post was first seen on here