Files
fluffytrix/CLAUDE.md
2026-02-25 12:23:31 +00:00

58 lines
2.1 KiB
Markdown

# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
Fluffytrix is an Android Matrix chat client with a Discord-like UI. Built with Kotlin, targeting Android 14+ (minSdk 34, targetSdk 36, compileSdk 36).
## Build Commands
```bash
./gradlew assembleDebug # Build debug APK
./gradlew assembleRelease # Build release APK
./gradlew test # Run unit tests
./gradlew connectedAndroidTest # Run instrumented tests
./gradlew app:testDebugUnitTest # Run unit tests for debug variant only
```
## Architecture
- **Package**: `com.example.fluffytrix`
- **Build system**: Gradle with Kotlin DSL, version catalog at `gradle/libs.versions.toml`
- **AGP**: 9.0.1
- **Java compatibility**: 17 (configured in `app/build.gradle.kts`)
- Single module (`:app`)
## Key Files
- `gradle/libs.versions.toml` — all dependency versions and library declarations
- `app/build.gradle.kts` — app module build config
- `app/src/main/java/com/example/fluffytrix/` — Kotlin sources
- `app/src/main/res/` — Android resources (layouts, themes, drawables)
## Design Intent
- Discord-like layout: space sidebar → channel list → message area → member list
- Static channel ordering (never auto-sort by recency)
- Material You (Material 3 dynamic colors) theming
- Matrix Rust SDK (`org.matrix.rustcomponents:sdk-android`) for Matrix protocol
- Jetpack Compose for UI
## Matrix Rust SDK: Raw Event JSON
The SDK exposes full raw event JSON through the `LazyTimelineItemProvider` on each `EventTimelineItem`:
```kotlin
val rawJson: String? = try {
eventItem.lazyProvider.debugInfo().originalJson
} catch (_: Exception) { null }
```
`EventTimelineItemDebugInfo` fields:
- `originalJson` — full raw JSON of the event (what Element shows in "View Source")
- `latestEditJson` — raw JSON of the latest edit, if any
- `model` — internal SDK model debug string
This is useful for reading custom/unstandardized fields that the SDK doesn't expose directly (e.g. `fi.mau.gif`, `com.beeper.per_message_profile`, bridge metadata).