REST API, Dynamic product list, component based CSS with Next JS 11+, Tailwind CSS 2.0 and TypeScript
Demo on Vercel: https://productlist.vercel.app/products/
🚀 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
- 🔥 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
- Minimal code
- SEO-friendly
- 🚀 Production-ready
- Node.js and npm
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
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.
Licensed under the MIT License, Copyright © 2020
See LICENSE for more information.
Made with ♥ by make-mobile.de