Coder Social home page Coder Social logo

gustavomorinaga / next-plate Goto Github PK

View Code? Open in Web Editor NEW
108.0 3.0 12.0 6.5 MB

πŸ¦Έβ€β™€οΈ A super template for Next.js with a pack of incredible tools

Home Page: https://next-plate.vercel.app

License: MIT License

JavaScript 14.07% TypeScript 85.46% Shell 0.47%
nextjs axios framer-motion react-icons chakra-ui husky lint-staged commitlint pwa yup

next-plate's Introduction

Next-Plate

Next-Plate Banner

πŸ¦Έβ€β™€οΈ A super template for Next.js with a pack of incredible tools


License MIT
Open Source Made with TypeScript Built with Love
Powered by Vercel


Bugs Maintainability Rating Quality Gate Status Reliability Rating Security Rating Vulnerabilities Renovate

Demo Desktop Demo Mobile

🌎 Translations

English PortuguΓͺs Brasileiro Korean

πŸš€ Demo β†’

Deploy your own copy of this template in just a few clicks!

πŸ“– Introduction

This is a complete template with all you need for your next React projects and all the best practices of JAMStack.

This template have a bunch of folders, code examples and configurations. Feel free to edit or remove them, including this README!

Customize and enjoy!

🌟 Features

This project features all the latest tools and good practices in web development!

Framework

  • βš›οΈ Next.js – A complete React framework for hybrid and server rendering

Data Fetching

  • ✳️ React Query – Hooks for fetching, caching and updating asynchronous data in React
  • ❇️ SWR (alternative for React Query) – A React Hooks library for data fetching
  • πŸ”„ Axios – Promise based HTTP client for the browser and Node.js

State Management and Hooks

  • 🐻 Zustand – A small, fast and scalable bearbones state-management solution using simplified flux principles
  • πŸ‘ react-use – Collection of essential React Hooks

Design System and Animations

  • 🎨 Chakra-UI – A simple, modular and accessible component library that gives you the building blocks to build your React applications
  • 🎞️ Framer Motion – A production-ready motion library for React
  • ✨ React Icons – A collection of popular icons to React projects

Form Validation

  • πŸ“‹ React Hook Form – Performant, flexible and extensible forms with easy-to-use validation
  • 🚨 Yup – A schema builder for runtime value parsing and validation

Tests

  • πŸƒ Jest – A delightful JavaScript Testing Framework with a focus on simplicity
  • πŸ™ Testing Library – Simple and complete testing utilities that encourage good testing practices

Design Patterns

  • β›” ESLint – Find and fix problems in your JavaScript code
  • πŸŽ€ Prettier – An opinionated code formatter, supporting multiple languages and code editors
  • 🐺 Husky – Modern native Git hooks made easy
  • πŸ’© lint-staged – Run linters against staged git files and don't let πŸ’© slip into your code base
  • πŸ““ commitlint – Helps your team adhering to a commit convention
  • 🏷️ Standard Version – A utility for versioning using semver and CHANGELOG generation powered by Conventional Commits

Analysis

  • πŸ•΅πŸ»β€β™‚οΈ why-did-you-render (optional) – Notify you about potentially avoidable re-renders

Additional Plugins

  • πŸ—ƒοΈ next-compose-plugins – Provides a cleaner API for enabling and configuring plugins for Next.js
  • πŸ“± next-pwa – A PWA plugin for Next.js
  • πŸ“ˆ next-seo – A plugin that makes managing your SEO easier in Next.js projects
  • πŸ€– next-sitemap – Sitemap generator for Next.js
  • πŸŽ‰ Partytown – Relocate resource intensive third-party scripts off of the main thread and into a web worker

▢️ Getting Started

πŸ“™ Creating a New Repository on GitHub

  1. Click on "Use this template" button
  2. Configure your new repository and click on "Create repository from template" button
  3. Now you can clone the generated repository to your local machine:
 $ git clone https://github.com/<YOUR-GITHUB-LOGIN>/<NAME-OF-YOUR-GENERATED-REPOSITORY>.git

πŸ› οΈ Installation

Before you can start developing your super application, you need to install the project's dependencies.

Move yourself to the root of the project:

$ cd <NAME-OF-YOUR-GENERATED-REPOSITORY>

