feat: added a twist

This commit is contained in:
2026-04-01 00:53:55 +02:00
parent 0b7deee59e
commit b40c6436cd
76 changed files with 15121 additions and 64 deletions

46
frontend/README.md Normal file
View File

@@ -0,0 +1,46 @@
# Micronomicon — Frontend
React 19 + Vite + TypeScript + shadcn/ui. See the [root README](../README.md) for full project docs.
## Dev
```bash
npm install
npm run dev # http://localhost:5173 — proxies /api to localhost:8080
```
## Build
```bash
npm run build # output → dist/ (copied into Docker image)
```
## Structure
```
src/
App.tsx ← routes
routes/
DashboardView.tsx ← page table
EditorView.tsx ← split-pane editor
GraphView.tsx ← React Flow graph
components/
dashboard/StatusBadge.tsx
editor/
EditorPane.tsx ← CodeMirror 6
PreviewPane.tsx ← micron output (ScrollArea)
ToolBar.tsx
shared/
AppShell.tsx ← TooltipProvider + Toaster wrapper
NavBar.tsx
ui/ ← shadcn components (auto-generated)
lib/
utils.ts ← cn() utility
stores/
editorStore.ts ← Zustand: markdown, micron, dirty state
pagesStore.ts ← Zustand: pages list, fetch/delete
hooks/
useConversion.ts ← debounced POST /api/convert
useGraph.ts ← GET /api/graph
useUnsavedGuard.ts ← beforeunload + dirty guard
```