Introduction

NextJS Starter Template

📄 About

This repository contains a monorepo (opens in a new tab) boilerplate written in Next.js (opens in a new tab), managed by the pnpm (opens in a new tab) package manager.

You can use it with the backend template, written in Laravel — laravel-starter-tpl (opens in a new tab).

→ Purpose

  • Establish a clear structure and present a lifecycle perspective (developer experience, continuous integration/continuous deployment, and deployments);
  • Demonstrate how to create and consume shared packages, locales, assets, and API types;
  • Provide a fully configured repository with integrated tools and configs, such as tsconfig, eslint, jest, cypress, tailwind, changelogs, versioning, codecov, codeclimate, sentry, and others;
  • Clarify advantages of using a monorepo, such as team cohesion, consistency, duplication, refactorings, and atomic commits.

→ Utilities and Features

This repository has some additional tools already setup for you:

🤔 What's inside?

Open in Gitpod (opens in a new tab)

This turborepo uses pnpm (opens in a new tab) as a package manager. It includes the following packages/apps:

→ Structure

.
├── apps
   ├── web                  # Next.js app - i18n, SSR, API, Jest, Cypress
   └── docs                 # Nextra app
└── packages
    ├── common-i18n          # Locales...
    ├── facebook-pixel       # Facebook Pixel tracking functionality
    ├── google-tag-manager   # Google Tag Manager functionality
    └── ui                   # React stub components

→ Apps

ApplicationURLDescription
docsDemo (opens in a new tab)Nextra (opens in a new tab) documentation template generated from Nextra: Docs Starter Kit (opens in a new tab)
webDemo (opens in a new tab)Next.js (opens in a new tab) app with TailwindCSS, Facebook Pixel and Google Tag Manager tracking, and Sentry support
storybookDemo (opens in a new tab)Storybook (opens in a new tab) — UI component explorer for React components
Apps should not depend on apps, they can depend on packages.

→ Packages

PackageDocsDescription
common-i18nREADME.md (opens in a new tab)Locales for multi-language support
facebook-pixelREADME.md (opens in a new tab)Facebook Pixel tracking functionality
google-tag-managerREADME.md (opens in a new tab)Google Tag Manager functionality
uiREADME.md (opens in a new tab)Shared react stub components
Apps can depend on packages, packages can depend on each others.

🤝 License

Licence

FOSSA Status (opens in a new tab)

🧱 Credits and Useful Resources

This repository is based on the nextjs-monorepo-example (opens in a new tab) template from belgattitude (opens in a new tab).

Learn more about the power of Turborepo:

Here are some other monorepo templates you may find useful:

Other projects:

🙆🏼‍♂️ Author Information

This repository was created in 2022 by lotyp / wayofdev (opens in a new tab).

🙌 Want to Contribute?

Thank you for considering contributing to the wayofdev community! We are open to all kinds of contributions. If you want to:

  • 🤔 Suggest a feature
  • 🐛 Report an issue
  • 📖 Improve documentation
  • 👨‍💻 Contribute to the code

You are more than welcome. Before contributing, kindly check our guidelines (opens in a new tab).