first workting version

This commit is contained in:
Thomas Boksberger committed 2026-04-03 11:33:29 +02:00
1 parent 830765cb13
commit d2048ea5b7
23 files changed
+292 -86

No files matched your search

+24 -14
View File
@@ -2,37 +2,47 @@
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Git
Always stage newly created files that permanently belong to the project with `git add <file>`.
## Commands
```bash
./gradlew run # App starten
./gradlew compileKotlin # Nur kompilieren
./gradlew packageDmg # macOS DMG bauen
./gradlew run # Run the app
./gradlew compileKotlin # Compile only
./gradlew packageDmg # Build macOS DMG
```
## Architecture
**AnyTask** ist eine Kotlin/Compose-Desktop-App, die im Hintergrund läuft und über eine globale Tastenkombination (Ctrl+Shift+Space) ein Fenster zum Erstellen von AnyType-Tasks zeigt.
**AnyTask** is a Kotlin/Compose desktop app that runs in the background and shows a task creation window via a global hotkey (Ctrl+Shift+Space).
### Komponenten
### Components
- **`Main.kt`** — Einstiegspunkt. Setzt `apple.awt.UIElement=true` (kein Dock-Icon), startet die Compose-`application {}`, richtet System-Tray und HotkeyManager ein.
- **`hotkey/HotkeyManager.kt`** — JNativeHook-Wrapper. Registriert Ctrl+Shift+Space als systemweiten Hotkey und dispatcht den Callback auf den AWT-EDT.
- **`ui/TaskWindow.kt`** — Compose-UI mit Formular (Titel, Details). Escape schliesst, ⌘↵ erstellt.
- **`api/AnyTypeClient.kt`** — Ktor-HTTP-Client für die lokale AnyType-API (`localhost:31007`). Momentan Skeleton — API-Details müssen noch verifiziert werden.
- **`Main.kt`** — Entry point. Sets `apple.awt.UIElement=true` (no dock icon), starts the Compose `application {}`, sets up system tray and HotkeyManager.
- **`hotkey/HotkeyManager.kt`** — JNativeHook wrapper. Registers Ctrl+Shift+Space as a system-wide hotkey and dispatches the callback on the AWT EDT.
- **`ui/TaskWindow.kt`** — Compose UI with a form (title, details). Escape closes, ⌘↵ creates.
- **`api/AnyTypeApi.kt`** — Ktor HTTP client for the local AnyType API (`localhost:31009`). Currently a skeleton — API details still need to be verified.
### Stack
- Kotlin 2.1.0 / Compose Multiplatform 1.7.1
- JNativeHook 2.2.2 (globale Hotkeys)
- JNativeHook 2.2.2 (global hotkeys)
- Ktor 3.0.0 + kotlinx.serialization (AnyType API)
- Gradle 9.2.1
## macOS-Hinweise
## Code Style
- **Accessibility-Berechtigung** für JNativeHook: System Settings → Privacy & Security → Accessibility → App hinzufügen. Ohne diese Berechtigung funktioniert der globale Hotkey nicht.
- Das Tray-Icon erscheint in der Menüleiste (kein Dock-Icon, da `apple.awt.UIElement=true`).
- One class per file — file name matches the class name.
- No wildcard imports (`import foo.*`).
- Code, comments, and documentation in English.
## macOS Notes
- **Accessibility permission** for JNativeHook: System Settings → Privacy & Security → Accessibility → add the app. Without this permission the global hotkey will not work.
- The tray icon appears in the menu bar (no dock icon, since `apple.awt.UIElement=true`).
## AnyType API
Die lokale AnyType-API läuft via `anytype-heart` auf `http://localhost:31007`. Der `appKey` und die `spaceId` in `AnyTypeClient` müssen noch konfigurierbar gemacht werden.
The local AnyType API runs via `anytype-heart` on `http://localhost:31007`. `apiKey` and `spaceId` are configured via `anytask.yaml`.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.