A client for Pleroma and Mastodon instances written using Flutter
- AppStore
- AppStore TestFlight Beta (coming soon)
- Features
- Coming soon
- Known issues
- Data gathering
- Push notifications
- Localization
- License
- Feedback
- For developers
- Pleroma and Mastodon support
- Offline mode. Access to cached data event without network
- Custom emojis. With emoji reactions support on Pleroma
- Customizable home timelines
- Multi-account support
- Push notifications via Push Relay Server and FCM
- Income and external share support
- Scheduled and Draft Statuses
- Filters
- Instance details, announcements, trends, activity history, limits
- Day & Night theme
- Bookmarks, Hashtags, Lists, Featured tags, Suggestions
- Messenger-like UI for Conversations(DM) and Pleroma chats
- Customizable real-time notifications & timeline updates via WebSockets and Push Notifications
- Fetch data from Remote instances via Public API. So you can access full date on remote instance if currently logged instance didn't synchronized all data yet
- A lot of settings options(global or per-instance). For example:
Always show NSFW
orAuto-load media content
- Threads & Polls
- Special UI for media-only timelines
- Mutes & Blocks
- Editing profile
- Sign up support
- Rich notifications(actions, layouts, grouping, channels)
- Admin API
- Support other Fediverse instances: Pixelfed, Misskey, Peertube, GNU Social, Friendica and others
- Pleroma: scrobbles, mascot and recently added new features
- Mastodon: recently added new features.
- Adopt UI for large screens
- Display timelines from different instances on single Home page(currently you should switch instances to see related data)
- Remember timeline position via Markers API
- OnBoarding & Tutorial. Popular instances suggestions
- A lot of minor UX improvements in backlog
Feel free to open issues if you have suggestions
- Text not selectable, but you can copy or share whole statuses
- Instances with special chars like
ü
not supported
- You can build app from source and remove Crashlytics via .env config(details below)
- Option to disable Crashlytics gathering inside App (coming soon)
Push notifications implemented via Web Push Relay(Proxy) server
Web Push Relay is Ruby on Rails server which handle Web pushes and proxy them to FCM
- LINK TO PUSH RELAY REPO (coming soon)
- Fedi subscribe to
/api/v1/push/subscription
withsubscription[endpoint]
set to relay server URL - Instances send Web push notifications to relay server
- Relay server proxy decrypt notifications (will be removed in the future, Fedi will decrypt notifications on client side)
- Relay server proxy notifications to Fedi app via FCM
- Fedi display notifications
- Notifications are not enabled by default and Fedi ask you about notification after login.
- You can also disable notifications later in any time.
- You can completely remove FCM and Push Relay Usage(or use your own FCM credentials and Push Relay server instance)
{
"access_token""=>""QiQGKu6wAsF6M3bWJ3FMTvfK_rW...",
"body""=>"@jffdev2: @jffdev hello world",
"icon""=>""https://fedi.app/images/avi.png",
"notification_id"=>1114,
"notification_type""=>""mention",
"pleroma""=>"{
"activity_id""=>""A82wvAgZu7n7B...",
"direct_conversation_id"=>42..
},
"preferred_locale""=>""en",
"title""=>""New Direct Message"
}
- As you can see server sent
body
which may have private data(like private Status body) andaccess_token
access_token
is sensitive data. It is possible to login to your account if someone knowaccess_token
Currently Wep Push Relay server known about Private and Public keys used for decryption notification messages. It was not possible to decrypt message on Flutter side and display notification. Main issue was with FCM library. However latest FCM library release and another 3rd party libraries like `awesome_notifications provides API to move all decryption logic on Flutter side and Fedi will implement this logic ASAP.
Push Relay will know nothing(everything will be encrypted) once decryption logic will be moved to Flutter side.
App uses flutter_localization
API bundle with Flutter SDK.
It uses .arb
files located in lib/l10n
and generates .dart
classes in /lib/generated/
folder.
After you make changes in .arb
files you make additional actions to regenerate Dart classes
- automatically via (
flutter intl
)[https://plugins.jetbrains.com/plugin/13666-flutter-intl] plugin - manually via (
flutter intl
)[https://pub.dev/packages/intl_utils] package
- English, Russian
- Help translate Fedi with Weblate
- It is easy to suggest fixes even without registering
- The best option is to create issue for this repository
- Null-safety support
- Feature-based folder structure
- Prefer composition over inheritance
- Dependency Injection implemented via
provider
- Prefer
StatelessWidget
and async UI update viaStreamBuidler
andBehaviourSubject
&StreamController
in controller classes - Prefer divide
Widgets
in small subWidgets
withconst
constructor(for better performance) if possible - Provide data to nested elements via
provider
- Prefer
Repository
pattern. Almost all network data cached in local SQLite database. UI always display data from single source. It may be network-only or from database(if data cached). Don't cache and merge data in memory to achieve data consistency - Prefer Effective Dart name and style code conventions
- Prefer long file & classes names like
account_follower_account_cached_list_bloc_impl.dart
andAccountFollowerAccountCachedListBloc
- It easy to understand what class do
- It easy to navigate in IDE by typing start letters of name
- One class = one file
- Prefer
interfaces
forBussines Logic
andServices
- Simple append
I
to implementation class name.AccountFollowerAccountCachedListBloc
implementation andIAccountFollowerAccountCachedListBloc
interface - Code readability: you can see small list of public methods/fields in interface file instead of exploring long file with implementations
- It useful to implement extensions for interfaces not for implementations
- It useful to extends several interfaces in one child to separate logic
- It useful to create tests and mocks
To build Fedi you need Flutter version specified in .fvm/fvm_config.json
field flutterSdkVersion
.
You can achieve this by specifing your system Flutter version by using flutter version $version
or using FVM
Fedi uses Flutter Version Management to clearly specify Flutter version to build app.
FVM also helps manage several SDKs version on local machine
Config already done, so you just run fvm install
in repo folder and configure IDE to use .fvm/flutter_sdk
folder instead of system Flutter SDK.
To use flutter version specified in .fvm/fvm_config.json
you should prepend fvm
like fvm flutter install
More info you can found in FVM documentation
moor
is SQLite ORM. For local data cache & offline mode supporthive
is secure and fast storage for preferencesprovider
for Dependency Injectionflutter_html
for content renderingrxdart
for reactive programmingpedantic
&dart_code_metrics
for better code analyzing. Seeanalysis_options.yaml
for enabled rulesflutter_cache_manager
for media cachingflutter_intl
for localization via.arb
files- A lot of UI-related(like
pull_to_refresh
) and Platform-dependent(likepermission_handler
) libraries flutter_config
to config via .env files
You can find full list in pubspec.yaml
where each library have comment why it's used
- Fedi uses vector icons compiled in icon font via fluttericon.com
- folder icons_export contains config for fluttericon.com currently used by Fedi
- Fedi have unit-tests for Business Logic and Services classes
- Integration & UI tests not implemented yet
- You can explore Fedi Trello board for known issues and current work progress
git clone https://github.com/Big-Fig/Fediverse.app
cd Fediverse.app
Install Flutter version used by this project
fvm install
Copy config for prod
and dev
flavors
cp env_example.env env_prod.env
cp env_example.env env_dev.env
Example config disable some features like Push notifications.
To enable all features you should change app id, create Firebase project and edit config file.
- Download all required libraries
fvm flutter pub get
- Run by Flavor
fvm flutter run --flavor dev
or
fvm flutter run --flavor prod
- Specify Flutter SDK path
File->Preferences->Languages & Frameworks->Flutter
to<Project_Root>/.fvm/flutter_sdk
- Dart SDK should be configured automatically. But you can check Dart SDK path at (
File->Preferences->Languages & Frameworks->Dart
). Should be<Project_Root>/.fvm/flutter_sdk/bin/cache/dart-sdk
- Specify flavor(
prod
ordev
) inRun Configurations
Run->Edit configurations
- Click
Pub get
in IDE or runfvm pub get
in terminal - Connect device or run emulator
- Run
There are two flavors.
Implementation details: Build flavors in Flutter (Android and iOS) with different Firebase projects per flavor
Used for production builds
Used for development builds. You can use only prod flavor if you don't need special config for development
Main purpose of config files is to exclude sensitive data from source control and quickly enabled/disable and config some features like Push Notifications
Build script uses config from project root folder depends on flavor, so to build app you should have next files in root folder
env_prod.env
env_dev.env
Those files excluded from source control.
You can find all possible config variables(with comments) at env_example.env
fvm flutter clean
./gradlew clean
in android folderProduct->Clean
in XCode
Sometimes it also need to clear iOS pods
cd ios
rm -rf Pods
rm Podfile.lock
pod install
Changing App ID is required if you want to setup own Push Relay server and pushes via your Firebase project for FCM.
It also useful if you want to have several app versions installed on one device
Unfortunately, it is not possible to use APP_ID from config in all places in Gradle and XCode project files. So in some places ID is hardcoded
So, If you want to change app id from com.fediverse.app
for prod
and from com.fediverse.app2
for dev
you should manual changes (in additional to changes id in .env
files)
Actually you should run Find and Replace com.fediverse.app
with your package name on ios
and android
folders. And rename folders at android/app/src/main/kotlin
However, it may cause strange build errors. So you may need full clean
If you still have errors please explore App ID things in the next docs:
- Build flavors in Flutter (Android and iOS) with different Firebase projects per flavor
flutter_config
firebase_core
firebase_crashlytics
firebase_messaging
receive_sharing_intent
Signing config required to make release
builds
Generate key via Tutorial and put it in android/key/key.jks
(exclude from source control)
Create android/key.properties
(exclude from source control) file with next template.
storePassword=pass1
keyPassword=pass2
keyAlias=keyName
storeFile=../key/key.jks
Follow official tutorial
To use Firebase service you should generate files from your Firebase project page and put in project.
Don't forget to enable in .env
file
FIREBASE_ENABLED=false
####### Android
- Generate
google-services.json
Put google-services.json
to folder depends on used flavor
android/app/src/dev
android/app/src/prod
- Generate
GoogleService-Info.plist
Put GoogleService-Info.plist
to folder depends on used flavor
ios/config/dev
ios/config/prod
For more details see
- Flutter Firebase documentation
- Build flavors in Flutter (Android and iOS) with different Firebase projects per flavor
To enable Push notifications you should
- change App ID
- create Firebase Project for your App ID,
- generate Firebase config and integrate in app
- generate FCM server key
- setup own Push Relay Server(link to repo coming soon) instance and put your FCM server key
App ID and FCM server key(so and Push Relay Server instance) are connected. It is not possible to use one Push Relay Server instance with several App IDs and vice versa
On/Off via .env. Firebase Core integration required
PUSH_FCM_ENABLED=false
Required if PUSH_FCM_ENABLED=true
PUSH_SUBSCRIPTION_KEYS_P256DH
User agent public key. Base64 encoded string of public key of ECDH key using prime256v1 curve.
PUSH_SUBSCRIPTION_KEYS_AUTH
Auth secret. Base64 encoded string of 16 bytes of random data.
More info in Mastodon docs
PUSH_FCM_RELAY_URL=https://pushrelay.example.com/push/
PUSH_SUBSCRIPTION_KEYS_P256DH=BEpPCn0cfs3P0E0fY-gyOuahx5dW5N8qu
PUSH_SUBSCRIPTION_KEYS_AUTH=T5bhIIyre5TDC
On/Off via .env. Firebase Core integration required
CRASHLYTICS_ENABLED=false
Used to catch errors on client side with error description and stackTrace
You should enable Firebase support and change config variable in .env file to enable crash reporting
XCode project have additional ShareExtension module required by receive_sharing_intent
to handle income share events.
It also important to add Target
and ShareExtension
to same group ID.