2.2.0 β€’ Published 1 year ago

@rachitbharadwaj/create-next-app v2.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@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: GitHub stars

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:

  1. Navigate to your new project directory:

    cd <project-name>
  2. Start the development server:

    npm run dev
  3. 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:

  1. Tailwind CSS:

    • Fully customized tailwind.config.ts for extended screen sizes, colors, and plugins like tailwindcss-animate.
  2. Shadcn Setup:

    • Default styles with Zinc as the base color.
    • CSS variables for theming pre-enabled.
  3. Custom Folder Structure:

    • Adds a (main) folder inside the app directory with:
      • layout.tsx: Default layout for your pages.
      • page.tsx: Starter page with placeholder content.
  4. Global Metadata:

    • Configures Outfit font with preloaded subsets and weights. You can customize your font preferences in the layout.tsx file.
    • Sets up a basic metadata template for SEO.

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:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b my-feature
  3. Make your changes and commit them:
    git commit -m 'Add my feature'
  4. Push your changes to the branch:
    git push origin my-feature
  5. 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! πŸš€

2.1.2

1 year ago

2.2.0

1 year ago

2.1.1

1 year ago

2.0.2

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago