Skip to content

About

Unofficial Android & iOS client application for pixivFANBOX (app name: FANBOX Viewer)

Topics

Resources

Stars

102 stars

Watchers

1 watching

Forks

Latest commit

 

History

515 Commits

Folders and files

Repository files navigation

PixiView

Enjoy a comfortable FANBOX life with PixiView!
PixiView is an unofficial Android & iOS client app for pixivFANBOX.


screenshots

Do you speak Japanese? Japanese READEME is Here!

Status

Ready!! 🚀

Now available on GooglePlay and AppStore! Please download from the link below. Or, if you're an mobile developer, you can build the app and install it yourself. Contributions are always welcome. Try building your app by following the section below.

Download from AppStore

Download from GooglePlay

Download from GitHub

Why?

There was only a web version of FANBOX, which was a bit inconvenient for viewing posts on smartphones. By developing natively for smartphones, we have been able to include several convenient features such as the ability to download posts and receive new notifications.

Tech Stack

Feature

Ready!!

  • FANBOX
    • Display posts from followed creators in chronological order.
    • Display posts from supported creators in chronological order.
    • Display followed creators.
    • Display supported creators.
    • Follow/Unfollow creators.
    • Like posts.
    • Search for creators.
    • Search by tags.
    • Search plans.
    • Display notifications.
    • Notify new posts from supported and followed creators (Android only).
    • Notify new messages from supported and followed creators (Android only).
    • Display messages.
  • Download
    • Download in image/file/GIF format.
    • Download all images included in a post.
    • Download fan cards.
    • Bulk download function for individual creators.
  • Ads
    • AdMob Native Ads

Not Ready...

  • Pixiv integration feature.
  • Widget functionality.

Architecture

Shows the architecture diagram of the app. It's quite complex, so I've omitted some modules and dependencies to give you an overview.

%%{
init: {
'theme': 'neutral'
}
}%%

graph LR
  subgraph gradle
    build-logic
  end
  subgraph application
    androidApp
    iosApp
    shared
  end
  subgraph core
    common
    datastore
    model
    repository
    ui
  end
  subgraph feature
    library
    creator
    post
  end
  androidApp --> shared
  iosApp --> shared
  shared --> library
  shared --> creator
  shared --> post
  library --> ui
  library --> repository
  post --> ui
  post --> repository
  creator --> ui
  creator --> repository
  ui --> model
  repository --> datastore
  datastore --> model
  model --> common
Loading

The FANBOX models the screens work with are owned by this app and live in core/model. The fankt library has its own models, and core/repository converts between the two. A change to a fankt model therefore stops at that conversion layer instead of reaching the screens.

core/datastore writes bookmarks with fankt's own serializer, so bookmarks saved by an earlier version stay readable. That is a persistence boundary, not a screen one.

Contracts that are not models still come straight from fankt, wherever they are needed: the exception type the network layer throws, the cookie and session storage fankt requires, and the client entry point itself. Those are not part of the conversion described above.

Remote parsing updates

When FANBOX changes its API, the app stops being able to talk to it, and a fix would otherwise reach you only through a store update. To close that gap, the app fetches a signed bundle that builds every FANBOX request and interprets every response, and runs it instead of code shipped in the release. This applies to both Android and iOS.

This is used only to keep up with changes to the FANBOX API. It does not add features, and it does not change what the app does with your data. The bundle never sees your cookies: the app sends every request itself, after checking that it goes to FANBOX.

The bundle is verified against public keys compiled into the app. One that fails verification is not executed. A verified bundle is cached on the device, so later launches download only what changed, and a launch that cannot reach the delivery target runs the cached one. When there is no bundle to run, as on a first launch that cannot reach the delivery target, the app uses the same code as it was when the release was built. Fixes published since then apply the next time the app starts and loads a bundle.

What the app fetches is not whatever was published most recently. A bundle reaches the delivery target the app reads only when someone promotes it there deliberately; work that has not been promoted stays on a separate target the app does not read. Turning on developer mode switches the app to that separate target, which is how a bundle gets checked before it is promoted. The change applies the next time the app starts. Each target has its own cache, so a bundle cached from one never runs in place of the other. A faulty bundle is fixed by publishing a corrected one or by rolling the delivery target back to the previous one.

The Android app reports when a bundle loads, with the version it loaded, to Firebase Analytics, and reports a bundle that fails to load or to handle a response to Firebase Crashlytics. These reports carry neither response contents nor credentials. The Information section of the settings screen shows which bundle is handling FANBOX: the commit it was built from, followed by (cache) when it was loaded from the cache, or Native when the app is using the code it was released with.

