An open source boilerplate built using Next.js 15.3, TypeScript, and Tailwind CSS
With this template, you get all the awesomeness you need:
- Advanced Folder Structures
- Next.js with App Router support
- Type checking TypeScript
- Styled using Tailwind CSS
- State management with Zustand
- Authentication with NextAuth.js
- next-intl for internationalization
- UI Components built with shadcn/ui
- Data Fetching, Caching and Mutation with TanStack Query
- Linter with ESLint
- Code Formatter with Prettier
- Form handling with React Hook Form
- Validation library with Zod
- Storybook for UI development
- Error tracking with Sentry
- Analytics with Google Analytics
- Beautiful and consistent icons from Lucide
- Loading UI using Skeleton Components
- Dark theme with next-themes
- Absolute Imports with
@
prefix - Husky for Git Hooks
- Sitemap.xml and robots.txt with next-sitemap
- Metadata files optimized for SEO
- Storage helpers for Local, Session, Cookies
- π― Maximize lighthouse score
β
βββ messages # i18n messages
βββ public # Public assets folder
βββ src
β βββ app # Next JS App (App Router)
β βββ assets # Static assets (images, fonts, etc.)
β βββ components # React components
β β βββ forms # Form components
β β βββ icons # svg icons
β β βββ shared # Header, footer, aside components
β β βββ skeletons # Loading components
β β βββ ui # Atomic components
β β βββ widgets # Advanced components
β βββ constants # Project-wide constants
β βββ data # Static or mock data
β βββ helpers # Reusable utility functions (e.g., API, formatting, storage)
β βββ hooks # Reusable custom React hooks
β βββ i18n # Internationalization setup
β βββ lib # Common utility functions
β βββ providers # Global context providers (theme, data fetching, notifications, i18n)
β βββ schemas # Validation schemas
β βββ services # API request functions
β βββ stores # Global state
β βββ types # TypeScript type definitions
β βββ .middleware # Middleware for Next.js
βββ .env # Environment variables
βββ .gitignore # Git ignore rules
βββ .prettierrc # Prettier config
βββ components.json # shadcn/ui config
βββ eslint.config.mjs # ESLint config
βββ next.config.mjs # Next.js config
βββ package.json # Project dependencies and scripts
βββ postcss.config.js # PostCSS config
βββ README.md # README file
βββ tailwind.config.js # Tailwind CSS config
βββ tsconfig.json # TypeScript config
The project follows consistent file naming conventions:
File Type | Example | Style |
---|---|---|
Component | LoginForm.tsx |
PascalCase |
Hook | useLogin.ts |
camelCase |
Helper, Schema | form-schema.ts |
kebab-case |
Folder | login-form/ |
kebab-case |
Constants | ALPHA_REGEX |
SNAKE_CASE |
We use Sentry for error tracking and performance monitoring. To set up:
- Create a Sentry account
- Add your DSN to
.env
:
NEXT_PUBLIC_SENTRY_DSN=your-sentry-dsn
We use Google Analytics for tracking user behavior. To set up:
- Create a Google Analytics account
- Add your Measurement ID to
.env
:
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX