|
| 1 | +# React Shadcn Starter |
| 2 | + |
| 3 | +React + Vite + TypeScript template for building apps with shadcn/ui. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +``` |
| 8 | +git clone https://github.com/hayyi2/react-shadcn-starter.git new-project |
| 9 | +cd new-project |
| 10 | +npm install |
| 11 | +npm run dev |
| 12 | +``` |
| 13 | + |
| 14 | +## Getting Done |
| 15 | + |
| 16 | +- [x] Single page app with navigation and responsif layout |
| 17 | + |
| 18 | +- [x] Customable configuration `/config` |
| 19 | + |
| 20 | +- [x] Simple starting page/feature `/pages` |
| 21 | + |
| 22 | +- [x] Github action deploy github pages |
| 23 | + |
| 24 | +## Deploy `gh-pages` |
| 25 | +- change `basenameProd` in `/vite.config.ts` |
| 26 | +- create deploy key `GITHUB_TOKEN` in github `/settings/keys` |
| 27 | +- commit and push changes code |
| 28 | +- setup gihub pages to branch `gh-pages` |
| 29 | +- run action `Build & Deploy` |
| 30 | + |
| 31 | +### Auto Deploy |
| 32 | +- change file `.github/workflows/build-and-deploy.yml` |
| 33 | +- Comment on `workflow_dispatch` |
| 34 | +- Uncomment on `push` |
| 35 | +```yaml |
| 36 | +# on: |
| 37 | +# workflow_dispatch: |
| 38 | +on: |
| 39 | + push: |
| 40 | + branches: ["main"] |
| 41 | +``` |
| 42 | +
|
| 43 | +## Features |
| 44 | +
|
| 45 | +- React + Vite + TypeScript |
| 46 | +- Tailwind CSS |
| 47 | +- [react-router-dom](https://www.npmjs.com/package/react-router-dom) |
| 48 | +- [shadcn-ui](https://github.com/shadcn-ui/ui/) |
| 49 | +- [radix-ui/icons](https://www.radix-ui.com/icons) |
| 50 | +
|
| 51 | +## Project Structure |
| 52 | +
|
| 53 | +``` |
| 54 | +react-shadcn-starter/ |
| 55 | +├── public/ # Public assets |
| 56 | +├── src/ # Application source code |
| 57 | +│ ├── components/ # React components |
| 58 | +│ │ └── ui/ # shadc/ui components |
| 59 | +│ │ └── layouts/ # layouts components |
| 60 | +│ ├── context/ # contexts components |
| 61 | +│ ├── config/ # Config data |
| 62 | +│ ├── hook/ # Custom hooks |
| 63 | +│ ├── lib/ # Utility functions |
| 64 | +│ ├── pages/ # pages/features components |
| 65 | +│ ├── App.tsx # Application entry point |
| 66 | +│ ├── index.tsx # Main rendering file |
| 67 | +│ └── Router.tsx # Routes component |
| 68 | +├── index.html # HTML entry point |
| 69 | +├── postcss.config.js # PostCSS configuration |
| 70 | +├── tailwind.config.js # Tailwind CSS configuration |
| 71 | +├── tsconfig.json # TypeScript configuration |
| 72 | +└── vite.config.ts # Vite configuration |
| 73 | +``` |
| 74 | + |
| 75 | +## License |
| 76 | + |
| 77 | +This project is licensed under the MIT License. See the [LICENSE](https://github.com/hayyi2/react-shadcn-starter/blob/main/LICENSE) file for details. |
0 commit comments