Static analysis

Static analysis uses detekt 2.0.0-alpha.6, its ktlint wrapper, and Compose rules 0.6.8. The root task checks root/build-logic Kotlin files; module tasks check each module's Kotlin files.

./gradlew detekt reportMerge --continue
./gradlew :androidApp:lintDebug

Run ./gradlew detekt --auto-correct --continue to format code, then rerun without auto-correction. The merged Checkstyle report is build/reports/detekt/merge.xml; module HTML reports are under each module's build/reports/detekt/detekt.html. Merging includes only plain detekt reports.

Functions and constructors use separate parameter lines for three or more parameters, or whenever a parameter has a default value. FunctionSignature and ClassSignature enforce the parameter-count threshold. Review default-parameter wrapping, named arguments and wrapping at call sites, placing modifier first, and composable PascalCase names and screen prefixes manually. Method chains allow two calls per line, excluding property accesses. MaxChainedCallsOnSameLine is disabled because it also counts properties; review method chains and per-link Modifier wrapping manually. Line length does not determine wrapping.

config/detekt/detekt.yml matches the shared Agents template. Complexity and function-count thresholds use detekt defaults; function-count limits are 11. Only declarations with a concrete reason to stay together use @Suppress, with that reason directly above the annotation. Exceptions cover flows requiring initial cursor fetching, screen event handlers, declarative UI builders, and effects whose navigation or focus timing must be preserved. Cleanup of the unused fork is tracked in the Pager/Snapper migration issue. The iOS entry point migration requires coordinated Swift changes; Modifier double application preserves existing layouts until its separate cleanup. Cyclomatic complexity checks include composables. Modifier checks cover all visibilities, excluding previews and wrappers without their own layout.

Full mode covers Android main, host tests, and app debug; type-dependent rules do not cover iosMain. iOS is checked with light mode and actual compilation. Type-dependent rules run separately from the merged plain detekt report:

./gradlew detektMainAndroid detektHostTestAndroid :androidApp:detektDebug :androidApp:detektDebugUnitTest :androidApp:detektDebugAndroidTest --continue

Module check tasks and CI also run the corresponding full-mode tasks. These tasks preserve the source sets generated by detekt and exclude generated files under build directories. When KMP expect/actual compiler-analysis diagnostics occur, distinguish rule findings, analysis diagnostics, and actual Android/iOS compilation results. The log-event template in scripts/daifuku/templates/LogCategory.kt.erb is maintained together with the generated declarations. After generation, check formatting with ./gradlew :core:logs:detekt --auto-correct. Log events and their parameters are listed in scripts/daifuku/log_definitions/, one Markdown file per category. Definitions that are no longer sent are kept in scripts/daifuku/log_definitions/obsoleted/, which the generator does not read. Each event is sent to Firebase Analytics as <category>_<event>, for example billing_paywall_shown.

Contribute

This app uses Gradle's Convention Plugins to standardize the build logic, and all the logic is written in a module called build-logic. For information on this approach, see nowinandroid.

If you find a bug, want to improve a feature, or want to develop a new feature, please first write an issue. Then assign yourself and work on the development. Pull requests are always welcome 😄

This app is monetized using AdMob. When building manually from GitHub, you need to write the AdMob App ID in local.properties. By default it contains a dummy ID, which causes it to crash on startup. Alternatively, please delete the AdMob code and build the app. In addition, various IDs are described in local.properties. See androidApp/build.gradle.kts, shared/build.gradle.kts, or core/common/src/commonMain/kotlin/me/matsumo/fanbox/core/common/PixiViewConfig.kt for details.

Release builds (bundleRelease / assembleRelease) fail if any of the following Android AdMob IDs is unset or still a test ID. The error message lists the keys to set in local.properties. Debug builds use test IDs for unset keys.

  • ADMOB_ANDROID_APP_ID
  • ADMOB_ANDROID_BANNER_AD_UNIT_ID
  • ADMOB_ANDROID_NATIVE_AD_UNIT_ID
  • ADMOB_ANDROID_REWARD_AD_UNIT_ID
  • ADMOB_ANDROID_INTERSTITIAL_AD_UNIT_ID

License

PixiView
Copyright 2025 daichi-matsumoto

Licensed under the Creative Commons NonCommercial License (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://creativecommons.org/licenses/by-nc/4.0/

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Unofficial Android & iOS client application for pixivFANBOX (app name: FANBOX Viewer)

Topics

Resources

Stars

102 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages