https://github.com/nikolailehbrink/retail
Starter template for building full-stack web applications with Remix using Vite, TypeScript, Tailwind CSS, Prettier and ESLint.
https://github.com/nikolailehbrink/retail
eslint fontsource prettier remix tailwindcss typescript vite
Last synced: 10 months ago
JSON representation
Starter template for building full-stack web applications with Remix using Vite, TypeScript, Tailwind CSS, Prettier and ESLint.
- Host: GitHub
- URL: https://github.com/nikolailehbrink/retail
- Owner: nikolailehbrink
- Created: 2024-03-05T10:09:54.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-24T16:55:01.000Z (over 1 year ago)
- Last Synced: 2024-11-29T23:43:15.928Z (over 1 year ago)
- Topics: eslint, fontsource, prettier, remix, tailwindcss, typescript, vite
- Language: TypeScript
- Homepage: https://retail.nikolailehbr.ink/
- Size: 484 KB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- fucking-awesome-vite - ReTail - Starter template for building Full Stack WEB applications with `Remix` using `TypeScript`, `Tailwind CSS`, `Prettier` and `ESLint`. (Get Started / Templates)
- awesome-vite - ReTail - Starter template for building Full Stack WEB applications with `Remix` using `TypeScript`, `Tailwind CSS`, `Prettier` and `ESLint`. (Get Started / Templates)
README
A refined React Router starter template with improved defaults for building full-stack web applications.
Why ·
Features ·
Development ·
Deployment
## Why
When I first started using `Remix`, the predecessor to `React Router 7`, I worked with the [official `Remix` template with `Vite`](https://github.com/remix-run/remix/tree/main/templates/remix). However, it lacked built-in support for `Tailwind CSS`, requiring me to manually install and configure it for every new project. To simplify this setup, I created my own starter template: **ReTail** (`Remix`/`React Router` + `Tailwind CSS`).
Since then, the official `Remix` template has added `Tailwind CSS` support, and `React Router 7` has been released. Despite these updates, I continue to maintain ReTail because I think it provides better defaults than the default template, includes `ESLint 9`, and integrates useful utilities that improve the development experience.
## Features
- **Automatic class name wrapping** – Keeps long class names readable using [`prettier-plugin-classnames`](https://www.npmjs.com/package/prettier-plugin-classnames).
- **Automatic class sorting** – Ensures consistent class order with [`prettier-plugin-tailwindcss`](https://tailwindcss.com/blog/automatic-class-sorting-with-prettier).
- **ESLint 9** – Maintains code quality with ESLint and the [ESLint Config Inspector](https://eslint.org/blog/2024/04/eslint-config-inspector/).
- **Font optimization** – Preloads local fonts efficiently with [Fontsource](https://fontsource.org/).
- **React Router 7** – The latest version of React Router, paired with Vite for instant server start, fast HMR, and optimized full-stack builds.
- **Remove unused code** – Detect and remove unused code with [Knip](https://www.npmjs.com/package/knip).
- **Tailwind CSS 4** – Build UIs faster with the utility-first CSS framework and its new CSS-first configuration.
- **TypeScript** – Provides type safety and autocompletion for a better developer experience.
- **Vite 6** – A pretty fast frontend build tool that delivers instant code serving and optimized bundling.
## Helpful Scripts
> [!TIP]
> Use any package manager you prefer, such as `npm` or `yarn`, instead of `pnpm`.
- **`pnpm check:unused`**: Find unused code in your project with [Knip](https://www.npmjs.com/package/knip).
- **`pnpm clean`**: Remove the `node_modules` directory.
- **`pnpm format`**: Format all your files with Prettier.
- **`pnpm lint`**: Lint your code with ESLint.
- **`pnpm lint:inspect`**: Inspect your ESLint configuration with the ESLint Config Inspector.
- **`pnpm start`**: Run the app locally in production mode.
- **`pnpm typecheck`**: Generate TypeScript types for your app.
## Development
Run the Vite dev server:
```shellscript
pnpm dev
```
This will automatically open the app in your default browser and expose the host IP to your network, enabling better testing on devices like smartphones.
## Deployment
First, build your app for production:
```sh
pnpm build
```
Then run the app in production mode:
```sh
pnpm start
```
Now you'll need to pick a host to deploy it to.