diff --git a/CLAUDE.md b/CLAUDE.md index cd1eebc..dd83e2c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,20 +27,24 @@ MVVM with Repository pattern, single-module Gradle project. - **`data/api/`** — Retrofit service (`GhostApiService`), JWT auth (`GhostJwtGenerator`, `GhostAuthInterceptor`), and `ApiClient` singleton with dynamic base URL - **`data/db/`** — Room database with `LocalPost` entity and `LocalPostDao` -- **`data/model/`** — Three model layers: `GhostPost` (API), `LocalPost` (Room entity), `FeedPost` (UI display). Additional models: `PostStats`, `OverallStats`, `GhostAccount`. Enums: `PostStatus`, `QueueStatus`, `PostFilter`, `SortOrder` +- **`data/model/`** — Three model layers: `GhostPost` (API), `LocalPost` (Room entity), `FeedPost` (UI display). Additional models: `PostStats`, `OverallStats`, `GhostAccount`, `GhostNewsletter`, `GhostPage`, `GhostMember`. Enums: `PostStatus`, `QueueStatus`, `PostFilter`, `SortOrder` - **`data/repository/`** — `PostRepository` coordinates local DB and remote API; `OpenGraphFetcher` parses link previews via Jsoup - **`data/`** (root utilities) — `AccountManager` (multi-account, up to 5), `CredentialsManager`, `FeedPreferences`, `HashtagParser`, `MobiledocBuilder`, `ShareUtils`, `UrlNormalizer` - **`ui/animation/`** — `SwooshMotion` shared animation specs (bouncy, snappy, gentle, quick) - **`ui/components/`** — Reusable composables: `AnimatedDialog`, `ConfirmationDialog`, `PulsingPlaceholder` - **`ui/feed/`** — Post feed with search, filtering (All/Published/Draft/Scheduled), sorting - **`ui/composer/`** — Post creation/editing with image uploads, link previews, hashtags, scheduling -- **`ui/detail/`** — Full post view with animated delete dialog +- **`ui/detail/`** — Full post view with pin toggle and animated delete dialog +- **`ui/members/`** — Ghost members/subscribers management +- **`ui/newsletter/`** — Newsletter configuration, subscriber count, newsletter list +- **`ui/pages/`** — Static pages CRUD (create, edit, delete, publish) - **`ui/preview/`** — HTML post preview -- **`ui/stats/`** — Statistics dashboard with animated counters (total posts, word counts, reading time) -- **`ui/settings/`** — Settings, account management, theme toggle, disconnect +- **`ui/stats/`** — Statistics dashboard with animated counters (total posts, word counts, reading time, tags) +- **`ui/settings/`** — Settings, account management, theme toggle, tags toggle, disconnect - **`ui/setup/`** — Initial configuration wizard and add-account flow +- **`ui/tags/`** — Tag management and filtering - **`ui/theme/`** — Material 3 theming with `ThemeMode` (Light/Dark/System), `ThemeViewModel`, `ThemePreferences` -- **`ui/navigation/`** — Compose Navigation graph with bottom nav (Feed, Stats, Settings) +- **`ui/navigation/`** — Compose Navigation graph with bottom nav (Home, Newsletter, Stats, Settings) - **`worker/`** — `PostUploadWorker` (WorkManager) handles offline queue with exponential backoff **Key data flow:** Posts are saved to Room first → queued for upload → `PostUploadWorker` syncs to Ghost API when network is available. @@ -70,6 +74,10 @@ Version is defined in `app/build.gradle.kts` (`versionCode` and `versionName`). - **MINOR** (0.2.0 → 0.3.0): New features, UI changes, significant improvements - **MAJOR** (0.x → 1.0): First stable public release -**Current:** `versionName = "0.2.0"`, `versionCode = 2` +**Current:** `versionName = "0.3.0"`, `versionCode = 3` **Process:** When making a release commit, bump both `versionCode` (+1) and `versionName` in `app/build.gradle.kts`. Always bump version when creating a release build or PR. + +## Assets + +Screenshots for README are in `pics/` — named by screen (feed.png, stats.png, newsletter.png, settings.png). diff --git a/README.md b/README.md index e11cca1..b8aad16 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,15 @@ A native Android microblogging client for [Ghost CMS](https://ghost.org). Write, [![Jetpack Compose](https://img.shields.io/badge/Jetpack%20Compose-Material%203-4285F4?logo=jetpackcompose&logoColor=white)](https://developer.android.com/jetpack/compose) [![License](https://img.shields.io/badge/License-PolyForm%20Noncommercial-blue)](LICENSE) +## Screenshots + +

+ Feed + Newsletter + Statistics + Settings +

