How to Build and deploy an enterprise portfolio of Developers with the help of Next.js (r) (r)

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

Developer portfolios are a selection of work samples of work and work projects which demonstrate your capabilities along with your knowledge. A well-crafted portfolio will distinguish you against other applicants to secure an interview. The portfolio isn't just for show. A portfolio is also beneficial for networking and ensuring that you're tracking your studies and eventually transforming your skills into a professional in your field.

This is live-streamed presentation that shows an entire Portfolio of the developers built with Next.js. The project is accessible on the development project's repository on GitHub If you'd like to have a look or perhaps to fork the project. Next.js Portfolio-building application which I created. The portfolio starter includes simple codes, such as the designs, the Font Awesome CDN link, photos, and the base layout.

Requirements/Prerequisites

It's a "follow along" kind of tutorial. It is easier to program when you're using

  • A basic understanding of React together with Next.js

What is the reason for Next.js?

  • Create static sites: Next.js can build static websites that are fast and easy to set up and requires minimal upkeep, as is the case with the portfolio site for developers that we'll build during this course.
  • developing dynamic sites: Next.js allows you to create dynamic websites which alter their contents in response to visitors' actions and also on servers-side data download.
  • increasing the speed of websites with server-side rendering, Next.js could improve web website speed, through reducing the time it takes to render the website.
  • The creation of e-commerce sites: Next.js is well-suited for the creation of e-commerce sites that require rendering on the server in order to increase speeds and higher rankings.
  • The development of Progressive web-based apps (PWAs): Next.js allows you to develop PWAs, which can be web-based applications that function like native applications that can be downloaded and installed on gadgets of the users.

How to Setup The Environment for Next.js Development Environment Next.js Development Environment

npx [email protected]est my-portfolio

An alert will pop up informing you of the confirmation necessary for the rest of your dependencies. Once you've confirmed that, you'll be capable of running an operation using npm so that your app can be accessible at the address of your localhost 3000.

Code showing a new next.js project.
A novel and ingenuous Next.js project.

When you start the Next.js project with the Npx command, it automate the process of organizing your folder structure based on the directories listed as the main ones:

  1. pages The folder inside contains pages of the application which will be routed automatically, by their filename. As an example, pages/index.js would serve as the homepage and pages/about.js would be the pages/about.js page.
  2. public The directory contains static files that are provided directly, including fonts, images and images as well as other resources.
  3. elements The folder can be used for non-essential purposes. It contains reused UI components that can to be used across various software.
  4. styles : This directory is not required and also contains the style guidelines that could be utilized across apps.

The different types of files as well as directories are created according to the specific settings or characteristics, but these are the directories that are used that are part of the base Next.js project.

The website we create will be displayed on our homepage (our single-page site) The site will comprise components for various sections , including the hero aboutthe projects, along with other areas.

How do you create a responsive Portfolio of Developers Using Next.js

A typical portfolio comprises the following components:

  • Navbar component
  • Hero component
  • About the component
  • Skills component
  • The project is a crucial part
  • Contact component
  • Footer component

It is highly recommended for the Navbar and Footer elements should be shown across every page if the portfolio is more than one page. You can accomplish this using Next.js for designing the layout.

Definition of Layouts using Next.js

In Next.js Layouts allow you to establish a consistent layout of components that are displayed across every page of a site. Layouts typically contain components like headers in addition to the navigation menu, and footer displayed across all site pages.

Make a folder for components within the Src (source) directory in the Next.js project. After that, you'll need to create your Navbar and Footer components that is utilized by the Layout module.

The following you will find the Navbar component of Navbar.jsx:

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

The Footer component can be located in Footer.jsx:

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

Notification To enable to get the Font Awesome icons to function, you have to install Font Awesome into your site or to use the CDN. Add the CDN link into the _document.js file like these:

/pages/_document.js pages/_document.js import Html, Head NextScript as well as Main, which is  Next/document function that is the default for document functions'. Export document() return ( );

Notice: If you link to a different version Font Awesome using the CDN, you will need modify it with the appropriate high-quality hash that corresponds to the version you're currently using.

After you've created the essential elements to create your layout, then you are able to build the Layout component , and then include it in your web pages in order to wrap the content of your pages within it.

Layout can create a prop with code that allows users access to data on the Your Next.js pages.

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

