How do you create and deploy the Developer Portfolio with Next.js (r) (r)

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

A developer's portfolio could be described as an array of work samples and projects that showcase your capabilities and experience. Your portfolio is a great method to distinguish yourself against the other applicants in your job search. This isn't just about that. Portfolios are beneficial for networking and also for ensuring you're tracking your education as well as creating the impression of being an expert in your field.

Examples of live examples on how to create a developers' portfolio created using Next.js. The portfolio is accessible via the site's GitHub repository for more information. Check it out, or create a fork from it. Next.js Portfolio is an initial project I designed. The code is simple, such as the style as well as it's Font Awesome CDN hyperlink images, as well as the layout.

Requirements/Prerequisites

It's an "follow the steps" type of instruction. It's much easier to adhere to follow instructions if you've

  • A basic understanding of React, and maybe Next.js

There is a need to use Next.js?

  • Websites which have no content: Next.js can build static websites that are easy to create and requires minimum maintenance, similar to the portfolio site for developers that will be built in this article.
  • Web pages with an active nature : Next.js allows you to develop dynamic websites that contain contents that change due to user interaction or the servers-side download of information.
  • improving website performance By utilizing rendering at the server's level, Next.js can improve website performance by reducing the time of time it takes for the website to load.
  • The development of stores onlines: Next.js is well-suited for creating e-commerce websites that need server-side rendering order to increase performance as well as optimize search engine performance.
  • The creation of progressive web apps (PWAs): Next.js lets you develop PWAs, which are apps on the web that work as native apps running on the device of the user.

What is the best way to set up the Environment for Supporting Your Environment for Next.js? Next.js Development Environment

npx [email protected] my-portfolio

It will prompt you for confirmation of that you have any other dependencies. Then, you can initiate the process of running npm to make the program accessible at the localhost address 3000.

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

In the process of creating Next.js, the Next.js project, with the npx command, it generates a folder structure, using directories below:

  1. pages The directory in this case contains pages created by the application that are routed by the application according to the file's name. As an example, pages/index.js would be the homepage page. however, pages/about.js would symbolize the page that you are on.
  2. Public The folder is made up of static files that may be downloaded directly via the web including images, fonts, and various other types of files.
  3. components The directory can be utilized for different purposes as well as contains reused UI components that can be used in a range of software.
  4. styles. The styles folder is utilized for the creation of further styles. Also, it has global styles that can be integrated into different programs.

Additional directories and files may be constructed based on specific function and configuration however, they're the primary directories in the basic Next.js project.

In this tutorial, each component we design will be listed at the top of our page (our single-page website) You'll find parts that fall under various sections, such as hero's information, project information as well as other components.

How To Build A Responsive Developer Portfolio using Next.js

A typical portfolio comprises the following components:

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

The Navbar and Footer components will be displayed on all pages, when it comes to portfolios with many pages. This can be accomplished this by using Next.js by generating a design.

Layout Definition using Next.js

In Next.js Layouts can be utilized to provide a consistent design for the elements displayed in each page. Layouts typically include elements such as the header, navigation menu, and a the footer that appear throughout the web pages.

Begin by creating an element folder inside the the Src (source) directories inside the directory of the Next.js project. The next step is you'll need create an footer element, a Navbar Footer to use in conjunction using the Layout module.

It's the Navbar part of Navbar.jsx:

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

It is the element. It is contained within Footer.jsx:

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

Note: For the Font Awesome icons to function it is necessary to download Font Awesome within your application or make use of its CDN. You can add the CDN hyperlink in the _document.js file like these:

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

NOTE: If you link to an alternative version of Font Awesome, using the CDN It's important to upgrade it using the correct authenticity hash that matches the version that you're using.

When you've created the essential elements that make up your layout it's now possible to build the Layout element by itself and later add it to the pages you've constructed by wrapping your contents inside it.

The Layout component is able to accept children props that have an unique code. The Layout component gives users access to the information that you would want to add in the 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 Props for children that have been correctly set up. Now, you can include the Layout component in your web pages through wrapping the contents of your webpages within it. The process takes place in the _app.js file.

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

