feat: add file explorer with tree view and IDE layout

Backend: editor service for directory tree reading and file CRUD,
editor routes at /api/editor with path traversal protection.

Frontend: FileExplorer tree component with expand/collapse directories,
IDELayout with sidebar + header + outlet, wired into App routing.
Editor now receives state as props from App for cross-component file loading.
This commit is contained in:
plenarius
2026-04-20 19:09:19 -04:00
parent eaca2d8a6c
commit 02ca134743
8 changed files with 473 additions and 7 deletions
@@ -0,0 +1,39 @@
import { Outlet } from "react-router-dom";
export function IDELayout({ sidebar }: { sidebar?: React.ReactNode }) {
return (
<div className="flex h-screen flex-col overflow-hidden" style={{ backgroundColor: "var(--forge-bg)" }}>
<header
className="flex shrink-0 items-center px-4 py-2"
style={{ borderBottom: "1px solid var(--forge-border)" }}
>
<h1
className="text-lg font-bold"
style={{
fontFamily: "'Baskerville', 'Georgia', 'Palatino', serif",
color: "var(--forge-accent)",
}}
>
Layonara Forge
</h1>
</header>
<div className="flex flex-1 overflow-hidden">
{sidebar && (
<aside
className="shrink-0 overflow-hidden"
style={{
width: "250px",
borderRight: "1px solid var(--forge-border)",
}}
>
{sidebar}
</aside>
)}
<main className="flex-1 overflow-hidden">
<Outlet />
</main>
</div>
</div>
);
}