For the next steps, choose a package manager of your choice and change the commands contained in the package.json scripts. See their documentation for more information:

Install all dependencies of the project:

# PNPM
$ pnpm install
# NPM
$ npm install
# Yarn
$ yarn install

⌨️ Development

Once all dependencies have been installed, you can run the local development server:

# PNPM
$ pnpm run dev
# NPM
$ npm run dev
# Yarn
$ yarn dev

Now just code!

πŸ–₯️ Production

After applying the changes, you can generate a build to test and/or deploy to your production environment.

Make a production build:

# PNPM
$ pnpm run build
# NPM
$ npm run build
# Yarn
$ yarn build

And then run the build:

# PNPM
$ pnpm start
# NPM
$ npm start
# Yarn
$ yarn start
View more commands you can use

Lint

# PNPM
$ pnpm run lint
# NPM
$ npm run lint
# Yarn
$ yarn lint

Lint and Fix

# PNPM
$ pnpm run lint:fix
# NPM
$ npm run lint:fix
# Yarn
$ yarn lint:fix

Test

# PNPM
$ pnpm run test # or pnpm run test:watch
# NPM
$ npm run test # or npm run test:watch
# Yarn
$ yarn test # or yarn test:watch

Type Checking

# PNPM
$ pnpm run type-check
# NPM
$ npm run type-check
# Yarn
$ yarn type-check

Format

# PNPM
$ pnpm run format
# NPM
$ npm run format
# Yarn
$ yarn format

Interactive Update Tool

# PNPM
$ pnpm run up
# NPM
$ npm run up
# Yarn
$ yarn up

Update All Dependencies

# PNPM
$ pnpm run up-latest
# NPM
$ npm run up-latest
# Yarn
$ yarn up-latest

Release As Major Version

# PNPM
$ pnpm run release-as-major
# NPM
$ npm run release-as-major
# Yarn
$ yarn release-as-major

Release As Minor Version

# PNPM
$ pnpm run release-as-minor
# NPM
$ npm run release-as-minor
# Yarn
$ yarn release-as-minor

Release As Patch Version

# PNPM
$ pnpm run release-as-patch
# NPM
$ npm run release-as-patch
# Yarn
$ yarn release-as-patch

Publish Release

# PNPM
$ pnpm run push-release
# NPM
$ npm run push-release
# Yarn
$ yarn push-release

Get Updates From Remote and Maintain Current Changes

# PNPM
$ pnpm run pull
# NPM
$ npm run pull
# Yarn
$ yarn pull

βš™οΈ Extra Configurations

SWR

Swap to SWR

Install the SWR on the project:

# PNPM
$ pnpm install swr
# NPM
$ npm install swr
# Yarn
$ yarn add swr

Remove all import lines, providers and code blocks of React Query located in src/pages/_app.tsx and src/pages/[login].tsx.

That's it! Use the useFetch function to fetch your data in the application.

Wanna see a demo? Uncomment all import lines and code blocks of SWR implementation on src/pages/[login].tsx.

Why Did You Render

How to Activate

Put the babel.config.js file (located in the path src/scripts) in the project root and delete .babelrc file.

Uncomment the wdyr import line on pages/_app.tsx.

That's it! Now you can monitore React re-renders!

How to Uninstall

Just delete the babel.config.js and wdyr.ts files, remove wdyr import line on pages/_app.tsx and uninstall it:

# PNPM
$ pnpm uninstall @welldone-software/why-did-you-render
# NPM
$ npm uninstall @welldone-software/why-did-you-render
# Yarn
$ yarn remove @welldone-software/why-did-you-render

πŸ“ File Tree

See below the file tree to understand the project structure.

View file tree

Folders and files marked with (**) are optional, so you can delete then.

