next-start-cli
Version:
This is a CLI tool to create a nextjs project and add the necessary dependencies and configurations
94 lines (66 loc) • 2.17 kB
Markdown
# Next Start CLI
A CLI tool to quickly create and set up Next.js projects with shadcn/ui components.
## Features
- Creates a new Next.js project with TypeScript, Tailwind CSS, and ESLint
- Initializes and configures shadcn/ui
- Option to add common shadcn/ui components
- Optional admin dashboard setup with pre-configured components:
- Sidebar navigation
- Login page
## Installation
```sh
npm install -g next-start-cli
```
## Usage
Run the CLI:
```sh
next-start-cli
```
With admin dashboard:
```sh
next-start-cli --admin
```
with unit and e2e test framework setup:
```sh
next-start-cli --tests
```
Without git committing changes made by CLI tool:
```sh
next-start-cli --no-git
```
Note:
#### Use ```--no-git``` when testing locally for development
<br>
The CLI will guide you through:
- Project name selection
- Next.js version selection
- shadcn/ui theme configuration
- Component installation
After creating the project, use `src/data/routes` file and modify the routes as the project requires. All the routes related to the admin dashboard, navbar, and footer routes can be found there.
Then use `src/data/brand.ts` file to modify project details such as project name, logo, and other related data.
## Project Structure
The generated project includes:
```
my-app/
├── src/
│ ├── app/
│ │ ├── dashboard/ # Admin dashboard (if --admin flag used)
│ │ └── login/ # Login page (if --admin flag used)
│ └── components/
│ └── ui/ # shadcn/ui components
```
## Options
- `--admin` or `-a`: Includes admin dashboard components. To remove the mock API, delete the `src/app/(server)` folder and remove `bcrypt` and `nedb` dependencies along with their types using the following command:
```sh
rm -rf "src/app/(server)" "data.db" && yarn remove bcrypt nedb @types/bcrypt @types/nedb
```
- `--tests` or `-t`: Adds testing frameworks to your project:
- Jest for unit testing
- Cypress for end-to-end testing
- Testing utilities for React components
- `--no-git`: Skip changes committing in CLI tool
## Development
## License
ISC
## Author
Yasith Silva