You're now ready to create an attractive collection of developer portfolios. This portfolio will focus in details on Next.js as well as the most efficient way to incorporate it into your site . It is then possible to incorporate the styles styles you've created within your styles/globals.css file into your project. If you browse your portfolio's site in dev mode, you'll see the design of your app.

Image of a layout component
Layout component

The time is now to make sure your portfolio page has and include all the relevant information.

Building Portfolio Components

Now, you can develop distinct components for each part of your portfolio as the developer. These components will be integrated into the index page of Your Next.js project. They'll appear once the project is launched using the NPM develop.

The Hero Component

The Hero component is the initial element that is situated beneath the Navbar Its purpose is to draw the attention of the user as well as give the impression of what the application or website is about.

/components/Hero.jsx components/Hero.jsx load Image into "next/image" *Const Hero () Export default Hero () Export default Hero

If you examine the above code and look at the code, you'll notice that Next.js is the Next.js image component which is used in place of the HTML image tag. It allows images to be used since it can be used for automatized photo optimization, resizing, and resizing among different.

The About page is where you'll notice that the basic description of the creator was included in conjunction with the social icons from Font Awesome to add social links.

It's the way you should do it. Hero components should include:

Next.js hero component for portfolio website
Hero Component

The Hero component is customizable by incorporating additional information into it. Hero component. You can also modify the styles in the styles/globals.css file or possibly re-create it to your liking.

The About Component

The About page is intended to present readers or people who visit your website with details about yourself in the amount of paragraphs you'd like to include. If you'd like to include your personal story, you can make the separate "About Me" page. Include a link on the page that provides additional information about the person that you're.

