Skip to content

Commit

Permalink
core: update
Browse files Browse the repository at this point in the history
  • Loading branch information
vgseven committed Sep 6, 2024
1 parent 180fff2 commit d21054d
Show file tree
Hide file tree
Showing 18 changed files with 2,943 additions and 210 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,24 @@ jobs:
uses: actions/checkout@v4

- name: Set up Node.js
uses: oven-sh/setup-bun@v2
uses: actions/setup-node@v4
with:
bun-version: "latest"
node-version: "20"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: bun install
run: pnpm install

- name: Performing Type Check
run: bun run type-check
run: pnpm run typecheck

- name: Performing Lint
run: bun run lint
run: pnpm run lint

- name: Performing Format
run: bun run format
run: pnpm run format

- name: Performing Build
run: bun run build
run: pnpm run build
8 changes: 4 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bun run type-check
bun run lint
bun run format
bun run build
pnpm run typecheck
pnpm run lint
pnpm run format
pnpm run build
6 changes: 0 additions & 6 deletions .vscode/extension.json

This file was deleted.

40 changes: 20 additions & 20 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
}
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
108 changes: 52 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,67 @@
# React Essential
# Unified Starter - React Essential

An Essential Template to build an Modern React.js application with all the essentials included.
Unified Starter - React Essential is a modern, feature-rich template for building React applications with all the essential configurations and tools pre-configured.

## Getting Started

### Prerequisites

