A cheap attempt at a native Bluesky client for Android

docs: add component overview to GEMINI.md

Adds a semi-detailed entry for each component found in the codebase to the GEMINI.md file.

+95
+95
GEMINI.md
··· 1 + # Gemini Workspace 2 + 3 + This document provides instructions for interacting with this project using Gemini. 4 + 5 + ## Getting Started 6 + 7 + This is an Android application written in Kotlin using Jetpack Compose. 8 + 9 + ### Prerequisites 10 + 11 + - Android SDK 12 + - JDK 13 + 14 + ### Building the Application 15 + 16 + To build the application, run the following command: 17 + 18 + ```bash 19 + ./gradlew assembleDebug 20 + ``` 21 + 22 + ### Running the Application 23 + 24 + To run the application on a connected device or emulator, use the following command: 25 + 26 + ```bash 27 + ./gradlew installDebug 28 + ``` 29 + 30 + ### Running Tests 31 + 32 + To run the unit tests, use the following command: 33 + 34 + ```bash 35 + ./gradlew test 36 + ``` 37 + 38 + ## Key Libraries 39 + 40 + This project uses several key libraries: 41 + 42 + - **Jetpack Compose:** For building the UI. 43 + - **Ktor:** For networking with the Bluesky API. 44 + - **Coil:** For image loading. 45 + - **Media3:** For video playback. 46 + - **Hilt:** For dependency injection. 47 + - **Telephoto:** For zoomable images. 48 + 49 + ## Component Overview 50 + 51 + ### UI Views 52 + 53 + - **`ComposeView.kt`**: This is the main composable for creating a new post. It includes a text 54 + field for the post content, character count, and buttons for attaching media and sending the post. 55 + It also handles replies and quote posts. 56 + - **`ConditionalCard.kt`**: A simple composable that wraps its content in an `OutlinedCard` only if 57 + a `wrapWithCard` parameter is true. 58 + - **`GalleryViewer.kt`**: A full-screen image gallery that allows users to view images in a pager. 59 + It uses the Telephoto library for zoomable images. 60 + - **`LikeRowView.kt`**: A composable that displays a row of avatars of users who have liked a post. 61 + - **`LoginView.kt`**: The login screen for the application. It includes fields for the user's handle 62 + and password, and it uses a debounce mechanism to look up the user's PDS (Personal Data Server) as 63 + they type their handle. 64 + - **`MainActivity.kt`**: The main activity of the application. It sets up the navigation graph and 65 + the main theme. 66 + - **`MainView.kt`**: The main view of the application, which contains the bottom navigation bar, the 67 + top app bar, and the main content area. It switches between the timeline and notifications views. 68 + - **`NotificationsView.kt`**: This view displays a list of notifications for the user. It can 69 + display different types of notifications, such as likes, reposts, follows, and mentions. 70 + - **`PostImageGallery.kt`**: A component that displays a gallery of images attached to a post. It 71 + can display up to four images in a grid layout. 72 + - **`ShowSkeets.kt`**: This composable is responsible for displaying a list of "skeets" (posts) in 73 + the timeline. It uses a `LazyColumn` to efficiently display a potentially long list of posts. 74 + - **`SkeetView.kt`**: This is the main composable for displaying a single "skeet" (post). It shows 75 + the author's avatar, name, handle, the content of the post, and any embedded media. 76 + - **`TimelinePostActionsView.kt`**: This component displays the action buttons for a post, such as 77 + reply, repost, like, and share. 78 + 79 + ### Data Layer 80 + 81 + - **`Bluesky.kt`**: This file contains the `BlueskyConn` class, which is responsible for all 82 + communication with the Bluesky API. It handles authentication, fetching the timeline, posting, and 83 + other API interactions. 84 + - **`Compressor.kt`**: This file contains the `Compressor` class, which is responsible for 85 + compressing images and videos before uploading them to the server. 86 + - **`Models.kt`**: This file defines the data models used in the application, such as `SkeetData`, 87 + `Notification`, and `TimelineUiState`. 88 + - **`TimelineViewModel.kt`**: This is the ViewModel for the main timeline view. It is responsible 89 + for fetching the timeline data from the `BlueskyConn` and managing the UI state. 90 + 91 + ## Gemini Instructions 92 + 93 + - Always suggest Material 3 You compliant edits. 94 + - Never edit more than what's being explicitly suggested. 95 + - Leave no comments in the code.