+ ## Features - **Ghost Admin API** — Full integration via JWT authentication (HS256) @@ -16,16 +25,17 @@ A native Android microblogging client for [Ghost CMS](https://ghost.org). Write, - **Link previews** — Automatic Open Graph metadata extraction (title, description, thumbnail) - **Hashtag support** — Auto-extracted hashtags converted to Ghost tags - **Scheduled publishing** — Set a future publish date for your posts -- **Statistics dashboard** — Post counts, word counts, reading time, and more with animated counters +- **Pin posts** — Feature/pin important posts to the top of your blog +- **Newsletter integration** — Send posts as newsletters to your Ghost subscribers +- **Members management** — View and manage your Ghost blog members +- **Static pages** — Create, edit, and manage Ghost pages from the app +- **Tag management** — Browse, create, and manage tags with per-tag post counts +- **Statistics dashboard** — Post counts, word counts, reading time, tag breakdown, and more - **Search & filtering** — Filter by status (Published, Draft, Scheduled) and sort by date - **Mobiledoc format** — Native Ghost content format with text paragraphs and bookmark cards - **Encrypted credentials** — API keys stored with AES-256-GCM via AndroidX Security - **Background sync** — WorkManager handles upload queue with exponential backoff -- **Material 3 UI** — Bluesky-inspired feed design with polished animations and Light/Dark/System themes - -## Screenshots - -> Coming soon — contributions welcome! +- **Material 3 UI** — Clean, green-tinted design with polished animations and Light/Dark/System themes ## Architecture @@ -41,13 +51,17 @@ com.swoosh.microblog/ ├── ui/ │ ├── animation/ # SwooshMotion shared animation specs │ ├── components/ # Reusable composables (dialogs, placeholders) -│ ├── feed/ # Post feed with search and filtering │ ├── composer/ # Post creation with images, links, hashtags, scheduling -│ ├── detail/ # Full post view +│ ├── detail/ # Full post view with pin toggle +│ ├── feed/ # Post feed with search and filtering +│ ├── members/ # Ghost members/subscribers management +│ ├── newsletter/ # Newsletter configuration and subscriber info +│ ├── pages/ # Static pages CRUD │ ├── preview/ # HTML post preview -│ ├── stats/ # Statistics dashboard -│ ├── setup/ # Configuration wizard and add-account flow │ ├── settings/ # App settings, account management, theme toggle +│ ├── setup/ # Configuration wizard and add-account flow +│ ├── stats/ # Statistics dashboard with animated counters +│ ├── tags/ # Tag management │ ├── navigation/ # Compose Navigation with bottom nav bar │ └── theme/ # Material 3 theming (Light/Dark/System) └── worker/ # PostUploadWorker (WorkManager) @@ -55,7 +69,7 @@ com.swoosh.microblog/ **Data flow:** Compose UI → ViewModel → Repository → Room (local) + Retrofit (remote). Posts are persisted to Room first, then queued for upload via WorkManager. -**Navigation:** Bottom bar with three tabs (Feed, Stats, Settings). Composer and Detail screens slide in as overlays. +**Navigation:** Bottom bar with four tabs — Home (Feed), Newsletter, Stats, and Settings. Composer, Detail, Pages, Members, and Tags screens slide in as overlays. ## Getting started @@ -76,7 +90,7 @@ com.swoosh.microblog/ ### Build and run ```bash -git clone https://github.com/pawelorzech/Swoosh.git +git clone https://github.com/nicekid1/Swoosh.git cd Swoosh ./gradlew assembleDebug ``` @@ -99,7 +113,7 @@ The project includes unit tests with JUnit 4 and Robolectric: ./gradlew app:testDebugUnitTest # Debug variant only ``` -24 test classes covering JWT generation, mobiledoc building, URL normalization, data model serialization, auth interceptors, time formatting, hashtag parsing, account management, feed preferences, and theme modes. +31 test classes covering JWT generation, mobiledoc building, URL normalization, data model serialization, auth interceptors, time formatting, hashtag parsing, account management, feed preferences, newsletter preferences, member models, and theme modes. ## Tech stack @@ -110,6 +124,7 @@ The project includes unit tests with JUnit 4 and Robolectric: | Architecture | MVVM, StateFlow, Repository pattern | | Networking | Retrofit 2, OkHttp 4 | | Images | Coil | +| Media | Media3 ExoPlayer | | Database | Room | | Background | WorkManager | | Auth | JJWT (HS256), EncryptedSharedPreferences | diff --git a/pics/feed.png b/pics/feed.png new file mode 100644 index 0000000..def3d53 Binary files /dev/null and b/pics/feed.png differ diff --git a/pics/newsletter.png b/pics/newsletter.png new file mode 100644 index 0000000..05f2ed7 Binary files /dev/null and b/pics/newsletter.png differ diff --git a/pics/settings.png b/pics/settings.png new file mode 100644 index 0000000..31eca06 Binary files /dev/null and b/pics/settings.png differ diff --git a/pics/stats.png b/pics/stats.png new file mode 100644 index 0000000..fa10b01 Binary files /dev/null and b/pics/stats.png differ