React Essential comes with two variants of the template - `main` [branch](https://github.com/radiumlabs/react-essential/tree/main) starter configured with biome.js for linting and formatting and `eslint-prettier` [branch](https://github.com/radiumlabs/react-essential/tree/eslint-prettier) starter configured with prettier and eslint for linting and formatting. Choose the one that suits you best.

### Radium - [Install Radium CLI](https://github.com/radiumlabs/radium) (Recommended)

`radium` is an CLI tool to initialize any project. By using `radium init --with` command, radium will install dependencies, initialize as git repository, and prepare your project for development by cleaning up the project.

```bash
radium init --with
```

and then follow the instructions to enter the name of project and url of this template.

### Manual Installation

You can also manually install the template by cloning the repository and installing the dependencies. But initially you have to clean up the project and then start the development server.

```bash
git clone https://github.com/radiumlabs/react-essential.git
```
## Features

```bash
cd react-essential
```
- ✨ Framework: [React](https://reactjs.org/) with [Vite](https://vitejs.dev/) - Fast and efficient development environment
- 🚀 Styling: [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework
- 💻 Language: [TypeScript](https://www.typescriptlang.org/) - Typed superset of JavaScript
- 🧹 Linting and Formatting: [Biome.js](https://biomejs.dev/) - Fast and customizable linter and formatter
- 🎨 Themes: [Theme Provider](src/lib/theme-provider.tsx) - Easy theme management
- 💄 Icons: [Radix-Icons](https://www.radix-ui.com/icons) - A crisp set of 15×15 icons
- 🎨 UI: [Shadcn UI](https://ui.shadcn.com/) - Re-usable components built with Radix UI and Tailwind CSS
- ⚙️ Build: Github Actions - Automated workflows for CI/CD
- 🛠 Commit: [Husky](https://typicode.github.io/husky/) - Git hooks made easy
- 📦 Package: [pnpm](https://pnpm.io/) - Fast, disk space efficient package manager
- 🚀 Routing: [TanStack Router](https://tanstack.com/router/v1) - Type-safe routing for React

## Project Structure

- `src/`: Source code directory
- `routes/`: Contains all routes and pages
- `ui/`: Contains all reusable components and primitives
- `lib/`: Includes helpers, utilities, and configuration files
- `styles/`: Global styles and theme configuration
- `public/`: Static assets and images

Choose your preferred package manager (PNPM or YARN or BUN or NPM) and install the dependencies but before that, you have to clean up the project such as removing the `.git` folder and `bun.lockb` file.
## Getting Started

```bash
git bash
```
1. Clone the repository
2. Install dependencies: `pnpm install`
3. Run the development server: `pnpm run dev`
4. Open [http://localhost:5173](http://localhost:5173) in your browser

```bash
rm -rf .git bun.lockb
```
## Guidelines

and then install the dependencies by using the package manager of your choice.
- Keep components and primitives in the `src/ui/` folder
- Place all routes and pages in the `src/routes/` folder
- Store helpers, utilities, and configs in the `src/lib/` folder
- Follow the TypeScript and Biome.js linting rules
- Use Husky pre-commit hooks to ensure code quality

```bash
pnpm/yarn/bun/npm install
```
## Customization

```bash
pnpm/yarn/bun/npm run dev
```
- Modify the theme in `tailwind.config.ts`
- Adjust global styles in `src/styles/root-layout.css`
- Configure Vite settings in `vite.config.ts`

### Other Changes
## Available Scripts

If you're using other package manager than `bun` you have to update the scripts in `package.json` file, workflow in `.github/workflows/build.yml` file and husky configuration in `.husky/pre-commit` file.
- `pnpm run dev`: Start the development server
- `pnpm run build`: Build the production-ready application
- `pnpm run typecheck`: Run TypeScript type checking
- `pnpm run lint`: Run Biome.js linter
- `pnpm run format`: Format code using Biome.js

## Features
## Contributing

- ✨ Framework: [React.js](https://reactjs.org/)
- 🚀 Styling: [Tailwind CSS](https://tailwindcss.com/)
- 💻 Language: [TypeScript](https://www.typescriptlang.org/)
- 🧹 Linting and Formatting: [Biome.js](https://biomejs.dev/), [Prettier](https://prettier.io/), [ESLint](https://eslint.org/)
- 🚀 Routing: [Tanstack React Router](https://tanstack.com/router/)
- 🛠 Heading: [Unheaded](https://github.com/unjs/unhead)
- 🎨 Themes: [Next Themes](https://github.com/pacocoursey/next-themes)
- ⚙️ Build: Github Actions
- 🛠 Commit: [Husky](https://typicode.github.io/husky/)
Contributions are welcome! Please follow these steps:

## Contribute
1. Fork the repository
2. Create a new branch: `git checkout -b feature/your-feature-name`
3. Make your changes and commit them: `git commit -m 'Add some feature'`
4. Push to the branch: `git push origin feature/your-feature-name`
5. Submit a pull request

Contributions are always welcome! Please submit a pull request or open an issue to discuss your ideas.
For major changes, please open an issue first to discuss what you would like to change.
Binary file removed bun.lockb
Binary file not shown.
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,36 @@
"build": "tsc -b && vite build",
"lint": "biome lint --write .",
"format": "biome format --write .",
"type-check": "tsc --noEmit",
"clean": "bun rimraf node_modules dist",
"typecheck": "tsc --noEmit",
"prepare": "husky",
"build:prepare": "bun run type-check && bun run lint && bun run format && bun run build"
"build:prepare": "pnpm run typecheck && pnpm run lint && pnpm run format && pnpm run build"
},
"dependencies": {
"@radix-ui/react-icons": "^1.3.0",
"@tanstack/react-router": "^1.48.1",
"@radix-ui/react-label": "^2.1.0",
"@tanstack/react-router": "^1.56.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"next-themes": "^0.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",
"unhead": "^1.9.16"
"unhead": "^1.10.4"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@tanstack/router-plugin": "^1.47.0",
"@tanstack/router-vite-plugin": "^1.47.0",
"@types/node": "^22.4.0",
"@types/react": "^18.3.3",
"@tanstack/router-plugin": "^1.56.1",
"@tanstack/router-vite-plugin": "^1.56.1",
"@types/node": "^22.5.4",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.20",
"husky": "^9.1.4",
"postcss": "^8.4.41",
"rimraf": "^6.0.1",
"husky": "^9.1.5",
"postcss": "^8.4.45",
"tailwindcss": "^3.4.10",
"typescript": "^5.5.4",
"vite": "^5.4.1"
"vite": "^5.4.3"
}
}
Loading

0 comments on commit d21054d

Please sign in to comment.