It is now possible to design the Layout element, which contains the Footer and Navbar , along with the children props positioned correctly. You can now include the Layout component on your web pages by wrapping the content of the webpage in the layout. The Layout component will be added to your _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 start designing your portfolio of developers. In this portfolio, we are focusing more on Next.js and the most efficient way to publish your website to . This means that you can transfer the stylesheets that you have in your styles/globals.css file into your app. When you start your portfolio site in the development phase, you'll be able to see the design of your app.

Image of a layout component
Layout component

Now is the time to ensure your portfolio's website is regularly updated and includes the correct contents.

Building Portfolio Components

Now, you can create separate parts to each part of your work as developers. All these components will be imported into the index page of your Next.js project. The components will show when you start your project using NPM run dev.

The Hero Component

The Hero element is the primary area that is located beneath the Navbar Its purpose is to draw the attention of users and provide an understanding of what the goal of the site or app is all about.

// components/Hero.jsx Import image from "next/image";Const Hero = () Export to standard Hero

The code you see above the above code, you will notice it is Next.js It is the Next.js image component that replaces using the HTML img tag. This is due to the fact that it includes the image since it is able to perform the automatic optimization of images and scaling, as well as various other.

Within the About section, you'll find an easy line of description about the author was included along with the social icons of Font Awesome to add social hyperlinks.

What it will look like the Hero component should appear to

Next.js hero component for portfolio website
Hero Component

There is the possibility of adding additional information to the Hero component, change the style of the styles/globals.css file or possibly even overhaul the entire section depending on your preference.

The About Component

The About section was designed to provide readers or those who browse your portfolio, details about yourself in the amount of paragraphs you wish to include. If you'd like to share your own personal tale It's easy to make an individual "About me" page. Add a button to the page to find out more about you.

