Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 60 additions & 1 deletion client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"dependencies": {
"react": "^19.2.0",
"react-dom": "^19.2.0"
"react-dom": "^19.2.0",
"react-router-dom": "^7.13.1"
},
"devDependencies": {
"@eslint/js": "^9.39.1",
Expand Down
80 changes: 51 additions & 29 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,57 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import Header from './components/layout/Header';
import Footer from './components/layout/Footer';
import Home from './pages/Home';
import Login from './pages/Login';
import Register from './pages/Register';
import Dashboard from './pages/Dashboard';

function App() {
const [count, setCount] = useState(0)

return (
<>
<div>
<a href="https://vite.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
<BrowserRouter>
<div style={appStyle}>
{/* Header appears on all pages */}
<Header />

{/* Main content area */}
<main style={mainStyle}>
<Routes>
{/* Define your routes here */}
<Route path="/" element={<Home />} />
<Route path="/login" element={<Login />} />
<Route path="/register" element={<Register />} />
<Route path="/dashboard" element={<Dashboard />} />

{/* 404 Page - catches all unmatched routes */}
<Route path="*" element={<NotFound />} />
</Routes>
</main>

{/* Footer appears on all pages */}
<Footer />
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
)
</BrowserRouter>
);
}

export default App
// Simple 404 component
const NotFound = () => {
return (
<div style={{ textAlign: 'center', padding: '4rem' }}>
<h1>404 - Page Not Found</h1>
<p>The page you're looking for doesn't exist.</p>
</div>
);
};

const appStyle = {
display: 'flex',
flexDirection: 'column',
minHeight: '100vh',
};

const mainStyle = {
flex: 1,
};

export default App;
26 changes: 26 additions & 0 deletions client/src/components/layout/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const Footer = () => {
return (
<footer style={footerStyle}>
<div style={containerStyle}>
<p>&copy; 2024 {/* YOUR PLATFORM NAME */}. All rights reserved.</p>
<p>Built by {/* YOUR NAME */}</p>
</div>
</footer>
);
};

const footerStyle = {
backgroundColor: '#333',
color: 'white',
padding: '2rem 0',
marginTop: 'auto',
textAlign: 'center',
};

const containerStyle = {
maxWidth: '1200px',
margin: '0 auto',
padding: '0 2rem',
};

export default Footer;
57 changes: 57 additions & 0 deletions client/src/components/layout/Header.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { Link } from 'react-router-dom';

const Header = () => {
return (
<header style={headerStyle}>
<div style={containerStyle}>
{/* Logo/Brand Name */}
<h1 style={logoStyle}>
<Link to="/" style={linkStyle}>
{/* YOUR PLATFORM NAME HERE */}
</Link>
</h1>

{/* Navigation Links */}
<nav>
<Link to="/" style={navLinkStyle}>Home</Link>
<Link to="/login" style={navLinkStyle}>Login</Link>
<Link to="/register" style={navLinkStyle}>Register</Link>
</nav>
</div>
</header>
);
};

// Basic inline styles (you can move these to CSS later)
const headerStyle = {
backgroundColor: '#333',
color: 'white',
padding: '1rem 0',
};

const containerStyle = {
maxWidth: '1200px',
margin: '0 auto',
padding: '0 2rem',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
};

const logoStyle = {
margin: 0,
fontSize: '1.5rem',
};

const linkStyle = {
color: 'white',
textDecoration: 'none',
};

const navLinkStyle = {
color: 'white',
textDecoration: 'none',
marginLeft: '2rem',
};

export default Header;
77 changes: 20 additions & 57 deletions client/src/index.css
Original file line number Diff line number Diff line change
@@ -1,68 +1,31 @@
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;

color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

font-synthesis: none;
text-rendering: optimizeLegibility;
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: #f8f9fa;
}

a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}

body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
h1, h2, h3, h4, h5, h6 {
margin-bottom: 0.5rem;
}

h1 {
font-size: 3.2em;
line-height: 1.1;
p {
margin-bottom: 1rem;
}

button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
a {
color: #007bff;
text-decoration: none;
}

@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}
a:hover {
text-decoration: underline;
}
Loading