/"/ components/About.jsx import image of "next/image" *const About = () = = return ( return ( About me About Me"flex-about""p" > Engineer I've long had a love creating elegant and effective solutions to difficult problems. I'm proficient within the realm of software development with an emphasis on web-based technologies like HTML, CSS, and JavaScript. I'm a fan of creating the front-end and back-ends to software applications. I'm always seeking ways to increase efficiency, improve user experience, and offer the best level of good programming. In my professional life I've participated in a variety of initiatives, ranging from static web pages to complex enterprise level software. I'm proficient in working with various software tools to develop and build frameworks such as React, Angular, Vue.js, Node.js, and Laravel. I'm always keen to learn and learn about the latest technologies. I am constantly seeking ways to expand my abilities and expertise. >>>>> (/div >>>) Export the default About code below, which contains two paragraphs about the developer and an image of the person who is the person who is developing it. The About section must appear at the About section in the About component. It is possible to alter the styles to add pictures and more. This Skills Component is a skills component. skills component will highlight that the designer is equipped with the modern techniques or technologies that they've used before. The skills component could be reduced by using an array of data in an external file. It is then imported into components for skills. In this way it is possible to continue 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 the font-awesome technology, as well with the name of the tech. Also, you can alter your style, or change your code to make the card attractive and unique. Components of Projects Projects The Project component is one of the most important components of an individual's portfolio. They provide concrete evidence of the developer's capabilities as well as their capabilities, and prove the capacity of putting their expertise into action. Projects is a component that allows to construct arrays for storing information about the project. You can then integrate it into your application in order to not require hardcoding these data. The component will create an data.js file that stores the data array of the project. It's stored within the component folder or in the folder pages/api. In this case I'll put it within the folder that contains components. The file is part of my project. It is named after me along with the description, as well as the 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. It allows users to examine their goals and keep track of 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. This app lets users keep a great record of the books they're currently researching or 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. This is a small part that appears on the homepage of the Twitter UI. It's a great way to get started with TailwindCSS because it helps users learn 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 a variety of JavaScript methods for iteration, but in this particular instance, you can use the JavaScript mapping() method which permits users to browse through the array of data 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 A further reason developers should have a portfolio is that they can allow prospective customers to connect with the person who is developing the software. A way to do this is for people to get in touch with the developer through email. This is exactly why we have 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. If I would like to talk about something with you or speak to you regarding something that interests you, I'll ensure to respond to your email! Cheers! Welcome! ) Export default Contact; Add your email address to the tag in order that it will launch an email program which sends an email to the address that you've provided. Contact component You've completed the task of creating the complete portfolio application. Next step is adding them to the page index. Go through the pages/index.js document that was created as default and then alter its code to include 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, such as the Next.js Image component you should install Sharp. This can be done with your terminal. You must be inside the directory of your project and then type to npm i Sharp. You can now install your app, and your images will work thanks to the highest quality of performance that Next.js can provide. What's the most effective way to download the Next.js Application ? If you're satisfied with your resume that shows the most impressive achievements you've made in the field of development and any other pertinent details, you're likely to show it off with others. Let's take a look at ways that you can do this using GitHub as well as App Hosting. It's possible to publish your source code to GitHub and upload the source code you have to GitHub using the following steps: Create a brand new repository (just to local directories so that you can preserve the file). This is accomplished by accessing your GitHub account and pressing the plus symbol in the upper-right part of the page. After that, selecting the option to create a repository from the dropdown menu. This process is illustrated in the screenshot below. Start by creating your first GitHub repository. Next, you must assign your repository a name and the description (optional) and choose whether you would like your repository to be publicly accessible or private. Click"Create. After that, you will be able to transfer your app to the newly established GitHub repository. What you require to upload your app using Git is the address to the repository. This URL can be found on the main page of your repository under the Clone or download buttons, or after the establishment of the repository. Link to your repository by using the GitHub address. The best way for doing this is to make sure that you're ready to upload the program you created by entering your console or command prompt then going to the directory which is the basis of your application. Utilize the procedure below to open your Git repository on your local system: Git repository: Git init You are now capable of uploading your program in the local Git repository using the command"git add . The command above will upload every file in the current directory as well as its subdirectories into the new Git repository. Then, you are able to apply changes permanently by using the command below"git commit"my first commit "my very first commit" Be aware that you can substitute "my first commit" with your own concise paragraph describing the changes you've created. Then, you can upload your source code to GitHub with the following command remote git add origin URL remote git create the origin URL (repository URL)[repository URL] git push -u source master. You must substitute "[repository URL" with the URL of the private GitHub repository. When you've done these steps, 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 in order to ensure that the transfer only take less than a minute. Begin by going to Your My dashboard, and then login to your account, or register for an account. Click on Applications in the left sidebar. Select "Add service" in the drop-down menu, select Application to launch the Next.js application . Create an application in My A The pop-up is shown where you can to select the repository which you wish to share. Automatically identify which command that you want to begin. When the app is in the process of being deployed. Within a few hours, an email is sent out to allow access to the deployment version of the 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 . It then uploads the file to GitHub. It then pushes it onto GitHub. of benefits developers could contemplate when using Next.js when working on projects that are web-based. This is the first version of Next.js to offer the best performance out of the box , with choices like pre-fetching, or code splitting. These options will reduce page loading time. In addition, it provides an easy development environment for React developers. It supports well-known tools like stylized components and React hooks. Next.js can be used to offer various choices for deployment, from the traditional server-based hosting to the more advanced servers, such as. Developers can choose the deployment option that best meets their particular demands. Additionally, they benefit from the framework's improvements to efficiencyas well as other benefits. It is the next step to include new options for the new site for displaying your work. There are several possibilities that can help you get your creativity flow flowing. Add pages with more information and integrate blogs with MDX and implement animation. Talk about your experiences or thoughts in the comments section below. It is easy to set up and manage your account on My Dashboard. My Dashboard is accessible 24 hours a day for expert help The most advanced Google Cloud Platform hardware and network are powered by Kubernetes to guarantee maximum capacity. Cloudflare is a Cloudflare that is integrated with Cloudflare that allows businesses to improve the speed of their operations and ensure the security of the Google Cloud Platform's worldwide user base. includes over 35 data centers and over 275 PoPs around the world.

This article first appeared on this site.

This post was first seen on this site

Article was first seen on here