diff --git a/.env.dist b/.env.dist
new file mode 100644
index 0000000..ccd1bc6
--- /dev/null
+++ b/.env.dist
@@ -0,0 +1 @@
+VITE_BACKEND_ENDPOINT=https://localhost:3001
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index f5c4de7..f877798 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -22,6 +22,9 @@ module.exports = {
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
+ '@typescript-eslint/no-unsafe-return':'off',
+ '@typescript-eslint/no-floating-promises':'off',
+ '@typescript-eslint/no-misused-promises':'off',
'react-refresh/only-export-components': [
'warn',
{allowConstantExport: true},
diff --git a/.gitignore b/.gitignore
index a547bf3..7ceb59f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
+.env
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b9c2626
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 behcet ilhan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 0d6babe..cdaf655 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,74 @@
-# React + TypeScript + Vite
-This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
-Currently, two official plugins are available:
+
+
-- [@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
-- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
+# ReactRover
+
-## Expanding the ESLint configuration
+---
-If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
-- Configure the top-level `parserOptions` property like this:
+## Why ?
-```js
-export default {
- // other rules...
- parserOptions: {
- ecmaVersion: 'latest',
- sourceType: 'module',
- project: ['./tsconfig.json', './tsconfig.node.json'],
- tsconfigRootDir: __dirname,
- },
-}
+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.
+
+---
+
+## What's Included ?
+
+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:
+
+- **[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.
+- **[Bun](https://bun.sh/)**: A fast all-in-one JavaScript runtime that includes a package manager and bundler.
+- **[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.
+- **[Tanstack React Router](https://tanstack.com/router/latest)**: A flexible and lightweight routing library for React.
+- **[Tanstack Query](https://tanstack.com/query/latest)**: A powerful data fetching and server state management tool in React applications.
+- **[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.
+- **[i18next](https://www.i18next.com/)**: An internationalization-framework written in and for JavaScript.
+- **[React Toastify](https://fkhadra.github.io/react-toastify/)**: Allows you to add notifications to your app with ease.
+- **[Zod](https://zod.dev/)**: TypeScript-first schema validation with static type inference.
+- **[Axios](https://axios-http.com/)**: Promise based HTTP client for the browser and node.js.
+- **[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.
+
+
+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.
+
+---
+
+## Prerequisites
+
+Before installing ReactRover, ensure that your system meets the following requirements:
+- **Node.js**: You'll need [Node.js](https://nodejs.org/) version 16 or newer installed on your system.
+- **Bun**: [Bun](https://bun.sh/) is crucial for some of ReactRover's build processes. Ensure it is installed on your system.
+- **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
+
+## Installation & Usage
+
+```sh
+git clone https://github.com/behcetilhan/reactrover.git reactrover
+cd reactrover
+bun install
```
-- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
-- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
-- 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
+Create `.env` file in root directory with `VITE_BACKEND_ENDPOINT` defined. For [Testing Server](https://github.com/your-username/mock-server), you can use the port defined in `.env.dist`.
+
+```sh
+bun run dev
+```
+
+---
+
+## Recommended Tool for Testing
+
+### Dedicated Mock Server for Authentication and Authorization
+
+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 and develop secure login flows, token refresh mechanisms, and access controls as implemented in ReactRover.
+
+**Key features include**:
+- JWT-based authentication and HttpOnly cookie management.
+- Secure refresh token implementation for maintaining sessions.
+- HTTPS configuration to ensure encrypted data transmission.
+- Pre-configured protected routes to simulate access control.
+
+For detailed setup instructions and how to integrate this server with ReactRover, please visit the [Testing Server](https://github.com/your-username/mock-server).
diff --git a/bun.lockb b/bun.lockb
index 5e5956e..701161d 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/index.html b/index.html
index 990e82d..d0d9346 100644
--- a/index.html
+++ b/index.html
@@ -2,12 +2,12 @@
-
+
- Vite + React + TS
+ ReactRover
-
+
diff --git a/package.json b/package.json
index 67fb3f4..80a705b 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,11 @@
"preview": "vite preview"
},
"dependencies": {
+ "@emotion/react": "^11.11.4",
+ "@emotion/styled": "^11.11.5",
+ "@fontsource/roboto": "^5.0.12",
+ "@mui/icons-material": "^5.15.15",
+ "@mui/material": "^5.15.15",
"@tanstack/react-query": "^5.28.14",
"@tanstack/react-router": "^1.26.7",
"axios": "^1.6.8",
@@ -18,14 +23,19 @@
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"formik": "^2.4.5",
+ "i18next": "^23.11.1",
+ "install": "^0.13.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
+ "react-i18next": "^14.1.0",
+ "react-toastify": "^10.0.5",
"zod": "^3.22.4",
"zod-formik-adapter": "^1.3.0"
},
"devDependencies": {
"@tanstack/router-devtools": "^1.26.7",
"@tanstack/router-vite-plugin": "^1.26.6",
+ "@types/bun": "^1.1.0",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.2.0",
@@ -35,6 +45,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"typescript": "^5.2.2",
- "vite": "^5.2.0"
+ "vite": "^5.2.0",
+ "vitest": "^1.5.2"
}
}
diff --git a/public/favico.svg b/public/favico.svg
new file mode 100644
index 0000000..e299be6
--- /dev/null
+++ b/public/favico.svg
@@ -0,0 +1,63 @@
+
+
\ No newline at end of file
diff --git a/public/rrLogo.png b/public/rrLogo.png
new file mode 100644
index 0000000..b02c151
Binary files /dev/null and b/public/rrLogo.png differ
diff --git a/public/vite.svg b/public/vite.svg
deleted file mode 100644
index e7b8dfb..0000000
--- a/public/vite.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/App.tsx b/src/App.tsx
new file mode 100644
index 0000000..e39945e
--- /dev/null
+++ b/src/App.tsx
@@ -0,0 +1,8 @@
+import { Router, RouterProvider } from '@tanstack/react-router'
+import { useAppContext } from '@/utils/hooks/useAppContext'
+
+export const App = ({ router }: { router: Router }) => {
+ const auth = useAppContext()
+
+ return
+}
diff --git a/src/components/RootComponent.tsx b/src/components/RootComponent.tsx
new file mode 100644
index 0000000..9de4af7
--- /dev/null
+++ b/src/components/RootComponent.tsx
@@ -0,0 +1,34 @@
+import { ThemeToggler } from '@/components/themeToggler/ThemeToggler'
+import { LanguageToggler } from '@/components/languageToggler/LanguageToggler'
+import { Outlet, useRouter } from '@tanstack/react-router'
+import { Button, Stack } from '@mui/material'
+import { setAuthToken, tokenGlobal } from '@/utils/apiDefaults'
+
+export const RootComponent = () => {
+ const router = useRouter()
+ return (
+