Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dineshbyte/nextjs-boilerplate
https://github.com/dineshbyte/nextjs-boilerplate
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dineshbyte/nextjs-boilerplate
- Owner: dineshbyte
- License: mit
- Created: 2022-06-02T06:25:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T20:08:17.000Z (about 2 years ago)
- Last Synced: 2024-04-19T12:47:34.689Z (9 months ago)
- Language: JavaScript
- Size: 265 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Philosophy
- Minimal code
- SEO-friendly
- 🚀 Production-ready### Requirements
- Node.js 14+ and npm
### Getting started
Run the following command on your local environment:
```shell
git clone --depth=1 https://github.com/RadiansysInc/alopay-fe.git
cd alopay-fe
npm install
```Then, you can run locally in development mode with live reload:
```shell
npm run dev
```Open http://localhost:3000 with your favorite browser to see your project.
```shell
.
├── README.md # README file
├── .husky # Husky configuration
├── .vscode # VSCode configuration
├── public # Public assets folder
├── src
│ ├── layouts # Layouts components
│ ├── pages # Next JS Pages
│ ├── pages.test # Next JS Pages tests (this avoid test to treated as a Next.js pages)
│ ├── styles # Styles folder
│ ├── templates # Default template
│ └── utils # Utility functions
├── tailwind.config.js # Tailwind CSS configuration
```### Customization
You can easily configure Next js Boilerplate. Please change the following file:
- `public/apple-touch-icon.png`, `public/favicon.ico`, `public/favicon-16x16.png` and `public/favicon-32x32.png`: your website favicon, you can generate from https://favicon.io/favicon-converter/
- `src/styles/global.css`: your CSS file using Tailwind CSS
- `src/utils/AppConfig.js`: configuration file
- `src/templates/Main.js`: default theme### Deploy to production
You can see the results locally in production mode with:
```shell
$ npm run build
$ npm run start
```The generated HTML and CSS files are minified (built-in feature from Next js). It will also remove unused CSS from [Tailwind CSS](https://tailwindcss.com).
You can create an optimized production build with:
```shell
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.
### Testing
All tests are collocated with the source code inside the same directory. So, it makes it easier to find them. Unfortunately, it is not possible with the `pages` folder which is used by Next.js for routing. So, what is why we have a `pages.test` folder to write tests from files located in `pages` folder.