@rachitbharadwaj/create-next-app
v2.2.0
Published
A CLI tool to create and configure a Next.js project with custom setup.
Downloads
143
Maintainers
Readme
@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 dev
Open 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
.git
folder: Allows you to initialize your own Git repository.
Customization
Predefined Configurations:
Tailwind CSS:
- Fully customized
tailwind.config.ts
for 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 theapp
directory with:layout.tsx
: Default layout for your pages.page.tsx
: Starter page with placeholder content.
- Adds a
Global Metadata:
- Configures
Outfit
font with preloaded subsets and weights. You can customize your font preferences in thelayout.tsx
file. - 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 configuration
Contributing
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-app
setup fails, ensure you have the latest version of Node.js installed. - Run
npm install
to ensure all dependencies are installed correctly.
Happy coding! 🚀