Phase 1 scaffold: auth for all apps
- Backend: Fastify with two listeners (public + internal), routes, services, DB migration + seed - client_app: Flutter with BLoC, all auth screens (welcome, display name, register, OTP, force-register) - mitra_app: Flutter with BLoC, OTP-only login - control_center: React + Vite, email/password login, mitra/user management, anonymity settings - Docs: phase1 plan, API contract, client app mockup - CLAUDE.md and shared memory for all subprojects Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
26
control_center/src/components/Layout.jsx
Normal file
26
control_center/src/components/Layout.jsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Outlet, NavLink } from 'react-router-dom'
|
||||
import { useAuth } from '../core/auth/AuthContext'
|
||||
|
||||
export default function Layout() {
|
||||
const { user, logout } = useAuth()
|
||||
|
||||
return (
|
||||
<div style={{ display: 'flex', minHeight: '100vh' }}>
|
||||
<nav style={{ width: 220, borderRight: '1px solid #eee', padding: 16 }}>
|
||||
<h2>Control Center</h2>
|
||||
<ul style={{ listStyle: 'none', padding: 0 }}>
|
||||
<li><NavLink to="/mitras">Mitra</NavLink></li>
|
||||
<li><NavLink to="/users">Users</NavLink></li>
|
||||
<li><NavLink to="/settings">Settings</NavLink></li>
|
||||
</ul>
|
||||
<div style={{ marginTop: 'auto', paddingTop: 16 }}>
|
||||
<p style={{ fontSize: 12 }}>{user?.email}</p>
|
||||
<button onClick={logout}>Logout</button>
|
||||
</div>
|
||||
</nav>
|
||||
<main style={{ flex: 1, padding: 24 }}>
|
||||
<Outlet />
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user