feat(FN-002): complete Step 2 — React Frontend App Skeleton

This commit is contained in:
Fusion
2026-05-14 01:23:01 +02:00
parent d74f77fd33
commit 79203d2f0f
16 changed files with 3175 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
.app {
display: flex;
flex-direction: column;
min-height: 100dvh;
}
.app-header {
padding: 2rem;
text-align: center;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.app-header h1 {
margin: 0;
font-size: 2.5rem;
color: var(--accent);
}
.tagline {
margin: 0.5rem 0 0;
opacity: 0.8;
}
.app-main {
flex: 1;
padding: 2rem;
display: flex;
justify-content: center;
align-items: flex-start;
}
.status-card {
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 0.75rem;
padding: 1.5rem 2rem;
min-width: 280px;
}
.status-card h2 {
margin: 0 0 1rem;
font-size: 1.25rem;
}
.status-row {
display: flex;
justify-content: space-between;
padding: 0.5rem 0;
border-bottom: 1px solid rgba(255,255,255,0.06);
}
.status-row:last-child {
border-bottom: none;
}
.status-label {
opacity: 0.7;
}
.status-value {
font-weight: 500;
}
.app-footer {
padding: 1rem 2rem;
text-align: center;
opacity: 0.5;
font-size: 0.875rem;
border-top: 1px solid rgba(255,255,255,0.08);
}
+30
View File
@@ -0,0 +1,30 @@
import './App.css'
function App() {
return (
<div className="app">
<header className="app-header">
<h1>Headquarter</h1>
<p className="tagline">Hosted workspace and tool-orchestration platform</p>
</header>
<main className="app-main">
<section className="status-card">
<h2>Platform Status</h2>
<div className="status-row">
<span className="status-label">API</span>
<span className="status-value" data-testid="api-status">Checking</span>
</div>
<div className="status-row">
<span className="status-label">Version</span>
<span className="status-value">0.0.1</span>
</div>
</section>
</main>
<footer className="app-footer">
<p>Scaffolded by FN-002</p>
</footer>
</div>
)
}
export default App
+26
View File
@@ -0,0 +1,26 @@
import { describe, it, expect } from 'vitest'
import { render, screen } from '@testing-library/react'
import App from '../App'
describe('App', () => {
it('renders the platform name', () => {
render(<App />)
expect(screen.getByText('Headquarter')).toBeInTheDocument()
})
it('renders the tagline', () => {
render(<App />)
expect(screen.getByText('Hosted workspace and tool-orchestration platform')).toBeInTheDocument()
})
it('renders the platform status section', () => {
render(<App />)
expect(screen.getByText('Platform Status')).toBeInTheDocument()
expect(screen.getByTestId('api-status')).toHaveTextContent('Checking…')
})
it('renders the scaffold footer', () => {
render(<App />)
expect(screen.getByText('Scaffolded by FN-002')).toBeInTheDocument()
})
})
+1
View File
@@ -0,0 +1 @@
import '@testing-library/jest-dom/vitest'
+20
View File
@@ -0,0 +1,20 @@
:root {
--bg: #0f172a;
--fg: #e2e8f0;
--accent: #38bdf8;
font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
line-height: 1.5;
color-scheme: dark;
}
body {
margin: 0;
background: var(--bg);
color: var(--fg);
}
#root {
min-height: 100dvh;
display: flex;
flex-direction: column;
}
+10
View File
@@ -0,0 +1,10 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)