A modern, opinionated Next.js template featuring TypeScript, SCSS, and best practices for rapid development.
- Next.js 15 - Latest version with App Router
- TypeScript - Full type safety with strict mode
- SCSS - Modern styling with CSS custom properties
- Radix UI - Unstyled, accessible component primitives
- PNPM - Fast, efficient package management
- ESLint - Code quality and consistency
- Responsive Design - Mobile-first approach
- Dark Mode Support - Automatic theme switching
- Performance Optimized - Built for speed
- Next.js 15 - React framework
- TypeScript - Type safety
- SCSS - Enhanced CSS
- Radix UI - Primitive components
- PNPM - Package manager
- ESLint - Linting
-
Clone or use this template
git clone <your-repo-url> cd nextjs-typescript-template
-
Install dependencies
pnpm install
-
Run the development server
pnpm dev
-
Open your browser
Navigate to http://localhost:3000
src/
├── app/
│ ├── globals.scss # Global styles
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Homepage
│ └── page.module.scss # Homepage styles
├── components/ # Reusable components
│ ├── index.ts # Component exports
│ ├── Button/
└── types/ # TypeScript type definitions
This template uses a modern SCSS architecture with:
- CSS Custom Properties - For consistent theming
- SCSS Modules - Component-scoped styles
- Responsive Design - Mobile-first breakpoints
- Dark Mode - Automatic theme switching
- Design Tokens - Consistent spacing, colors, and typography
This template integrates Radix UI primitives for building accessible, composable components:
- Accessibility First - WAI-ARIA compliant out of the box
- Keyboard Navigation - Full keyboard support for all interactions
- Focus Management - Proper focus handling and restoration
- Unstyled Primitives - Complete design control with your styling
- Composable - Use
asChildprop for advanced composition patterns
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm lint:fix- Fix ESLint errors
Edit the SCSS custom properties in src/app/globals.scss:
:root {
--primary: #2563eb;
--secondary: #64748b;
--accent: #f59e0b;
// ... more variables
}The template uses Geist fonts by default. Update in src/app/layout.tsx to change fonts.
Add new components in the src/components/ directory with their corresponding SCSS modules.
- SOLID Principles - All code follows SOLID design principles
- Type Safety - Comprehensive TypeScript coverage
- Accessibility - WCAG compliant with Radix UI primitives
- Performance - Optimized for Core Web Vitals
- Composability - Components built for reusability and extension
- SEO - Proper meta tags and semantic HTML
MIT License - see LICENSE file for details.
Made with ❤️ by Max