{"id":13400088,"url":"https://github.com/jpedroschmitz/typescript-nextjs-starter","last_synced_at":"2025-05-14T14:07:32.511Z","repository":{"id":36988452,"uuid":"248576068","full_name":"jpedroschmitz/typescript-nextjs-starter","owner":"jpedroschmitz","description":"Non-opinionated TypeScript starter for Next.js 15. All the tools you need to build your next project ⚡️","archived":false,"fork":false,"pushed_at":"2025-05-13T17:42:38.000Z","size":4022,"stargazers_count":1399,"open_issues_count":3,"forks_count":159,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-13T18:44:00.064Z","etag":null,"topics":["cursor","hacktoberfest","nextjs","react","starter","typescript"],"latest_commit_sha":null,"homepage":"https://next-ts.joaopedro.dev","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpedroschmitz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-19T18:26:38.000Z","updated_at":"2025-05-13T17:41:45.000Z","dependencies_parsed_at":"2023-10-22T19:22:47.427Z","dependency_job_id":"43d8a716-4ae3-458b-ac76-950d79c9fd73","html_url":"https://github.com/jpedroschmitz/typescript-nextjs-starter","commit_stats":null,"previous_names":[],"tags_count":17,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpedroschmitz%2Ftypescript-nextjs-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpedroschmitz%2Ftypescript-nextjs-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpedroschmitz%2Ftypescript-nextjs-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpedroschmitz%2Ftypescript-nextjs-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpedroschmitz","download_url":"https://codeload.github.com/jpedroschmitz/typescript-nextjs-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159194,"owners_count":22024558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cursor","hacktoberfest","nextjs","react","starter","typescript"],"created_at":"2024-07-30T19:00:48.032Z","updated_at":"2025-05-14T14:07:32.492Z","avatar_url":"https://github.com/jpedroschmitz.png","language":"CSS","funding_links":[],"categories":["CSS","TypeScript","Nextjs Starter"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/26466516/141659551-d7ba5630-7200-46fe-863b-87818dae970a.png\" alt=\"Next.js TypeScript Starter\"\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\u003cstrong\u003eNon-opinionated TypeScript starter for Next.js\u003c/strong\u003e\u003c/div\u003e\n\u003cdiv align=\"center\"\u003eHighly scalable foundation with the best DX. All the tools you need to build your next project.\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=PRs\u0026message=welcome\u0026style=flat-square\u0026color=5e17eb\u0026labelColor=000000\" alt=\"PRs welcome!\" /\u003e\n\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/jpedroschmitz/typescript-nextjs-starter?style=flat-square\u0026color=5e17eb\u0026labelColor=000000\"\u003e\n\n  \u003ca href=\"https://x.com/intent/follow?screen_name=jpedroschmitz\"\u003e\n    \u003cimg src=\"https://img.shields.io/twitter/follow/jpedroschmitz?style=flat-square\u0026color=5e17eb\u0026labelColor=000000\" alt=\"Follow @jpedroschmitz\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eCreated by \u003ca href=\"https://x.com/jpedroschmitz\"\u003eJoão Pedro\u003c/a\u003e with the help of many \u003ca href=\"https://github.com/jpedroschmitz/typescript-nextjs-starter/graphs/contributors\"\u003ewonderful contributors\u003c/a\u003e.\u003c/sub\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n## Features\n\n- ⚡️ Next.js 15 (App Router)\n- ⚛️ React 19\n- ⛑ TypeScript\n- 🆕 Cursor Rules — Cursor rules for an improved AI coding experience\n- 📏 ESLint 9 — To find and fix problems in your code\n- 💖 Prettier — Code Formatter for consistent style\n- 🐶 Husky — For running scripts before committing\n- 🚓 Commitlint — To make sure your commit messages follow the convention\n- 🖌 Renovate — To keep your dependencies up to date\n- 🚫 lint-staged — Run ESLint and Prettier against staged Git files\n- 👷 PR Workflow — Run Type Check \u0026 Linters on Pull Requests\n- ⚙️ EditorConfig - Consistent coding styles across editors and IDEs\n- 🗂 Path Mapping — Import components or images using the `@` prefix\n- 🔐 CSP — Content Security Policy for enhanced security (default minimal policy)\n- 🧳 T3 Env — Type-safe environment variables\n- 🪧 Redirects — Easily add redirects to your application\n\n## Quick Start\n\nThe best way to start with this template is using [Create Next App](https://nextjs.org/docs/api-reference/create-next-app).\n\n```\n# pnpm\npnpm create next-app -e https://github.com/jpedroschmitz/typescript-nextjs-starter\n# yarn\nyarn create next-app -e https://github.com/jpedroschmitz/typescript-nextjs-starter\n# npm\nnpx create-next-app -e https://github.com/jpedroschmitz/typescript-nextjs-starter\n```\n\n### Development\n\nTo start the project locally, run:\n\n```bash\npnpm dev\n```\n\nOpen `http://localhost:3000` with your browser to see the result.\n\n## Testimonials\n\n\u003e [**“This starter is by far the best TypeScript starter for Next.js. Feature packed but un-opinionated at the same time!”**](https://github.com/jpedroschmitz/typescript-nextjs-starter/issues/87#issue-789642190)\u003cbr\u003e\n\u003e — Arafat Zahan\n\n\u003e [**“I can really recommend the Next.js Typescript Starter repo as a solid foundation for your future Next.js projects.”**](https://corfitz.medium.com/create-a-custom-create-next-project-command-2a6b35a1c8e6)\u003cbr\u003e\n\u003e — Corfitz\n\n\u003e [**“Brilliant work!”**](https://github.com/jpedroschmitz/typescript-nextjs-starter/issues/87#issuecomment-769314539)\u003cbr\u003e\n\u003e — Soham Dasgupta\n\n## Showcase\n\nList of websites that started off with Next.js TypeScript Starter:\n\n- [FreeInvoice.dev](https://freeinvoice.dev)\n- [Notion Avatar Maker](https://github.com/Mayandev/notion-avatar)\n- [IKEA Low Price](https://github.com/Mayandev/ikea-low-price)\n- [hygraph.com](https://hygraph.com)\n- [rocketseat.com.br](https://www.rocketseat.com.br)\n- [vagaschapeco.com](https://vagaschapeco.com)\n- [unfork.vercel.app](https://unfork.vercel.app)\n- [cryptools.dev](https://cryptools.dev)\n- [Add yours](https://github.com/jpedroschmitz/typescript-nextjs-starter/edit/main/README.md)\n\n## Documentation\n\n### Requirements\n\n- Node.js \u003e= 20\n- pnpm 9\n\n### Directory Structure\n\n- [`.github`](.github) — GitHub configuration including the CI workflow.\u003cbr\u003e\n- [`.husky`](.husky) — Husky configuration and hooks.\u003cbr\u003e\n- [`public`](./public) — Static assets such as robots.txt, images, and favicon.\u003cbr\u003e\n- [`src`](./src) — Application source code, including pages, components, styles.\n\n### Scripts\n\n- `pnpm dev` — Starts the application in development mode at `http://localhost:3000`.\n- `pnpm build` — Creates an optimized production build of your application.\n- `pnpm start` — Starts the application in production mode.\n- `pnpm type-check` — Validate code using TypeScript compiler.\n- `pnpm lint` — Runs ESLint for all files in the `src` directory.\n- `pnpm lint:fix` — Runs ESLint fix for all files in the `src` directory.\n- `pnpm format` — Runs Prettier for all files in the `src` directory.\n- `pnpm format:check` — Check Prettier list of files that need to be formatted.\n- `pnpm format:ci` — Prettier check for CI.\n\n### Path Mapping\n\nTypeScript are pre-configured with custom path mappings. To import components or files, use the `@` prefix.\n\n```tsx\nimport { Button } from '@/components/Button';\n// To import images or other files from the public folder\nimport avatar from '@/public/avatar.png';\n```\n\n### Switch to Yarn/npm\n\nThis starter uses pnpm by default, but this choice is yours. If you'd like to switch to Yarn/npm, delete the `pnpm-lock.yaml` file, install the dependencies with Yarn/npm, change the CI workflow, and Husky Git hooks to use Yarn/npm commands.\n\n\u003e **Note:** If you use Yarn, make sure to follow these steps from the [Husky documentation](https://typicode.github.io/husky/troubleshoot.html#yarn-on-windows) so that Git hooks do not fail with Yarn on Windows.\n\n### Environment Variables\n\nWe use [T3 Env](https://env.t3.gg/) to manage environment variables. Create a `.env.local` file in the root of the project and add your environment variables there.\n\nWhen adding additional environment variables, the schema in `./src/lib/env/client.ts` or `./src/lib/env/server.ts` should be updated accordingly.\n\n### Redirects\n\nTo add redirects, update the `redirects` array in `./redirects.ts`. It's typed, so you'll get autocompletion for the properties.\n\n### CSP (Content Security Policy)\n\nThe Content Security Policy (CSP) is a security layer that helps to detect and mitigate certain types of attacks, including Cross-Site Scripting (XSS) and data injection attacks. The CSP is implemented in the `next.config.ts` file.\n\nIt contains a default and minimal policy that you can customize to fit your application needs. It's a foundation to build upon.\n\n### Cursor Rules\n\nThis is the most opinionated part of the project, and it's just a starting point. We have cursor rules that will help you write code faster and more efficiently. If you don't use Cursor, feel free to delete the `.cursor` folder.\n\nRegarding the rules, these are the foundation, and you can customize them as you want according to your project needs or developer preferences. If you want some inspiration, check out the [Cursor Directory](https://cursor.directory/).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpedroschmitz%2Ftypescript-nextjs-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpedroschmitz%2Ftypescript-nextjs-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpedroschmitz%2Ftypescript-nextjs-starter/lists"}