πŸ“‚ next-plate/
┣ πŸ“‚ .github/                   # GitHub's folder configs **
┣ πŸ“‚ .husky/                    # Husky's folder
┃ ┣ πŸ“ƒ commit-msg               # Commitlint git hook
┃ β”— πŸ“ƒ pre-commit               # Lint-staged git hook
┣ πŸ“‚ .vscode/                   # VSCode's workspace **
┣ πŸ“‚ public/                    # Public folder
┃ ┣ πŸ“‚ static/                  # Static files folder **
┃ ┃ ┣ πŸ“‚ icons/                 # Icons folder **
┃ ┃ ┣ πŸ“‚ images/                # Images folder **
┃ ┃ ┣ πŸ“‚ sounds/                # Sounds folder **
┃ ┃ β”— πŸ“‚ videos/                # Videos folder **
┃ ┣ πŸ“‚ docs/                    # Documentation folder **
┃ ┃ ┣ πŸ“‚ demo/                  # Demonstrations project **
┃ ┃ β”— πŸ“‚ translations/          # Translations folder **
┃ ┣ πŸ“ƒ favicon.ico              # Icon tab browser
┃ ┣ πŸ“ƒ site.webmanifest         # PWA config
┣ πŸ“‚ src/
┃ ┣ πŸ“‚ animations/              # Framer Motion Animations **
┃ ┣ πŸ“‚ components/              # App Components
┃ ┃ β”— πŸ“‚ Motion/                # Chakra + Framer components **
┃ ┣ πŸ“‚ hooks/                   # React Hooks **
┃ ┃ β”— πŸ“ƒ useFetch.ts            # SWR fetch hook (optional) **
┃ ┣ πŸ“‚ interfaces/              # TypeScript Interfaces
┃ ┣ πŸ“‚ pages/                   # App pages
┃ ┣ πŸ“‚ scripts/                 # Additional scripts **
┃ ┃ ┣ πŸ“ƒ babel.config.js        # Babel config with WDYR **
┃ ┃ β”— πŸ“ƒ wdyr.ts                # WDYR file **
┃ ┣ πŸ“‚ services/                # Services
┃ ┃ ┣ πŸ“‚ global/
┃ ┃ ┃ β”— πŸ“ƒ api.ts               # AXIOS config
┃ ┃ β”— πŸ“‚ users/
┃ ┃   ┣ πŸ“ƒ index.ts             # React Query Configuration
┃ ┃   β”— πŸ“ƒ keys.ts              # React Query Key
┃ ┣ πŸ“‚ stores/                  # Zustand stores
┃ ┣ πŸ“‚ styles/                  # Styles folder
┃ ┃ ┣ πŸ“ƒ bgImages.ts            # SVG background images **
┃ ┃ β”— πŸ“ƒ theme.ts               # Chakra-UI theme
┃ β”— πŸ“‚ utils/                   # Useful functions **
┣ πŸ“ƒ .babelrc                   # Default Babel config
┣ πŸ“ƒ .editorconfig              # Editor config
┣ πŸ“ƒ .eslintignore              # ESLint ignore
┣ πŸ“ƒ .eslintrc                  # ESLint config
┣ πŸ“ƒ .gitignore                 # Git ignore
┣ πŸ“ƒ .versionrc                 # Versioning config
┣ πŸ“ƒ .commitlintrc              # Commitlint config
┣ πŸ“ƒ jest.config.js             # Jest config
┣ πŸ“ƒ jest.setup.js              # Jest setup
┣ πŸ“ƒ LICENSE                    # License of the project
┣ πŸ“ƒ next-env.d.ts              # Next.js types to TypeScript
┣ πŸ“ƒ next-seo.config.js         # Next-SEO config
┣ πŸ“ƒ next-sitemap.config.js     # Next-Sitemap config
┣ πŸ“ƒ next.config.js             # Next.js config
┣ πŸ“ƒ .prettierrc                # Prettier config
┣ πŸ“ƒ README.md                  # Main README
┣ πŸ“ƒ renovate.json              # Renovate Bot config **
┣ πŸ“ƒ tsconfig.json              # TypeScript config

πŸ“œ License

Although you don't have to, if you reuse this template for your projects I would appreciate it if you would credit me and provide a link to my GitHub profile in the footer of your project. Thanks!

This project is licensed under the MIT License - see the LICENSE page for details.


⭐ Give a star to maintain this project!

❀️ Thanks for your attention!

πŸ‘¨β€πŸ’» Good Hacking!


"Buy Me A Coffee"

next-plate's People

Contributors

adv-gustavomorinaga avatar danbom avatar gustavomorinaga avatar renovate-bot avatar renovate[bot] avatar shimotsu4431 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

next-plate's Issues

add ko-KR README

Expected Behavior

