Skip to content

ByeBye-Sama/next-3js-example

Repository files navigation

GitHub stars GitHub forks Discord GitHub license

📓 NextJs SWC Boilerplate

by Kay Pacha

Nextjs - Styled-Components - SWC - Jest | testing-library - Storybook - Github Actions - Eslint - Prettier

🎉 Getting Started

These instructions will get you a comfy and solid start for your project.

Prerequisites

You will need to have:

npm (Node Package Manager)

Installing

How to start your project: Use as a template (recommended) | Download | Pull | Fork this repo.

Then install dependencies.

npm i

Now you have all devDependencies and dependencies the project need.

🏃 Run the project

Put your github account on CODEOWNERS file inside .github folder. You can edit or delete the config of ./.github/workflows & ./scripts in case you want your own configuration or you don't want it one.

For development run

npm run dev

For storybook run

npm run storybook

For tests run

npm run test

For eslint remember to modify, delete or add your rules on the package.json

For other util commands to development or production check on the package.json

💅 Deploy Storybook on surge.sh with Github Actions

Make an automatic comment with a link of the deploy on PRs

For this process you need to set 1 environment variable on your repo SECRETS

SURGE_TOKEN
SURGE_TOKEN

For this you need to have an account on surge.sh and get the variable for there. Use the surge token command and login to your account to get the token, then go to your repo > settings > secrets and create a new secret with the name SURGE_TOKEN and add your token as value.

CUSTOMIZATION

You can modify variables, add more, modify the content of the comment on scripts/comment-in-pr.sh

🐀 Kay Pacha team

Joaquin Cristian Pablo

📑 License

MIT