@rachitbharadwaj/create-next-app v2.2.0
@rachitbharadwaj/create-next-app
A CLI tool to create a fully customized Next.js application quickly and easily. This package sets up a Next.js project preconfigured with Tailwind CSS, Shadcn, TypeScript, and custom folder structures, saving you time and effort.
Opensource Project
Visit the GitHub Repository to access the source code, report issues, or contribute:
If you find this project useful, please βοΈ star the repository:
Table of Contents
Installation
You donβt need to install this tool globally! Use it directly via npx:
npx @rachitbharadwaj/create-next-app <project-name>Replace <project-name> with the desired name for your new application. If no name is provided, it defaults to my-next-app.
Usage
After running the command, follow these steps:
Navigate to your new project directory:
cd <project-name>Start the development server:
npm run devOpen your browser and visit:
http://localhost:3000
Enjoy your ready-to-go Next.js app! π
Features
- Next.js Framework: The latest stable version with best practices.
- TypeScript Support: Preconfigured for type-safe development.
- Tailwind CSS Integration: Styled out of the box with Tailwind CSS.
- Shadcn Integration: Preinstalled Shadcn components with Zinc color and CSS variables enabled.
- Custom Folder Structure: Organized to fit modern development workflows.
- Removed
.gitfolder: Allows you to initialize your own Git repository.
Customization
Predefined Configurations:
Tailwind CSS:
- Fully customized
tailwind.config.tsfor extended screen sizes, colors, and plugins liketailwindcss-animate.
- Fully customized
Shadcn Setup:
- Default styles with Zinc as the base color.
- CSS variables for theming pre-enabled.
Custom Folder Structure:
- Adds a
(main)folder inside theappdirectory with:layout.tsx: Default layout for your pages.page.tsx: Starter page with placeholder content.
- Adds a
Global Metadata:
- Configures
Outfitfont with preloaded subsets and weights. You can customize your font preferences in thelayout.tsxfile. - Sets up a basic metadata template for SEO.
- Configures
Project Structure
Your new Next.js application will have the following structure:
<project-name>
βββ .next/ # Next.js build files
βββ app/ # Application folder
β βββ (main)/ # Main folder for your primary layout and pages
β β βββ layout.tsx # Main layout component
β β βββ page.tsx # Default page component
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout with metadata and global font
βββ components/ # Shared components
βββ constants/ # Application constants
βββ containers/ # Page-specific components
βββ contexts/ # React contexts
βββ lib/ # Utility functions or libraries
βββ node_modules/ # Node dependencies
βββ partials/ # Partial UI components
βββ public/ # Public assets
βββ types/ # TypeScript types
βββ .eslintrc.json # ESLint configuration
βββ .gitignore # Files to ignore in Git
βββ next-env.d.ts # Next.js TypeScript configuration
βββ next.config.ts # Next.js configuration file
βββ package-lock.json # Lockfile for dependencies
βββ package.json # Project metadata and scripts
βββ postcss.config.mjs # PostCSS configuration
βββ README.md # Documentation for the project
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configurationContributing
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b my-feature - Make your changes and commit them:
git commit -m 'Add my feature' - Push your changes to the branch:
git push origin my-feature - Open a pull request for review.
We value your contributions! π οΈ
License
This project is licensed under the MIT License. See the LICENSE file for details.
For any issues or feature requests, please open an issue or contact me at rachit.infornics.com/contact.
Notes
- If the
create-next-appsetup fails, ensure you have the latest version of Node.js installed. - Run
npm installto ensure all dependencies are installed correctly.
Happy coding! π