mirror of
https://github.com/pawelorzech/Swoosh.git
synced 2026-03-31 20:15:41 +00:00
Compare commits
1 commit
v0.3.0
...
claude/gho
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cb4ad7953 |
6 changed files with 42 additions and 19 deletions
20
CLAUDE.md
20
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/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/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/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`
|
- **`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/animation/`** — `SwooshMotion` shared animation specs (bouncy, snappy, gentle, quick)
|
||||||
- **`ui/components/`** — Reusable composables: `AnimatedDialog`, `ConfirmationDialog`, `PulsingPlaceholder`
|
- **`ui/components/`** — Reusable composables: `AnimatedDialog`, `ConfirmationDialog`, `PulsingPlaceholder`
|
||||||
- **`ui/feed/`** — Post feed with search, filtering (All/Published/Draft/Scheduled), sorting
|
- **`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/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/preview/`** — HTML post preview
|
||||||
- **`ui/stats/`** — Statistics dashboard with animated counters (total posts, word counts, reading time)
|
- **`ui/stats/`** — Statistics dashboard with animated counters (total posts, word counts, reading time, tags)
|
||||||
- **`ui/settings/`** — Settings, account management, theme toggle, disconnect
|
- **`ui/settings/`** — Settings, account management, theme toggle, tags toggle, disconnect
|
||||||
- **`ui/setup/`** — Initial configuration wizard and add-account flow
|
- **`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/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
|
- **`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.
|
**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
|
- **MINOR** (0.2.0 → 0.3.0): New features, UI changes, significant improvements
|
||||||
- **MAJOR** (0.x → 1.0): First stable public release
|
- **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.
|
**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).
|
||||||
|
|
|
||||||
41
README.md
41
README.md
|
|
@ -7,6 +7,15 @@ A native Android microblogging client for [Ghost CMS](https://ghost.org). Write,
|
||||||
[](https://developer.android.com/jetpack/compose)
|
[](https://developer.android.com/jetpack/compose)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="pics/feed.png" width="200" alt="Feed" />
|
||||||
|
<img src="pics/newsletter.png" width="200" alt="Newsletter" />
|
||||||
|
<img src="pics/stats.png" width="200" alt="Statistics" />
|
||||||
|
<img src="pics/settings.png" width="200" alt="Settings" />
|
||||||
|
</p>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Ghost Admin API** — Full integration via JWT authentication (HS256)
|
- **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)
|
- **Link previews** — Automatic Open Graph metadata extraction (title, description, thumbnail)
|
||||||
- **Hashtag support** — Auto-extracted hashtags converted to Ghost tags
|
- **Hashtag support** — Auto-extracted hashtags converted to Ghost tags
|
||||||
- **Scheduled publishing** — Set a future publish date for your posts
|
- **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
|
- **Search & filtering** — Filter by status (Published, Draft, Scheduled) and sort by date
|
||||||
- **Mobiledoc format** — Native Ghost content format with text paragraphs and bookmark cards
|
- **Mobiledoc format** — Native Ghost content format with text paragraphs and bookmark cards
|
||||||
- **Encrypted credentials** — API keys stored with AES-256-GCM via AndroidX Security
|
- **Encrypted credentials** — API keys stored with AES-256-GCM via AndroidX Security
|
||||||
- **Background sync** — WorkManager handles upload queue with exponential backoff
|
- **Background sync** — WorkManager handles upload queue with exponential backoff
|
||||||
- **Material 3 UI** — Bluesky-inspired feed design with polished animations and Light/Dark/System themes
|
- **Material 3 UI** — Clean, green-tinted design with polished animations and Light/Dark/System themes
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||
> Coming soon — contributions welcome!
|
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
|
|
@ -41,13 +51,17 @@ com.swoosh.microblog/
|
||||||
├── ui/
|
├── ui/
|
||||||
│ ├── animation/ # SwooshMotion shared animation specs
|
│ ├── animation/ # SwooshMotion shared animation specs
|
||||||
│ ├── components/ # Reusable composables (dialogs, placeholders)
|
│ ├── components/ # Reusable composables (dialogs, placeholders)
|
||||||
│ ├── feed/ # Post feed with search and filtering
|
|
||||||
│ ├── composer/ # Post creation with images, links, hashtags, scheduling
|
│ ├── 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
|
│ ├── preview/ # HTML post preview
|
||||||
│ ├── stats/ # Statistics dashboard
|
|
||||||
│ ├── setup/ # Configuration wizard and add-account flow
|
|
||||||
│ ├── settings/ # App settings, account management, theme toggle
|
│ ├── 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
|
│ ├── navigation/ # Compose Navigation with bottom nav bar
|
||||||
│ └── theme/ # Material 3 theming (Light/Dark/System)
|
│ └── theme/ # Material 3 theming (Light/Dark/System)
|
||||||
└── worker/ # PostUploadWorker (WorkManager)
|
└── 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.
|
**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
|
## Getting started
|
||||||
|
|
||||||
|
|
@ -76,7 +90,7 @@ com.swoosh.microblog/
|
||||||
### Build and run
|
### Build and run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/pawelorzech/Swoosh.git
|
git clone https://github.com/nicekid1/Swoosh.git
|
||||||
cd Swoosh
|
cd Swoosh
|
||||||
./gradlew assembleDebug
|
./gradlew assembleDebug
|
||||||
```
|
```
|
||||||
|
|
@ -99,7 +113,7 @@ The project includes unit tests with JUnit 4 and Robolectric:
|
||||||
./gradlew app:testDebugUnitTest # Debug variant only
|
./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
|
## Tech stack
|
||||||
|
|
||||||
|
|
@ -110,6 +124,7 @@ The project includes unit tests with JUnit 4 and Robolectric:
|
||||||
| Architecture | MVVM, StateFlow, Repository pattern |
|
| Architecture | MVVM, StateFlow, Repository pattern |
|
||||||
| Networking | Retrofit 2, OkHttp 4 |
|
| Networking | Retrofit 2, OkHttp 4 |
|
||||||
| Images | Coil |
|
| Images | Coil |
|
||||||
|
| Media | Media3 ExoPlayer |
|
||||||
| Database | Room |
|
| Database | Room |
|
||||||
| Background | WorkManager |
|
| Background | WorkManager |
|
||||||
| Auth | JJWT (HS256), EncryptedSharedPreferences |
|
| Auth | JJWT (HS256), EncryptedSharedPreferences |
|
||||||
|
|
|
||||||
BIN
pics/feed.png
Normal file
BIN
pics/feed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 MiB |
BIN
pics/newsletter.png
Normal file
BIN
pics/newsletter.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 120 KiB |
BIN
pics/settings.png
Normal file
BIN
pics/settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 174 KiB |
BIN
pics/stats.png
Normal file
BIN
pics/stats.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 133 KiB |
Loading…
Reference in a new issue