Skip to content

Samuelsonvs/Nextjs-blog

Repository files navigation

Table of Contents

Introduction

This is a repo for anyone create own blog post site, built with React and Next.js, with the content coming in from local files mdxData, and comments coming in from cloud db Mongodb additionally if you want to use local db for all comments and files you can use Prisma.

Technologies

  • React and Next.js for UI, utilising getStaticProps (static generation, fetch data at build time) and getServerSideProps (server-side rendering, fetch data at request time). next/image was used for image optimisation.
  • NextAuth was used for login or register authentication.
  • Mongodb mongoose library and mdxjs was used to for data storage.
  • Prisma optional database.
  • TailwindCss was used for styling.
  • date-fns library for formatting dates and times.
  • Mailchimp was used for automation using email to reach out to their target.
  • next-themes was used dark mode.
  • sweetalert2 was used for alert popup boxes

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.