Skip to content

REST API for Dynamic product list with component based CSS on Nextjs with Tailwind CSS on TypeScript

License

Notifications You must be signed in to change notification settings

stefanibus/productlist

Repository files navigation

REST API, Dynamic product list, component based CSS with Next JS 11+, Tailwind CSS 2.0 and TypeScript

Sponsor Next JS Boilerplate

🚀 Next.js, Tailwind CSS and TypeScript ⚡️ ESLint, Prettier, Husky, Lint-Staged, VSCode, Vercel.

REST API is requested serverside via ISG ( Incremental Site Generation ) to create and deliver Static Pages for all ProductDetail-Pages while at the same time the data gets revalidated in hindsight after 100 seconds on the server.

Dynamic product list on the Product-Page

Component based CSS with Next JS 11+, Tailwind CSS 2.0 and TypeScript

Features

  • 🔥 Next.js for Incremental Site Generation ( Static Site Generator )
  • 🎨 Integrate with Tailwind CSS (w/ JIT mode)
  • 💅 PostCSS for processing Tailwind CSS and integrated to styled-jsx
  • 🎉 Type checking TypeScript
  • ✅ Strict Mode for TypeScript and React 17
  • ✏️ Linter with ESLint (default NextJS, NextJS Core Web Vitals and Airbnb configuration)
  • 🛠 Code Formatter with Prettier
  • 🦊 Husky for Git Hooks
  • 🚫 Lint-staged for running linters on Git staged files
  • 🗂 VSCode configuration: Debug, Settings, Tasks and extension for PostCSS, ESLint, Prettier, TypeScript
  • 🤖 SEO metadata, JSON-LD and Open Graph tags with Next SEO
  • ⚙️ Bundler Analyzer
  • 🖱️ One click deployment with Vercel or Netlify (or manual deployment to any hosting services)
  • 🌈 Include a FREE minimalist theme
  • 💯 Maximize lighthouse score

Built-in feature from Next.js:

  • ☕ Minify HTML & CSS
  • 💨 Live reload
  • ✅ Cache busting

Philosophy

  • Minimal code
  • SEO-friendly
  • 🚀 Production-ready

Requirements

  • Node.js and npm

Getting started

Run the following command on your local environment:

git clone --depth=1 https://github.com/stefanibus/productlist.git my-project-name
cd my-project-name
npm install

Then, you can run locally in development mode with live reload:

npm run dev

Open http://localhost:3000 with your favorite browser to see your project.

📦src
 ┣ 📂components
 ┃ ┣ 📂buttons
 ┃ ┃ ┗ 📂back
 ┃ ┃ ┃ ┗ 📜index.tsx
 ┃ ┣ 📂productlist
 ┃ ┃ ┣ 📂productlistOne
 ┃ ┃ ┃ ┗ 📜index.tsx
 ┃ ┃ ┗ 📂productlistTwo
 ┃ ┃ ┃ ┗ 📜index.tsx
 ┃ ┗ 📂the_challenge
 ┃ ┃ ┗ 📜index.tsx
 ┣ 📂layout
 ┃ ┗ 📜Meta.tsx
 ┣ 📂pages
 ┃ ┣ 📂projectinfo
 ┃ ┃ ┗ 📜index.tsx
 ┃ ┣ 📂products
 ┃ ┃ ┣ 📜index.tsx
 ┃ ┃ ┗ 📜[productID].tsx
 ┃ ┣ 📜index.tsx
 ┃ ┣ 📜_app.tsx
 ┃ ┗ 📜_document.tsx
 ┣ 📂styles
 ┃ ┗ 📜main.css
 ┣ 📂templates
 ┃ ┗ 📜Main.tsx
 ┗ 📂utils
 ┃ ┗ 📜AppConfig.ts

Deploy to production

You can see the results locally in production mode with:

$ npm run build
$ npm run start

The generated HTML and CSS files are minified (built-in feature from Next js). It will also removed unused CSS from Tailwind CSS.

You can create an optimized production build with:

npm run build-prod

Now, your blog is ready to be deployed. All generated files are located at out folder, which you can deploy with any hosting service.

License

Licensed under the MIT License, Copyright © 2020

See LICENSE for more information.


Made with ♥ by make-mobile.de

About

REST API for Dynamic product list with component based CSS on Nextjs with Tailwind CSS on TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published