A starter template for using TypeScript with NextJS & server-side rendering (SSR) quickly and out-of-the-box so you can focus on what really matters - programming, not setup & config.
NOTE: This template does not intend to infringe on any other templates or the NextJS framework. It is purely what I (Filippo Fonseca) use for my TypeScript + NextJS projects, as I wanted to have a quick and easy way to be able to access this type of configuration while helping others obtain it in the process through OSS. Let me know if you have any problems, issues, or queries.
First, click the Use this template
button on this GitHub repository and clone your respective (newly created) repository to your local machine.
Next, install all required dependencies by running:
yarn
# or
npm i
NOTE: You can use either Yarn or npm, although it is recommended to use Yarn for this project (as it is the standard for NextJS-based projects).
Lastly, let's run the development server!
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
The following starter page should be rendered on the screen with the default boilerplate code for this template, as such:
You can now start editing the page and your app by modifying pages/index.tsx
. The page auto-updates as you edit the file. Feel free to make it your own (treat it like a normal app generated with npx create-next-app
or yarn create next-app
).
Pull requests, issues, discussions, etc. are always welcome!
Helpful resources I think will be useful for advancing what the template gives you with NextJS and TypeScript:
Made with ❤️ by @FilippoFonseca.