Full-featured template for JAMstack websites using next.js
Deploy your own copy of this project in just a few clicks on Vercel:
I built this template with all the tools I found useful to develop my own personal projects, so it can be a bit biased. If you find something that you think is not relevant or could be improved, please open an issue or a pull request to fix it.
React.js with TypeScript
Lint & format
Testing Setup
UI
APIs
SEO
Deployment
Clone the repository and install the dependencies:
git clone https://github.com/jsulpis/nextjs-template.git && cd nextjs-template && yarn install
Serve with hot reload at localhost:3000.
yarn dev
Build for production: next.js automatically renders static HTML pages when possible. Then if you deploy on Vercel you can have both statically rendered pages and server-side rendered pages (as lambdas functions).
yarn build
Launch a server for server-side rendering (after building the application):
yarn start
Generate a fully static project with pre-rendered pages to put directly on a server or any static website hosting platform. Note that you lose the possibility to have server-side rendered pages. With Vercel you should not have to run this command.
yarn export
This template is ready to be deployed on Vercel:
You can integrate Vercel with your GitHub account, which allows it to deploy each branch and pull request to their own environment, and the main branch in production.
See the documentation page
If you don't find what you are looking for in this template, there is a good chance that one of the many examples provided by Vercel will make you happy !
Released under the MIT license.