https://github.com/john-data-chen/rsbuild-template
This is a demo project by newer and faster tools such as Rsbuild and oxlint.
https://github.com/john-data-chen/rsbuild-template
oxc oxlint rsbuild
Last synced: 11 months ago
JSON representation
This is a demo project by newer and faster tools such as Rsbuild and oxlint.
- Host: GitHub
- URL: https://github.com/john-data-chen/rsbuild-template
- Owner: john-data-chen
- Created: 2025-07-01T06:14:19.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T02:11:42.000Z (11 months ago)
- Last Synced: 2025-07-27T14:18:11.393Z (11 months ago)
- Topics: oxc, oxlint, rsbuild
- Language: TypeScript
- Homepage:
- Size: 154 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dashboard Template
This is a demo project using Rsbuild and oxlint.
## Basic Features
- Display loading before API response
- The API responds successfully and updates the screen
- Use the previously cached data to display the screen, and re-get the API response, and update the screen after the API response
- Use the previously cached data to display the screen and will not re-get the API response
## 🚀 Getting Started
### Requirements
- [Node.JS](https://nodejs.org/en/download/) v22.x, please use [NVM](https://github.com/nvm-sh/nvm) or [FNM](https://github.com/Schniz/fnm) to install
- [PNPM](https://pnpm.io/) 10.x
### Useful Commands
```bash
# Install dependencies
pnpm install
# Start mock api server
pnpm mock-api
# Start development server
pnpm dev
# ESLint fix
pnpm lint
# Format code
pnpm format
# Build
pnpm build
```
### Project Structure
```text
.husky/ # Husky configuration
src/
├── components/ # Reusable React components, DataFetcher is the answer of Q4
│ └── ui/ # Shadcn UI components
├── constants/ # Application-wide constants
├── lib/
│ └── utils.ts # tailwindcss utils
├── providers/ # react query providers
├── types/ # Type definitions
├── App.tsx # Root component
├── global.css # Global styles
└── index.tsx # Entry point
mock-api.json # mock api by json-server
```
### Improvements in Future
- Refactor the code to make it more maintainable
- Add unit tests by Vitest
- CICD