feat: Initialize dashboard app with core structure and routing

This commit sets up the foundation for the new dashboard application by
implementing the main component structure, routing, and a basic UI shell with
KendoReact components.

- Set up the main application shell
- Implement a routing system with React Router
- Build a new App Bar component
- Create page placeholders for all routes
- Corrected various import and export errors
This commit is contained in:
2025-09-14 22:38:07 -05:00
parent ebb211abdb
commit 0ce04fb7ac
9 changed files with 151 additions and 39 deletions

56
package-lock.json generated
View File

@@ -28,7 +28,8 @@
"@progress/kendo-theme-default": "^12.0.1", "@progress/kendo-theme-default": "^12.0.1",
"campfire-logs-dashboard": "file:./campfire-logs-dashboard", "campfire-logs-dashboard": "file:./campfire-logs-dashboard",
"react": "^19.1.1", "react": "^19.1.1",
"react-dom": "^19.1.1" "react-dom": "^19.1.1",
"react-router-dom": "^7.9.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.33.0", "@eslint/js": "^9.33.0",
@@ -2371,6 +2372,15 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/cookie": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz",
"integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/cross-spawn": { "node_modules/cross-spawn": {
"version": "7.0.6", "version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
@@ -3784,6 +3794,44 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/react-router": {
"version": "7.9.1",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.9.1.tgz",
"integrity": "sha512-pfAByjcTpX55mqSDGwGnY9vDCpxqBLASg0BMNAuMmpSGESo/TaOUG6BllhAtAkCGx8Rnohik/XtaqiYUJtgW2g==",
"license": "MIT",
"dependencies": {
"cookie": "^1.0.1",
"set-cookie-parser": "^2.6.0"
},
"engines": {
"node": ">=20.0.0"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
}
}
},
"node_modules/react-router-dom": {
"version": "7.9.1",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.9.1.tgz",
"integrity": "sha512-U9WBQssBE9B1vmRjo9qTM7YRzfZ3lUxESIZnsf4VjR/lXYz9MHjvOxHzr/aUm4efpktbVOrF09rL/y4VHa8RMw==",
"license": "MIT",
"dependencies": {
"react-router": "7.9.1"
},
"engines": {
"node": ">=20.0.0"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
}
},
"node_modules/react-transition-group": { "node_modules/react-transition-group": {
"version": "4.4.5", "version": "4.4.5",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz",
@@ -3888,6 +3936,12 @@
"semver": "bin/semver.js" "semver": "bin/semver.js"
} }
}, },
"node_modules/set-cookie-parser": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz",
"integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==",
"license": "MIT"
},
"node_modules/shebang-command": { "node_modules/shebang-command": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",

View File

@@ -28,9 +28,10 @@
"@progress/kendo-react-progressbars": "^12.0.1", "@progress/kendo-react-progressbars": "^12.0.1",
"@progress/kendo-react-tooltip": "^12.0.1", "@progress/kendo-react-tooltip": "^12.0.1",
"@progress/kendo-theme-default": "^12.0.1", "@progress/kendo-theme-default": "^12.0.1",
"campfire-logs-dashboard": "file:./campfire-logs-dashboard",
"react": "^19.1.1", "react": "^19.1.1",
"react-dom": "^19.1.1", "react-dom": "^19.1.1",
"campfire-logs-dashboard": "file:./campfire-logs-dashboard" "react-router-dom": "^7.9.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.33.0", "@eslint/js": "^9.33.0",

View File

@@ -1,35 +1,15 @@
import { useState } from 'react' import React from 'react';
import reactLogo from './assets/react.svg' import AppRoutes from './routes/AppRoutes';
import viteLogo from '/vite.svg' import CampfireAppBar from './components/AppBar';
import './App.css'
function App() { function App() {
const [count, setCount] = useState(0)
return ( return (
<> <div>
<div> <CampfireAppBar />
<a href="https://vite.dev" target="_blank"> <AppRoutes />
<img src={viteLogo} className="logo" alt="Vite logo" /> </div>
</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>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
)
}
export default App };
export default App;

View File

@@ -0,0 +1,27 @@
import React from 'react';
import { AppBar, AppBarSection, AppBarSpacer } from '@progress/kendo-react-layout';
import { Button } from '@progress/kendo-react-buttons';
import { Link } from 'react-router-dom';
const CampfireAppBar = () => {
return (
<AppBar position="sticky">
<AppBarSection>
<Link to="/dashboard">
<Button look="flat">Dashboard</Button>
</Link>
<Link to="/editor">
<Button look="flat">New Post</Button>
</Link>
</AppBarSection>
<AppBarSpacer style={{width: 32 }} />
<AppBarSection>
<Button look="flat">Logout</Button>
</AppBarSection>
</AppBar>
);
};
export default CampfireAppBar;

View File

@@ -1,11 +1,14 @@
import { StrictMode } from 'react' import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client' import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import 'campfire-logs-dashboard/dist/css/campfire-logs-dashboard.css'; import 'campfire-logs-dashboard/dist/css/campfire-logs-dashboard.css';
import './index.css' import './index.css';
import App from './App.jsx' import App from './App.jsx';
createRoot(document.getElementById('root')).render( createRoot(document.getElementById('root')).render(
<StrictMode> <StrictMode>
<App /> <BrowserRouter>
<App />
</BrowserRouter>
</StrictMode>, </StrictMode>,
) );

View File

@@ -0,0 +1,9 @@
import React from 'react';
const Dashboard = () => {
return (
<h1>This is the Dashboard Page</h1>
);
};
export default Dashboard;

View File

@@ -0,0 +1,9 @@
import React from 'react';
const EditorPage = () => {
return (
<h1>This is the Editor Page</h1>
);
};
export default EditorPage;

View File

@@ -0,0 +1,9 @@
import React from 'react';
const NotFound = () => {
return (
<h1>404: Page Not Found</h1>
);
};
export default NotFound;

View File

@@ -0,0 +1,20 @@
import React from 'react'
import { Routes, Route } from 'react-router-dom';
import Dashboard from '../pages/Dashboard';
import EditorPage from '../pages/EditorPage';
import NotFound from '../pages/NotFound';
const AppRoutes = () => {
return (
<Routes>
<Route path="/" element={<Dashboard />} />
<Route path="/dashboard" element={<Dashboard />} />
<Route path="/editor" element={<EditorPage />} />
<Route path="*" element={<NotFound />} />
</Routes>
);
};
export default AppRoutes;