๐ Next.js, Tailwind CSS and TypeScript โก๏ธ Made with developer experience first: Next.js, TypeScript, ESLint, Prettier, Husky, Lint-Staged, VSCode, Netlify, PostCSS, Tailwind CSS.
This is a Next.js project bootstrapped with create-next-app
.
Developer experience first:
- ๐ฅ Next.js for Static Site Generator
- ๐จ Integrate with Tailwind CSS
- ๐ Type checking TypeScript
- โ Strict Mode for TypeScript and React 18
- โ๏ธ Linter with ESLint (default NextJS, NextJS Core Web Vitals and Airbnb configuration)
- ๐ก Absolute Imports
- ๐ 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)
- ๐ฏ 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/alextaymx/capbay-mamak.git my-project-name
cd my-project-name
npm install
npm run dev
or
npm run dev
# or
yarn dev
Open http://localhost:3000 with your favorite browser to see your project.
.
โโโ README.md # README file
โโโ next.config.js # Next JS configuration
โโโ public # Public folder
โ โโโ assets
โ โโโ images # Image used by default template
โโโ src
โ โโโ layout # Atomic layout components
โ โโโ pages # Next JS pages
โ โโโ styles # PostCSS style folder with Tailwind
โ โโโ templates # Default template
โ โโโ utils # Utility folder
โโโ tailwind.config.js # Tailwind CSS configuration
โโโ tsconfig.json # TypeScript configuration
You can start editing the page by modifying pages/index.tsx
. 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.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
For easy configuration, Please change the following file:
public/apple-touch-icon.png
,public/favicon.ico
,public/favicon-16x16.png
andpublic/favicon-32x32.png
: your website favicon, you can generate from https://favicon.io/favicon-converter/src/styles/global.css
: your CSS file using Tailwind CSSsrc/utils/AppConfig.ts
: configuration filesrc/templates/Main.tsx
: default theme
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.
Clone this repository on own GitHub account and deploy to Netlify:
Deploy this Next JS Boilerplate on Vercel in one click:
If you are VSCode users, you can have a better integration with VSCode by installing the suggested extension in .vscode/extension.json
. The starter code comes up with Settings for a seamless integration with VSCode. The Debug configuration is also provided for frontend and backend debugging experience.
Pro tips: if you need a project wide type checking with TypeScript, you can run a build with Cmd + Shift + B on Mac.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
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.
Everyone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug.
Made with โฅ by Alex