mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 12:09:35 +01:00
feat(frontend): Tauri Apps, Shared UI Library und Nix Flake
- packages/ui: Shared React Component Library (Button, Card, Badge, Input) mit Tailwind v4 @theme Design Tokens (oklch) - apps/web: ERP Web-UI (Vite + React + Tailwind v4, API-Proxy :8080) - apps/scanner: Tauri v2 Mobile App mit Barcode-Scanner Plugin (cfg(mobile) für Desktop-Kompatibilität) - flake.nix: Nix Flake mit rust-overlay, Tauri System-Deps (GTK, WebKitGTK, libsoup, OpenSSL), ersetzt shell.nix - justfile: Dev-Befehle für alle Projekte (backend, cli, web, scanner) - frontend/CLAUDE.md: Agent Guide mit Base UI Docs Referenz
This commit is contained in:
parent
b9b89e3f0e
commit
ef50eb8279
96 changed files with 11682 additions and 16 deletions
18
frontend/apps/web/index.html
Normal file
18
frontend/apps/web/index.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<title>Effigenix ERP</title>
|
||||
</head>
|
||||
<body class="bg-warm-50 text-warm-900 font-sans antialiased">
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
31
frontend/apps/web/package.json
Normal file
31
frontend/apps/web/package.json
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "@effigenix/web",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "Effigenix ERP Web UI",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"preview": "vite preview",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"@effigenix/ui": "workspace:*",
|
||||
"@effigenix/api-client": "workspace:*",
|
||||
"@effigenix/types": "workspace:*",
|
||||
"@effigenix/validation": "workspace:*",
|
||||
"@effigenix/config": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.48",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"@tailwindcss/vite": "^4.0.0",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^6.0.0"
|
||||
}
|
||||
}
|
||||
43
frontend/apps/web/src/App.tsx
Normal file
43
frontend/apps/web/src/App.tsx
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import { Button, Card, Badge, Input } from '@effigenix/ui';
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<div className="min-h-screen p-8">
|
||||
<div className="mx-auto max-w-3xl space-y-8">
|
||||
<h1 className="text-3xl font-bold text-brand-700">Effigenix ERP</h1>
|
||||
|
||||
<Card>
|
||||
<h2 className="mb-4 text-lg font-semibold">Buttons</h2>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
<Button variant="primary">Primary</Button>
|
||||
<Button variant="secondary">Secondary</Button>
|
||||
<Button variant="ghost">Ghost</Button>
|
||||
<Button variant="danger">Danger</Button>
|
||||
<Button variant="primary" disabled>
|
||||
Disabled
|
||||
</Button>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<h2 className="mb-4 text-lg font-semibold">Badges</h2>
|
||||
<div className="flex flex-wrap gap-3">
|
||||
<Badge variant="success">Aktiv</Badge>
|
||||
<Badge variant="warning">Ausstehend</Badge>
|
||||
<Badge variant="danger">Fehler</Badge>
|
||||
<Badge variant="info">Info</Badge>
|
||||
<Badge variant="neutral">Neutral</Badge>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<h2 className="mb-4 text-lg font-semibold">Input</h2>
|
||||
<div className="max-w-sm space-y-3">
|
||||
<Input placeholder="Artikelbezeichnung..." />
|
||||
<Input placeholder="Disabled" disabled />
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
4
frontend/apps/web/src/index.css
Normal file
4
frontend/apps/web/src/index.css
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
@import 'tailwindcss';
|
||||
@import '@effigenix/ui/theme.css';
|
||||
|
||||
@source '../../packages/ui/src/**/*.{ts,tsx}';
|
||||
10
frontend/apps/web/src/main.tsx
Normal file
10
frontend/apps/web/src/main.tsx
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { App } from './App';
|
||||
import './index.css';
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>
|
||||
);
|
||||
1
frontend/apps/web/src/vite-env.d.ts
vendored
Normal file
1
frontend/apps/web/src/vite-env.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/// <reference types="vite/client" />
|
||||
15
frontend/apps/web/tsconfig.json
Normal file
15
frontend/apps/web/tsconfig.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"composite": false,
|
||||
"declaration": false,
|
||||
"declarationMap": false,
|
||||
"incremental": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
16
frontend/apps/web/vite.config.ts
Normal file
16
frontend/apps/web/vite.config.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss(), react()],
|
||||
server: {
|
||||
port: 3000,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue