A modern, production-ready Next.js frontend template built with TypeScript, Tailwind CSS, and shadcn/ui components.
- Next.js 16.1.1 with App Router and React 19
- TypeScript for type safety
- Tailwind CSS v4 for styling with PostCSS integration
- shadcn/ui component library with Radix UI primitives
- React Compiler enabled for performance optimization
- ESLint with Next.js configuration for code quality
- Lucide React icons
- Responsive design utilities and mobile detection hook
- Hot toast notifications with react-hot-toast
- Cookie management with js-cookie
- Next.js
16.1.1- React framework with App Router - React
19.2.3- UI library - TypeScript
^5- Type safety
- Tailwind CSS
^4- Utility-first CSS framework - shadcn/ui - Re-usable component library
- Radix UI - Accessible component primitives
- Lucide React - Icon library
- Class Variance Authority - Component variants
- tailwind-merge & clsx - Conditional styling utilities
- ESLint
^9- Code linting - Babel React Compiler - Performance optimization
- PostCSS - CSS processing
-
Clone the repository
git clone https://github.com/Cherry-Network/frontend-template-nextjs.git cd frontend-template-nextjs -
Install dependencies
npm install # or yarn install # or pnpm install
-
Start the development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser Navigate to http://localhost:3000 to see the application.
| Command | Description |
|---|---|
npm run dev |
Start development server on localhost:3000 |
npm run build |
Build the application for production |
npm run start |
Start the production server |
npm run lint |
Run ESLint to check code quality |
frontend-template-nextjs/
βββ public/ # Static assets
β βββ file.svg
β βββ globe.svg
β βββ next.svg
β βββ vercel.svg
β βββ window.svg
βββ src/
β βββ app/ # Next.js App Router
β β βββ favicon.ico
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout component
β β βββ page.tsx # Home page
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ badge.tsx
β β βββ button.tsx
β β βββ card.tsx
β β βββ carousel.tsx
β β βββ dialog.tsx
β β βββ input.tsx
β β βββ select.tsx
β β βββ separator.tsx
β β βββ sheet.tsx
β β βββ sidebar.tsx
β β βββ skeleton.tsx
β β βββ tooltip.tsx
β βββ hooks/ # Custom React hooks
β β βββ use-mobile.ts # Mobile detection hook
β βββ lib/
β βββ utils.ts # Utility functions (cn helper)
βββ components.json # shadcn/ui configuration
βββ eslint.config.mjs # ESLint configuration
βββ next.config.ts # Next.js configuration
βββ package.json # Dependencies and scripts
βββ postcss.config.mjs # PostCSS configuration
βββ tsconfig.json # TypeScript configuration
- React Compiler: Enabled for automatic optimization
- App Router: Using the new Next.js 13+ routing system
- TypeScript: Strict mode enabled with path mapping (
@/*)
- Version: 4.x (latest)
- Base Color: Zinc
- CSS Variables: Enabled
- Style: New York (shadcn/ui)
- PostCSS: Integrated for processing
- Style: New York
- RSC: React Server Components enabled
- Icon Library: Lucide React
- Base Color: Zinc theme
- Next.js Core Web Vitals rules
- TypeScript support
- Custom ignore patterns for build directories
This template includes a comprehensive set of pre-built UI components:
- Layout: Card, Separator, Sheet, Sidebar
- Form: Input, Select, Button
- Feedback: Badge, Skeleton, Tooltip, Dialog
- Navigation: Carousel
- Utility: Custom hooks for mobile detection
All components are built with:
- Accessibility in mind using Radix UI primitives
- TypeScript for full type safety
- Tailwind CSS for consistent styling
- Variant support using Class Variance Authority
- Add new pages: Create files in
src/app/directory - Add components: Place reusable components in
src/components/ - Styling: Use Tailwind CSS classes and the
cn()utility for conditional styles - Icons: Import from
lucide-react - Mobile detection: Use the
useIsMobile()hook for responsive behavior
The template includes:
- Mobile detection hook (
useIsMobile) - Responsive Tailwind CSS utilities
- Mobile-first design approach
- Breakpoint: 768px for mobile detection
npx shadcn@latest add [component-name]Edit the CSS variables in src/app/globals.css or update the components.json configuration.
The template uses path mapping (@/* -> ./src/*) for cleaner imports.
- Next.js Documentation - Learn about Next.js features and API
- shadcn/ui Documentation - Explore available components
- Tailwind CSS Documentation - Learn about utility classes
- Radix UI Documentation - Understand component primitives
The easiest way to deploy is using the Vercel Platform:
- Push your code to GitHub
- Connect your repository to Vercel
- Vercel will automatically build and deploy
This Next.js application can be deployed on any platform that supports Node.js:
- Netlify
- Railway
- Heroku
- AWS
- Digital Ocean
Check the Next.js deployment documentation for detailed instructions.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Cherry+ Network Team.