GithubHelp home page GithubHelp logo

dyarleniber / next-personal-website Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 4.0 445 KB

:computer: Personal website using JavaScript, Next.js, React, SWR, Tailwind CSS, Jest and React Testing Library.

Home Page: https://next-personal-website-five.vercel.app/

License: MIT License

JavaScript 93.16% CSS 4.80% Shell 2.04%
javascript nextjs react swr tailwindcss jest react-testing-library website personal personal-website

next-personal-website's Introduction

Next.js Personal website

💻 Personal website using JavaScript, Next.js, React, SWR, Tailwind CSS, Jest and React Testing Library.

Powered by Vercel

CI Coverage License

Live Preview   |    Configuration   |    License

Personal website buit with Next.js, React and Tailwind CSS utility-first framework.

Acceptance criteria defined for each route:

Route Description
/ Users should be able to see my personal information (name, brief description, current location, email and the links of my social networks) and send me a message.
/blog Users should be able to see all my posts.
/posts/[slug] Users should be able to see a full blog post.

The home page will be pre-rendered at build time using data from GitHub API. Some blog posts will also be pre-rendered at build time. However, new posts will be rendered as users request them. All blog data comes from DEV Community API.

All of these pages are configured to perform re-generation after a few seconds. Learn more in the Next.js documentation, on Incremental Static Regeneration.

The list of the latest blog posts is fetched using the SWR library. Which performs a HTTP cache invalidation strategy. This means that first the component will return the data from cache (stale), then it will send the fetch request (revalidate), and finally, it will come with the up-to-date data. In this way, the data will be updated constantly and automatically.

An additional API endpoint (/api/contact) has been created to handle sending emails from the contact form. The SMTP Service provided by SendGrid was used for this purpose.

An integration with Google Tag Manager was also implemented. This can be used to manage measurement and marketing optimization JavaScript tags (such as the Google Analytics tag).

The code base is covered by automated tests with Jest and React Testing Library. React Testing Library is a lightweight solution for testing React components. When testing with it, we render our React components and then assert on the output. Since we test the user behaviour, we can refactor implementation without touching our tests.

The website is hosted on Vercel. And a CI workflow created on GitHub Actions is responsible for automatically test the source code, generate a coverage report and upload it on Codecov. All these jobs are activated by a push or pull request event on main branch.

⚙️ Configuration

To clone and run this application, you’ll need to have Git and Node.js installed on your computer.

From your command line:

# Clone this repository
$ git clone https://github.com/dyarleniber/next-personal-website.git

# Go into the repository folder
$ cd next-personal-website

# Create a new .env.local file based on .env.example and set new values
$ cp .env.example .env.local

# Install dependencies
$ npm install

# Run the app in the development mode (open http://localhost:3000 to view it in the browser)
$ npm run dev

To run the tests, run the following command:

$ npm run test

For more information about the deploy process, access the Vercel website.

📝 License

This project is under the MIT license. See the LICENSE for more information.


Made with ♥ by Dyarlen Iber 👋 Get in touch!

next-personal-website's People

Contributors

dyarleniber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.