Skip to content

Commit 04431ae

Browse files
committed
initial-commit
1 parent 8170044 commit 04431ae

40 files changed

+6858
-0
lines changed

Diff for: .gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

Diff for: README.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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.

Diff for: components.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.js",
8+
"css": "src/index.css",
9+
"baseColor": "slate",
10+
"cssVariables": true
11+
},
12+
"aliases": {
13+
"components": "@/components",
14+
"utils": "@/lib/utils"
15+
}
16+
}

Diff for: index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>React Shadcn Starter</title>
8+
</head>
9+
<body class="min-h-screen">
10+
<div id="root" class="relative flex min-h-screen flex-col"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)