From 6abdffe22ab0f2d09f459bb1a804100a5669745b Mon Sep 17 00:00:00 2001 From: Lars Behrends Date: Sun, 28 Dec 2025 02:18:18 +0100 Subject: [PATCH] readme --- README.md | 87 ++++++++++++++++++++++++++++++++++++++++++++-------- constants.ts | 12 ++++---- 2 files changed, 80 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index aa357e3..5c84cbb 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,81 @@ -
-GHBanner -
+# Obsidian | RP Plattform -# Run and deploy your AI Studio app +**Obsidian** ist ein modernes, webbasiertes Dashboard für Minecraft Roleplay-Server. Es dient als "Immersive Interface" für Spieler und Admins, um Charakterdaten, Inventare, Städte, Organisationen und wirtschaftliche Aktivitäten außerhalb des Spiels darzustellen. -This contains everything you need to run your app locally. +Das Projekt zielt darauf ab, die Lücke zwischen In-Game-Geschehen und Web-Präsenz zu schließen, ohne ein komplexes Backend (PHP/Python/Node) zwingend vorauszusetzen. -View your app in AI Studio: https://ai.studio/apps/drive/1o1Z6erDhereYS10vVy3VaRuXeUPxu-Nh +--- -## Run Locally +## ✨ Features -**Prerequisites:** Node.js +### 👤 Bürger & Charakterakten +* **Visuelles Inventar**: Darstellung von Items, Rüstung und NBT-Daten in einem Grid-Layout. +* **Story-Engine**: Markdown-Rendering für Charakter-Hintergrundgeschichten. +* **Identity Linking**: (Mockup) Discord-Login zur Verknüpfung von Spielern mit ihren RP-Charakteren. +### 🏙️ Geopolitik & Organisationen +* **Städte-Profile**: Banner, Statistiken (Steuern, Verteidigung), Bewohnerlisten und politische Strukturen. +* **Wirtschaftssystem**: Spielergeführte Unternehmen mit integrierten Produkt- und Dienstleistungskatalogen. +* **Hierarchie**: Darstellung von Gilden, Firmen und Fraktionen. -1. Install dependencies: - `npm install` -2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key -3. Run the app: - `npm run dev` +### 🛠️ Technische Tools (Simuliert) +* **Datapack Generator**: Erstellt automatisch `.mcfunction`-Dateien für den Minecraft-Server, um Daten sicher via "Item-Umbenennung" (Non-OP Input) zu erfassen. +* **SQL-Konsole**: Eine simulierte Datenbank-Oberfläche, um SQL-Queries auf den lokalen Datensätzen auszuführen (für Immersion und Admin-Feeling). +* **Telemetry Dashboard**: Echtzeit-ähnliche Statistiken über Server-Aktivitäten. + +--- + +## 🚀 Installation & Start + +Da dieses Projekt auf modernen Web-Standards (ES Modules & React 19 via CDN) basiert, ist **kein Build-Prozess** (kein `npm run build`) zwingend erforderlich, um die Demo zu starten. + +### Voraussetzungen +* Ein moderner Browser (Chrome, Firefox, Edge). +* Ein lokaler Webserver (z.B. VS Code "Live Server", Python `http.server` oder `npx serve`). + +### Starten +1. Repository klonen oder herunterladen. +2. Öffne den Ordner im Terminal. +3. Starte einen statischen Server. Beispiel mit Python: + ```bash + python3 -m http.server 8000 + ``` +4. Öffne `http://localhost:8000` im Browser. + +--- + +## ⚙️ Architektur & Datenfluss (Konzept) + +Obsidian ist als "Serverless"-Viewer konzipiert. In einer echten Produktionsumgebung funktioniert der Datenfluss wie folgt: + +1. **Minecraft Server**: Ein Datapack (siehe Generator im Tool) exportiert Inventare und Spielerdaten in JSON-Formate in den Server-Log oder via Plugin. +2. **Sync-Script**: Ein einfaches Shell/Batch-Skript lädt diese JSON-Dateien per FTP auf den Webserver hoch. +3. **Frontend**: Obsidian liest die statischen JSON-Dateien (`fetch('/api/players.json')`) und stellt sie dar. + +*Aktueller Status:* In dieser Demo-Version werden alle Daten aus `constants.ts` und `MockDatabaseService.ts` geladen, um die Funktionalität ohne echten Server zu demonstrieren. + +--- + +## 🎨 Tech Stack + +* **Framework**: React 19 (via ESM Imports) +* **Styling**: Tailwind CSS (CDN Runtime für Demo / Buildless Setup) +* **Icons**: Custom SVG Set (Lucide-Style) +* **Type Safety**: TypeScript (JSDoc/Interfaces im Code) + +--- + +## 📸 Projektstruktur + +* `index.html`: Entry Point & Import Maps. +* `App.tsx`: Haupt-Routing und Layout-Logik. +* `pages/`: Einzelne Ansichten (Dashboard, Profile, SQL-Manager). +* `components/`: Wiederverwendbare UI-Elemente (InventoryGrid, Layout). +* `services/`: Simulierte Backend-Logik (Database, Auth). +* `constants.ts`: Mock-Daten für Spieler, Städte und Items. + +--- + +## 📄 Lizenz + +Entwickelt als Konzeptstudie für immersive RP-Communities. Frei verwendbar. diff --git a/constants.ts b/constants.ts index ad4a683..33a3b63 100644 --- a/constants.ts +++ b/constants.ts @@ -118,9 +118,9 @@ export const MOCK_ORGS: Organization[] = [ 'images/screenshots/2025-12-28_01.12.24.png' // Walls ], cityStats: { - //taxRate: 3.5, + taxRate: 3.5, biome: 'Ebene / Gebirge', - //defenseRating: 8, + defenseRating: 8, government: 'Feudalmonarchie', specialty: 'Handel & Stein' } @@ -182,10 +182,10 @@ export const MOCK_PROJECTS: Project[] = [ associatedOrgId: 'org-3', bannerUrl: 'images/screenshots/tinas.png', shopCatalog: [ - { id: 'f1', name: 'Redstone Block', description: '', price: 2, currency: 'Dias', stock: 45, type: 'item' }, - { id: 'f2', name: 'Honey', description: '', price: 5, currency: 'Dias', stock: 12, type: 'item' }, - { id: 'f3', name: 'Slime', description: '', price: 10, currency: 'Dias', stock: 4, type: 'item' }, - { id: 'f4', name: 'Bier', description: '', price: 3, currency: 'Dias', stock: 20, type: 'item' } + { id: 'f1', name: 'Redstone Block', description: '', price: 2, currency: 'Diamonds', stock: 45, type: 'item' }, + { id: 'f2', name: 'Honey', description: '', price: 5, currency: 'Diamonds', stock: 12, type: 'item' }, + { id: 'f3', name: 'Slime', description: '', price: 10, currency: 'Diamonds', stock: 4, type: 'item' }, + { id: 'f4', name: 'Bier', description: '', price: 3, currency: 'Diamonds', stock: 20, type: 'item' } ] }, ]; \ No newline at end of file