Home page#1
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an initial “Sentinel AI” home/landing experience, including both a Vite+React SPA (with a basic dashboard route) and a standalone static HTML version, along with a detailed project/architecture README to frame the intended product.
Changes:
- Added a comprehensive README describing the conceptual architecture, frontend flows, and demo plan.
- Introduced a Vite + React + React Router frontend with Landing/Dashboard pages and shared UI components/styles.
- Added a standalone static landing page + dashboard HTML, served via a small Node static server.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds product/architecture blueprint and demo/stack notes for the project. |
| Frontend/vite.config.js | Adds Vite config (including explicit dev server port). |
| Frontend/package.json | Defines frontend dependencies and scripts (Vite dev/build + static serve). |
| Frontend/index.html | Adds SPA entrypoint for the Vite/React app. |
| Frontend/src/main.jsx | Boots the React app with BrowserRouter. |
| Frontend/src/App.jsx | Defines routes for Landing and Dashboard. |
| Frontend/src/pages/Landing.jsx | Implements landing page with a simulated connect/loading flow. |
| Frontend/src/pages/Dashboard.jsx | Adds a simple simulated dashboard UI. |
| Frontend/src/components/Hero.jsx | Adds hero section UI used on the landing page. |
| Frontend/src/components/Loading.jsx | Adds full-screen loading overlay component. |
| Frontend/src/styles.css | Provides base styling for landing/dashboard components. |
| Frontend/static.html | Adds a standalone static “home page” implementation (large inline CSS/JS). |
| Frontend/dashboard.html | Adds a standalone static dashboard page for the static server path. |
| Frontend/server.js | Adds a minimal Node server to serve the static HTML pages and assets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+35
to
+48
| const urlPath = decodeURIComponent((req.url || '/').split('?')[0]) | ||
|
|
||
| if (urlPath === '/' || urlPath === '/index.html') { | ||
| sendFile(path.join(root, 'static.html'), res) | ||
| return | ||
| } | ||
|
|
||
| if (urlPath === '/dashboard' || urlPath === '/dashboard.html') { | ||
| sendFile(path.join(root, 'dashboard.html'), res) | ||
| return | ||
| } | ||
|
|
||
| const safePath = path.normalize(urlPath).replace(/^([.][.][/\\])+/, '') | ||
| sendFile(path.join(root, safePath), res) |
| const fs = require('fs') | ||
| const path = require('path') | ||
|
|
||
| const port = process.env.PORT ? Number(process.env.PORT) : 5173 |
Comment on lines
+51
to
+53
| server.listen(port, '127.0.0.1', () => { | ||
| console.log(`Sentinel AI static server running at http://127.0.0.1:${port}`) | ||
| }) |
Comment on lines
+1
to
+17
| import React, { useState } from 'react' | ||
| import { useNavigate } from 'react-router-dom' | ||
| import Hero from '../components/Hero' | ||
| import Loading from '../components/Loading' | ||
|
|
||
| export default function Landing() { | ||
| const navigate = useNavigate() | ||
| const [loading, setLoading] = useState(false) | ||
|
|
||
| function handleConnect() { | ||
| setLoading(true) | ||
| // simulate elegant 2s loading | ||
| setTimeout(() => { | ||
| setLoading(false) | ||
| navigate('/dashboard') | ||
| }, 2000) | ||
| } |
Owner
Author
|
cmd /c "cd /d C:\Users\dell\Desktop\Metamask\Frontend & C:\nvm4w\nodejs\node.exe server.js" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.