A production-ready, scalable, and actively maintained starter template for building high-quality web apps with Next.js, TypeScript, and Tailwind CSS.
This starter template is designed for developers of all levels β from beginners starting their journey to advanced engineers building scalable applications.
- β‘οΈ Next.js 15+ with App Router
- β TypeScript β full type safety and custom config
- π¨ Tailwind CSS β preconfigured and responsive
- π§Ή ESLint + Prettier β clean, consistent code
- π Husky + lint-staged β prevent bad commits
- πΏ Scalable folder structure β production standard
- π¦ Alias support β easy path management
- π§ͺ Ready for unit & integration testing
- βοΈ Vercel ready β just push and deploy
Quickly set up your Next.js + TypeScript + TailwindCSS project using the CLI tool:
- π¦ using npm
npx next-ts-app my-awesome-app
- Replace my-awesome-app with your desired project name.
- The CLI will scaffold a fully configured Next.js + TypeScript + TailwindCSS starter for you.
During project creation, you'll be prompted to:
-
Project Name: Enter a name for your project (e.g.,
my-awesome-app) -
Package Manager: Choose your preferred package manager:
bun(Recommended for speed)npm(Most common)yarn(Alternative to npm)pnpm(Fast, disk-space efficient)
-
Follow the steps shown: For example, if you choose
bun:cd my-awesome-project bun install bun run devNote: If you pick
bun, make sure Bun is installed (npm install -g bunor visit bun.sh). Forpnpmoryarn, install them first if needed.
The project includes several useful scripts:
# Development
bun run dev # Start development server with Turbopack
bun run build # Create production build
bun run start # Start production server
bun run lint # Run ESLint
bun run lint:fix # Fix ESLint errors
bun run format # Format code with Prettier
bun run format:check # Check code formatting
bun run clear-cache # Clear Next.js cache, reinstall dependencies, and restart dev serverThe clear-cache script is particularly useful when you encounter build issues or need to reset your development environment. It:
- Removes the
.nextdirectory - Reinstalls dependencies without using cache
- Restarts the development server
- For Bun: Install via
npm install -g bun - For pnpm: Install via
npm install -g pnpm - For Yarn: Install via
npm install -g yarn - For npm: Comes with Node.js
After installation, you'll get:
- β Next.js 15 with App Router
- β TypeScript configuration
- β Tailwind CSS setup
- β ESLint & Prettier
- β Git hooks with Husky
- β Project structure ready to go
-
Click Use this template on GitHub.
-
Name your new repository.
-
Click
Create repository. -
Set up locally:
git clone https://github.com/[your-username]/[your-repo].git cd [your-repo] bun install bun run dev
public/ # Public static assets that are served directly
βββ assets/ # Static assets directory
β βββ images/ # Image files (png, jpg, svg, etc.)
β βββ data/ # Static JSON data files
β
src/ # Source code directory
βββ app/ # Next.js 13+ App Router directory
β βββ (landing)/ # Landing page route group (optional)
β β βββ _components/ # Page-specific components
β β βββ error.tsx # Error boundary for landing page
β β βββ loading.tsx # Loading state for landing page
β β βββ page.tsx # Landing page entry point
β β
β βββ (dashboard)/ # Dashboard route group
β β βββ _components/ # Dashboard-specific components
β β βββ error.tsx # Error boundary for dashboard
β β βββ loading.tsx # Loading state for dashboard
β β βββ page.tsx # Dashboard page entry
β β
β βββ layout.tsx # Root layout (shared across all pages)
β βββ template.tsx # Template for per-page layouts
β βββ providers.tsx # Global context providers (Theme, Auth, etc.)
β
βββ components/ # Reusable components directory
β βββ ui/ # UI primitives (buttons, inputs, cards)
β β βββ button.tsx # Button component
β β βββ input.tsx # Input component
β β βββ card.tsx # Card component
β β
β βββ layout/ # Layout components
β β βββ header.tsx # Header component
β β βββ footer.tsx # Footer component
β β βββ sidebar.tsx # Sidebar component
β β
β βββ shared/ # Shared components across features
β β βββ ThemeToggle.tsx # Theme toggle component
β β βββ Analytics.tsx # Analytics component
β β
β βββ forms/ # Form-related components
β β βββ FormInput.tsx # Form input component
β β βββ FormSelect.tsx # Form select component
β β
β βββ icons/ # SVG icon components
β βββ index.tsx # Icon exports
β βββ SocialIcons/ # Social media icons
β
βββ config/ # Application configuration
β βββ site.ts # Site metadata and configuration
β βββ routes.ts # Route definitions and constants
β βββ theme.ts # Theme configuration and tokens
β
βββ hooks/ # Custom React hooks
β βββ useAuth.ts # Authentication hook
β βββ useAnalytics.ts # Analytics hook
β βββ useDebounce.ts # Debounce utility hook
β βββ useLocalStorage.ts # Local storage hook
β
βββ lib/ # Utility libraries and helpers
β βββ api/ # API client configurations
β β βββ axios.ts # Axios instance and interceptors
β β βββ trpc/ # tRPC client setup
β β
β βββ utils/ # Utility functions
β β βββ formatter.ts # Data formatting utilities
β β βββ validators.ts # Validation utilities
β β
β βββ constants.ts # Application constants
β
βββ styles/ # Global styles and CSS
β βββ globals.css # Global CSS styles
β βββ theme/ # Theme variables and tokens
β βββ components/ # Component-specific styles
β
βββ types/ # TypeScript type definitions
β βββ index.d.ts # Global type declarations
β βββ next.d.ts # Next.js type extensions
β βββ custom-types.ts # Custom type definitions
β
βββ services/ # Business logic and services
β βββ auth.service.ts # Authentication service
β βββ analytics.service.ts # Analytics service
β
βββ contexts/ # React Context providers
β βββ ThemeContext.tsx # Theme context
β βββ AuthContext.tsx # Authentication context
β
βββ __tests__/ # Test files directory
βββ components/ # Component tests
βββ hooks/ # Hook tests
βββ services/ # Service tests
βββ utils/ # Utility function tests
These tools keep your code neat:
- ESLint: Finds code mistakes.
- Prettier: Formats code nicely.
- Tailwind CSS: Organizes styles.
- Husky: Checks code before commits.
- lint-staged: Runs checks on changed files.
Example rule for imports:
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal"],
"alphabetize": { "order": "asc" }
}
]This template works with:
- Vercel
- Netlify
- AWS
- Docker
Copy .env.example to .env for production settings.
![]() Salman Ahamed GitHub | LinkedIn | Email |
![]() Eyachir Arafat GitHub | LinkedIn | Portfolio |
![]() Md Amzad Hossain GitHub | LinkedIn | Email |
![]() Hasibul Alam GitHub | LinkedIn | Email |
Check our CONTRIBUTING GUIDE to contribute.
Free to use under MIT License. See the LICENSE file for details.