Add the README.ko-KR.md file and update default README.

Current Behavior

The Korean version of README will be added.
image
image

Possible Solution

I uploaded 'README.ko-KR.md' in a forked repository, so I would appreciate it if you could allow me to open a pull request.

Context

It's a good project, and I had the best template experience by looking at the project and using it myself. I hope other Koreans besides me can access this good project more easily!

Thank you.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm standard-version Available

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): replace dependency standard-version with commit-and-tag-version 9.5.0
  • chore(deps): update dependency eslint-plugin-jest to v27.2.3
  • chore(deps): update commitlint monorepo to v18 (major) (@commitlint/cli, @commitlint/config-conventional)
  • chore(deps): update commitlint monorepo to v19 (major) (@commitlint/cli, @commitlint/config-conventional)
  • chore(deps): update dependency @testing-library/dom to v10
  • chore(deps): update dependency @testing-library/jest-dom to v6
  • chore(deps): update dependency @testing-library/react to v15
  • chore(deps): update dependency @testing-library/react to v16
  • chore(deps): update dependency @types/node to v20
  • chore(deps): update dependency eslint-config-next to v14
  • chore(deps): update dependency eslint-plugin-jest to v28
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency eslint-plugin-testing-library to v6
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v14
  • chore(deps): update dependency lint-staged to v15
  • chore(deps): update dependency prettier to v3
  • chore(deps): update linters to v9 (major) (eslint, eslint-config-prettier)
  • chore(deps): update nextjs monorepo to v14 (major) (@next/eslint-plugin-next, next)
  • chore(deps): update typescript-eslint monorepo to v6 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • chore(deps): update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(deps): update dependency @hookform/resolvers to v3
  • fix(deps): update dependency @tanstack/react-query to v5
  • fix(deps): update dependency framer-motion to v11
  • fix(deps): update dependency next-seo to v6
  • fix(deps): update dependency react-icons to v5
  • πŸ” Create all rate-limited PRs at once πŸ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @builder.io/partytown 0.8.0
  • @chakra-ui/icons 2.0.19
  • @chakra-ui/react 2.5.5
  • @emotion/react 11.10.8
  • @emotion/styled 11.10.8
  • @hookform/resolvers 2.9.11
  • @tanstack/react-query 4.29.5
  • axios 1.3.6
  • framer-motion 10.11.6
  • next 13.2.4
  • next-compose-plugins 2.2.1
  • next-images 1.8.5
  • next-pwa 5.6.0
  • next-seo 5.15.0
  • react 18.2.0
  • react-dom 18.2.0
  • react-hook-form 7.43.9
  • react-icons 4.8.0
  • react-use 17.4.0
  • sharp 0.32.1
  • yup 1.1.1
  • zustand 4.3.8
  • @commitlint/cli 17.6.3
  • @commitlint/config-conventional 17.6.3
  • @next/eslint-plugin-next 13.2.4
  • @testing-library/dom 9.0.1
  • @testing-library/jest-dom 5.16.5
  • @testing-library/react 14.0.0
  • @testing-library/user-event 14.4.3
  • @types/jest 29.5.1
  • @types/node 18.15.13
  • @types/react 18.0.38
  • @typescript-eslint/eslint-plugin 5.55.0
  • @typescript-eslint/parser 5.55.0
  • eslint 8.36.0
  • eslint-config-next 13.2.4
  • eslint-config-prettier 8.7.0
  • eslint-plugin-jest 27.2.1
  • eslint-plugin-prettier 4.2.1
  • eslint-plugin-testing-library 5.10.3
  • husky 8.0.3
  • jest 29.5.0
  • lint-staged 13.2.2
  • next-sitemap 4.0.9
  • prettier 2.8.8
  • standard-version 9.5.0
  • typescript 5.0.4

  • Check this box to trigger a request for Renovate to run again on this repository

Add React Query

The React Query is a great Hook for Data Fetching and Caching. Implement this hook on the template will be interesting for most simple/complex future projects.

Will be set two branches, where the main branch contain React Query, and another contain SWR.

The developer can choose between these features to use on his projects.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error near r", ], "

Add Zustand

Using Zustand is better and easier than Redux or other state managements. Will be nice to implement and help the developer to have best DX on their projects.

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.