+ )
+}
\ No newline at end of file
diff --git a/src/layout/empty-layout/index.tsx b/src/layout/empty-layout/index.tsx
new file mode 100644
index 0000000..9b51dfb
--- /dev/null
+++ b/src/layout/empty-layout/index.tsx
@@ -0,0 +1,13 @@
+import { Outlet } from "react-router-dom"
+
+/**
+ * Empty layout component that provides minimal structure.
+ * Useful for pages that need full control over their layout.
+ */
+export default function EmptyLayout() {
+ return (
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/main.tsx b/src/main.tsx
index 319db61..fb4f525 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,21 +1,19 @@
import { StrictMode } from "react"
import { createRoot } from "react-dom/client"
import { Provider } from "react-redux"
-import { BrowserRouter, Route, Routes } from "react-router"
+import { RouterProvider } from "react-router-dom"
import store from "@/store"
+import router from "@/router"
import "./index.css"
-import ProtectedRoute from "@/components/protected-route"
+/**
+ * Main application entry point.
+ * Sets up the React app with Redux store and React Router.
+ */
createRoot(document.getElementById("root")!).render(
-
-
- }>
-
-
-
-
+ ,
)
diff --git a/src/page/about/index.tsx b/src/page/about/index.tsx
new file mode 100644
index 0000000..6cf33d9
--- /dev/null
+++ b/src/page/about/index.tsx
@@ -0,0 +1,110 @@
+/**
+ * About page component that displays information about the application.
+ */
+export default function About() {
+ return (
+
+ {/* Page Header */}
+
+
+ About This Template
+
+
+ Learn more about the technologies and architecture behind this React Router template.
+
+
+
+ {/* Content Sections */}
+
+ {/* Technology Stack */}
+
+
+ Technology Stack
+
+
+
+
+ React 19 - Latest version with modern features
+
+
+
+ TypeScript - Type-safe development
+
+
+
+ React Router v7 - Client-side routing
+
+
+
+ Tailwind CSS - Utility-first styling
+
+
+
+ Redux Toolkit - State management
+
+
+
+ Vite - Fast build tool and dev server
+
+
+
+
+ {/* Features */}
+
+
+ Key Features
+
+
+
+
+ Modern React Router implementation
+
+
+
+ Protected routes with authentication
+
+
+
+ Error boundary and error pages
+
+
+
+ Responsive design with Tailwind
+
+
+
+ TypeScript for type safety
+
+
+
+ ESLint and Prettier configuration
+
+
+
+
+
+ {/* Architecture Overview */}
+
+
+ Architecture Overview
+
+
+
+ This template follows modern React development practices with a clear separation of concerns:
+
+
+
Components: Reusable UI components organised by feature
+
Pages: Route-level components that represent different views
+
Layouts: Wrapper components that provide consistent structure
+
Store: Redux Toolkit slices for state management
+
Router: Centralised routing configuration
+
+
+ The routing system uses React Router's latest data router approach with createBrowserRouter,
+ providing better performance and developer experience compared to the legacy BrowserRouter approach.
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/page/contact/index.tsx b/src/page/contact/index.tsx
new file mode 100644
index 0000000..747e3fa
--- /dev/null
+++ b/src/page/contact/index.tsx
@@ -0,0 +1,171 @@
+import React from "react"
+
+/**
+ * Contact page component that displays contact information and a contact form.
+ */
+export default function Contact() {
+ const handleSubmit = (e: React.FormEvent) => {
+ e.preventDefault()
+ // Handle form submission logic here
+ alert("Thank you for your message! This is a demo form.")
+ }
+
+ return (
+
+ {/* Page Header */}
+
+
+ Get in Touch
+
+
+ Have questions about this template? We'd love to hear from you.
+
+ )
+}
\ No newline at end of file
diff --git a/src/page/home/index.tsx b/src/page/home/index.tsx
new file mode 100644
index 0000000..b86cad1
--- /dev/null
+++ b/src/page/home/index.tsx
@@ -0,0 +1,140 @@
+import { Link } from "react-router-dom"
+
+/**
+ * Home page component that displays the main landing content.
+ */
+export default function Home() {
+ return (
+
+ {/* Hero Section */}
+
+
+ Welcome to OnixByte React Template
+
+
+ A modern React application template with TypeScript, Tailwind CSS,{" "}
+ Redux, and React Router for seamless navigation.
+
+
+
+ {/* Features Grid */}
+
+
+ {/* Feature 1 */}
+
+
+
+
+
+
+
+
Fast Development
+
+
+
+
+ Built with Vite for lightning-fast development experience and hot module
+ replacement.
+
+
+
+
+
+ {/* Feature 2 */}
+
+
+
+
+
+
+
+
Type Safety
+
+
+
+
+ Full TypeScript support with strict type checking for better code quality and
+ developer experience.
+
+
+
+
+
+ {/* Feature 3 */}
+
+
+
+
+
+
+
+
Modern Styling
+
+
+
+
+ Tailwind CSS for utility-first styling with responsive design and modern UI
+ components.
+
+
+
+
+
+
+
+ {/* Call to Action */}
+
+
Ready to start building?
+
+ Explore the navigation above to see React Router in action, or check out the source code
+ to understand the implementation.
+
+
+
+ Learn More
+
+
+ Get in Touch
+
+
+
+
+ )
+}
diff --git a/src/router/index.tsx b/src/router/index.tsx
new file mode 100644
index 0000000..96ea9e9
--- /dev/null
+++ b/src/router/index.tsx
@@ -0,0 +1,34 @@
+import { createBrowserRouter } from "react-router-dom"
+import App from "@/App"
+import ErrorPage from "@/components/error-page"
+import HomePage from "@/page/home"
+import AboutPage from "@/page/about"
+import ContactPage from "@/page/contact"
+
+/**
+ * Main application router configuration using React Router v6.
+ * Defines all routes and their corresponding components.
+ */
+const router = createBrowserRouter([
+ {
+ path: "/",
+ element: ,
+ errorElement: ,
+ children: [
+ {
+ index: true,
+ element: ,
+ },
+ {
+ path: "about",
+ element: ,
+ },
+ {
+ path: "contact",
+ element: ,
+ },
+ ],
+ },
+])
+
+export default router