/"/ components/About.jsx Import Image from "next/image" //const About = () => return ( About me As an experienced software developer, I've been searching for simpleand effective solutions to complicated problems. I've established a strong foundation in the area of software development and have a particular focus to internet-based technology like HTML, CSS, and JavaScript. I am a fan of working on both the back and front end of applications. I constantly seek ways to improve efficiency, enhance user experience and ensure top quality of the code. In the course of my career, worked on various tasks that range from basic static sites as in addition to more complex enterprise-level software. I have experience using different tools for development and frameworks which include React, Angular, Vue.js, Node.js, and Laravel. I'm always lookingto discover and experiment with innovative technologies. I am constantly trying new approaches to enhancemy skills and expertise. > > The ) export the default about. The below code contains two paragraphs about the developer along with an image of developer's name. The About area is the About component. You can always alter your layout to include more images along with other data. The Skills Component Skills component has been designed to show how developers employ one of the latest technology or techniques that they employed in the past. The Skills component is improved through the creation of an array in an external file and after that uploading it to the skills component. This way you can continue the loop, not having to duplicate similar codes. // components/Skills.jsx const Skills = () => return ( Skills HTML CSS JavaScript React Node Python ) export default Skills; In the code above, a card is created for each skill. Each card is decorated by the emblem of the technology employed by font-awesome as well as the name used to describe the software. Additionally, you can add other styles , and modify the code to create a design that is unique and appealing. This is called part of the Projects Component The component of projects is among the most important element of a portfolio for a developer. The projects are tangible evidence of the developer's abilities and capabilities and demonstrate the ability to apply their knowledge into real-world problems. The Projects component is possible to build an array that holds the details of each project and import the data into your application in order not to have to write these specifics. Then, we'll make a data.js file which stores the data array of each project. The data.js file can be located in the components folder , or in the folder pages/api. This example put it inside the folder of components. The array is the main object that is the subject of this project. It includes the name of the project, its description and GitHub hyperlink. /components/data.js components/data.js export projectData const ID: 1, title: 'Todo List App' Description: A simple Todo List app built using JavaScript. The information is stored locally in a local file storage. Users are able to list their jobs and tick them off when they have completed their task. ', 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 lets users access a vast library of books that they've been studying or are finished with. ', 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 are automatically copied to 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. The only thing it can cover is the home page of the Twitter UI. It's an excellent way to start by using TailwindCSS because it will help you understand basic concepts. ', gitHubLink: 'https://github.com/olawanlejoel/TwitterUI-clone', , ]; It is now possible to develop a component for your project to benefit from this data by looping through easily. There are a variety of JavaScript methods of iteration, however, in this particular tutorial, it's possible to make use of JavaScript map() JavaScript maps() methods to examine the array of data in the aftermath of the transfer of data to Projects. 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 code above you've successfully prevented repetition by looping through the array to output each project into the Projects component. This makes it easier to create and manage more projects. The Contact Component The reason to create your developer's portfolio is to ensure that clients who are keen on the services have the opportunity to reach them. them. A different option is to permit people to send you an email. This is precisely the function that we'll offer in this Contact element. // 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 wish to chat with you, or ask an issue, I'll make assured to reach you! Cheers! Speak to us! ) Export the default contact. Enter your email address into the tag. It is designed in the manner that pressing it opens an email program that can send an email message for the recipient. Contact component Now it is possible to create all components in your portfolio. What you need to do is incorporate them into the index page. Navigate to pages/index.js file , which is the default page index then modify it by using this code. // 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 handled with the Next.js Image component. In the event of deploying your application into production using this Next.js Image component, it is strongly suggested that you make sharp. This is done using your terminal. Make sure you're in the directories of your project following which you'll be able to run the command"npm i sharp" It is now time to install on your application and the images will function flawlessly thanks to the full optimization Next.js provides. How do I deploy the Next.js Application happy with the portfolio you've created, which highlights the best work you've done with development and important data You're likely to want to show it off to others, wouldn't you? Let's explore ways to achieve this through using GitHub together with an App Hosting Platform. Upload your code to GitHub Make sure you upload your code on GitHub using the instructions in the following steps: The first process is to establish a brand new repository (just like a local directory that stores the sources of code). This can be done when you sign in to your GitHub account using on the plus symbol in the upper right-hand corner of the screen and selecting New repository from the dropdown menu. This is depicted in the picture below. Make a brand new GitHub repository. The next step is give your repository a name and add a description (optional) then select whether you want your repository either private or public. Select the Create button. You can now upload your code into the newly created GitHub repository. All that is needed to upload your code using Git is your repository's URL. You can locate it in the main page of your repository, beneath the Clone or download tab along with the step-by-step instructions to follow in creating the repository. Access your GitHub repository's URL. The best method to do this is to ensure that you're prepared to upload your code through the command line or interface before going to the directory that contains your source code. Take these steps to begin the process of creating your personal local Git repository. This is known as the Git method. Incorporate your program into the local Git repository using these commands to add Git . This command adds every document in the directory, as well as subdirectories within it to the new Git repository. Now you can commit your changes using the below command , which commits to git by using the"-m" option "my initial commit" Be aware that it is possible to change "my first commit" with a short paragraph describing the changes you've implemented. The last step is to put your code on GitHub using these commands Remote Git: Include origin URL. [repository URL] git push --u origin master Make sure that you replace "[repository URL"[repository URL[repository URL]" by the URL of your own personal GitHub repository. When you've successfully completed the above steps the code you've created will be uploaded on GitHub and accessible via your repository's URL. You can now relocate the content of your repository to . Deploy Your Portfolio is able to be configured in just few minutes. It is as easy as visiting My dashboard, and then logging in or creating an account. My dashboard, sign in or create an account. Click Applications to the left of the bar. Simply click "Add service" in the drop-down menu select the Application for which you would like to publish a Next.js application to . Make an application within My A The modal window opens and you will be able to select the repository you want to publish. Automatically identify the start command. At this point it will be being deployed. Within a couple of hours, you will receive the link to open the deployed version of the app. In this case, it is: https://-developer-portfolio-ir8w8..app/ Deployment link on Notice: Automatic deployment was disabled, and it will automatically re-deploy the application every time you update your codebase and push the changes onto GitHub. Summary There are numerous advantages with employing Next.js to build web-based applications. It's the first to provide optimal performance right from the start, including features like pre-fetching as well as code splits, which increase the speed of loading on websites. Additionally, it provides an easy development environment to React developers. Additionally, it supports widely used instruments like stylized components, as well as React hooks. Next.js provides a wide range of deployment optionsthat start with standard servers, and moving to contemporary, serverless platforms such as those used by. This allows developers to choose the option of deployment that best fits their specific needs while benefiting from the framework's enhancements for improved performance in addition to other advantages. The next step is to add more options to your portfolio website. Some ideas to help get the creative juices flowing. Include more pages that provide detailed details, including blogs that make use of MDX as well as incorporate animation. Share your ideas or your experiences by leaving a comment below. Simple setup and administration of My dashboard. My dashboard is available 24/7 for professional support Google Cloud Platform hardware and network, that is powered by Kubernetes for the highest efficiency. Enterprise-level Cloudflare integration for the best performance and security. reaching out to a wide public with as much as 35 data centers, and 275 POPs in all over the globe.

Article was first seen on this website

Article was first seen on here