Skip to content

Commit 9401061

Browse files
committed
initial commit
1 parent 4f13bb1 commit 9401061

39 files changed

+826
-146
lines changed

.env.dist

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_BACKEND_ENDPOINT=https://localhost:3001

.eslintrc.cjs

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ module.exports = {
2222
'@typescript-eslint/no-unsafe-argument': 'off',
2323
'@typescript-eslint/no-unsafe-call': 'off',
2424
'@typescript-eslint/no-unsafe-assignment': 'off',
25+
'@typescript-eslint/no-unsafe-return':'off',
26+
'@typescript-eslint/no-floating-promises':'off',
27+
'@typescript-eslint/no-misused-promises':'off',
2528
'react-refresh/only-export-components': [
2629
'warn',
2730
{allowConstantExport: true},

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
.env

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 behcet ilhan
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+72-21
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,81 @@
1-
# React + TypeScript + Vite
21

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
42

5-
Currently, two official plugins are available:
3+
<div style="display: flex; gap: 8px">
4+
<img src="/public/rrLogo.png" alt="ReactRover Logo" width=100>
65

7-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
6+
# ReactRover
7+
</div>
98

10-
## Expanding the ESLint configuration
9+
ReactRover aims to ease the initiation phase of any React project, presenting one of many possible solutions to streamline the process. It brings together a selection of tools and libraries—like Vite, Bun, MUI, and Tanstack—that have proven useful in reducing setup times and complexity. This toolkit is offered as a starting point, a way to quickly transition from concept to development, allowing you to focus more on creating and less on configuring.
1110

12-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
1311

14-
- Configure the top-level `parserOptions` property like this:
12+
## What's Included ?
1513

16-
```js
17-
export default {
18-
// other rules...
19-
parserOptions: {
20-
ecmaVersion: 'latest',
21-
sourceType: 'module',
22-
project: ['./tsconfig.json', './tsconfig.node.json'],
23-
tsconfigRootDir: __dirname,
24-
},
25-
}
14+
ReactRover incorporates a carefully curated set of tools and libraries essential for modern React development. Below are the key components included in the toolkit, along with links to their official documentation:
15+
16+
- **[Vite](https://vitejs.dev/)**: A modern frontend build tool that significantly improves the development experience with faster rebuilds and a lot of out-of-the-box features.
17+
- **[Bun](https://bun.sh/)**: A fast all-in-one JavaScript runtime that includes a package manager and bundler.
18+
- **[MUI (Material-UI)](https://mui.com/)**: MUI offers a comprehensive suite of free UI tools to help you ship new features faster. Start with Material UI, our fully-loaded component library, or bring your own design system to our production-ready components.
19+
- **[Tanstack React Router](https://tanstack.com/router/latest)**: A flexible and lightweight routing library for React.
20+
- **[Tanstack Query](https://tanstack.com/query/latest)**: A powerful data fetching and server state management tool in React applications.
21+
- **[Formik](https://formik.org/)**: A small library that helps you with the 3 most annoying parts: getting values in and out of form state, validation and error messages, handling form submission.
22+
- **[i18next](https://www.i18next.com/)**: An internationalization-framework written in and for JavaScript.
23+
- **[React Toastify](https://fkhadra.github.io/react-toastify/)**: Allows you to add notifications to your app with ease.
24+
- **[Zod](https://zod.dev/)**: TypeScript-first schema validation with static type inference.
25+
- **[Axios](https://axios-http.com/)**: Promise based HTTP client for the browser and node.js.
26+
- **[Axios Auth Refresh](https://www.npmjs.com/package/axios-auth-refresh)**: A small library that intercepts failed requests and retries them after refreshing an auth token.
27+
28+
29+
Additionally, ReactRover supports built-in theme toggling for dark and light modes, as well as language switching capabilities, enhancing usability and customization for a diverse user base.
30+
31+
32+
## Prerequisites
33+
34+
Before installing ReactRover, ensure that your system meets the following requirements:
35+
- **Node.js**: You'll need [Node.js](https://nodejs.org/) version 16 or newer installed on your system.
36+
- **Bun**: [Bun](https://bun.sh/) is crucial for some of ReactRover's build processes. Ensure it is installed on your system.
37+
- **HTTPS Local Development**: For integration with the Mock Server, setting up HTTPS for local development is recommended. Tools like [mkcert](https://github.com/FiloSottile/mkcert) can assist in managing local certificates
38+
39+
## Installation & Usage
40+
41+
```sh
42+
git clone https://github.com/behcetilhan/reactrover.git reactrover
43+
cd reactrover
44+
bun install
2645
```
2746

28-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29-
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30-
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
47+
Create `.env` file in root directory with `VITE_BACKEND_ENDPOINT` defined. For [Testing Server](https://github.com/behcetilhan/mock-auth), you can use the port defined in `.env.dist`.
48+
49+
```sh
50+
bun run dev
51+
```
52+
53+
## Tool for Testing
54+
55+
### Dedicated Mock Server for Authentication and Authorization
56+
57+
For an optimal testing experience with ReactRover, you can use this simple mock server. This server is specifically designed to complement ReactRover by providing a minimalistic backend environment for authentication and authorization. By using this server, you can effectively test secure login flows, token refresh mechanisms, and access controls as implemented in ReactRover.
58+
59+
**Key features include**:
60+
- JWT-based authentication and HttpOnly cookie management.
61+
- Secure refresh token implementation for maintaining sessions.
62+
- HTTPS and HTTP configurations.
63+
- Pre-configured protected routes to simulate access control.
64+
65+
For detailed setup instructions and how to integrate this server with ReactRover, please visit the [Testing Server](https://github.com/behcetilhan/mock-auth).
66+
67+
### Please Note!
68+
If you are planning to use the test server with HTTP, don't forget to update the `VITE_BACKEND_ENDPOINT` in `.env` file
69+
70+
71+
## Some upcoming features
72+
73+
- vitest implementation
74+
- SSO integration
75+
- RTL support
76+
- [Tanstack Table](https://tanstack.com/table/latest) integration
77+
- [React Charts](https://react-charts.tanstack.com/) integration
78+
- [React Select](https://react-select.com) integration
79+
- Basic mui grid,container and drawer examples
80+
- Support for [Tailwind](https://tailwindcss.com/)
81+
- Configuration support for customizable boilerplate, like enabling/disabling third party packages as i18Next or Axios

bun.lockb

23.5 KB
Binary file not shown.

index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/svg+xml" href="/favico.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React + TS</title>
7+
<title>ReactRover</title>
88
</head>
99
<body>
10-
<div id="app"></div>
10+
<div id="appRoot"></div>
1111
<script type="module" src="/src/main.tsx"></script>
1212
</body>
1313
</html>

package.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "reactrover",
33
"private": true,
4-
"version": "0.1.0",
4+
"version": "1.0.0",
55
"type": "module",
66
"scripts": {
77
"dev": "bunx --bun vite --host",
@@ -10,6 +10,11 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13+
"@emotion/react": "^11.11.4",
14+
"@emotion/styled": "^11.11.5",
15+
"@fontsource/roboto": "^5.0.12",
16+
"@mui/icons-material": "^5.15.15",
17+
"@mui/material": "^5.15.15",
1318
"@tanstack/react-query": "^5.28.14",
1419
"@tanstack/react-router": "^1.26.7",
1520
"axios": "^1.6.8",
@@ -18,14 +23,19 @@
1823
"eslint-plugin-prettier": "^5.1.3",
1924
"eslint-plugin-react": "^7.34.1",
2025
"formik": "^2.4.5",
26+
"i18next": "^23.11.1",
27+
"install": "^0.13.0",
2128
"react": "^18.2.0",
2229
"react-dom": "^18.2.0",
30+
"react-i18next": "^14.1.0",
31+
"react-toastify": "^10.0.5",
2332
"zod": "^3.22.4",
2433
"zod-formik-adapter": "^1.3.0"
2534
},
2635
"devDependencies": {
2736
"@tanstack/router-devtools": "^1.26.7",
2837
"@tanstack/router-vite-plugin": "^1.26.6",
38+
"@types/bun": "^1.1.0",
2939
"@types/react": "^18.2.66",
3040
"@types/react-dom": "^18.2.22",
3141
"@typescript-eslint/eslint-plugin": "^7.2.0",

public/favico.svg

+63
Loading

public/rrLogo.png

35.5 KB
Loading

0 commit comments

Comments
 (0)