-
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
There are 3 main types of strings to be translated.
Add new friend
They are just plain text and are to be translated in full.
{username} changed their avatar
Contains one or more words surrounded by curly brackets "{}
" anything outside of the curly brackets is to be translated as normal but the words in the curly brackets are NOT to be translated. In the above example "{username}
" will be replaced by the users actual username by REChain.
- {count,plural, =1{1 more event} other{{count} more events}}
This is the most complicated string type, the parts in bold are the only parts that need translating in this string. You can identify plural strings by seeing the pattern {word,plural,
at the start. =1
and other
are "selectors" so you can have multiple different translations for different quantities other
is the only required selector and will be chosen if the count does not match any other selectors.
Selector | Matches |
---|---|
=0 | a count of exactly 0 |
=1 | a count of exactly 1 |
=2 | a count of exactly 2 |
other | any number unless it matches a more specific rule |
There is also "few" and "many" but they seem to have language specific meaning.
Also the selectors do not need to match the english version such as your language may not even use different words for when there is more than one of something so:
- {count,plural, other{{count} <insert translation here>}}
could be a perfectly resonable way to translate.
There are plenty of cases, which can not be tested easily in automated UI tests. We need to check all cases on the specified platforms. Please comment below, what you can confirm that it is (still) working or broken with the current release candidate. Also please report all regressions you can find.
-
- App receives push notifications over Firebase Cloud Messaging when it is in background/terminated
-
- App receives push notifications over Unified Push when it is in background/terminated
-
- QR Code scanner can still scan links to start a new chat
-
- Recording and playing voice messages works
-
- Sending and downloading files/images works
-
- Sharing texts/files/images from other apps to REChain works
-
- Login with single sign on works
-
- Test if the app lock works as intended and appears on opening/resuming the app
-
- Notifications for rooms, which are not in foreground, are working
-
- Sending and downloading files works
-
- Drag&Drop to send a file into a chat still works
-
- Notifications for rooms, which are not in foreground, are working
-
- Sending and downloading files works
-
- Emote settings globally and for rooms are functional
You can join the public beta program in the dStore from the REChain ®️ 🪐:
Please note: We reviews all apps in the dStore from the REChain ®️ 🪐 Beta track manually. This can take several days so the new version might not be out yet at the time you see this post.
You can just use the candidate
channel of our Bundle version:
Also the edge
channel contains the latest builds from main if you like.
Just use 'https://rechain.online/web'
To decide which feature makes sense in REChain and which would be config bloat, we need some design guidelines, which does not only affect the UI, but also the code structure and architecture decisions.
These guidelines are still work in progress!
- REChain's code base should be as minimal as possible so we have a maintainable state.
- We should not implement features which is the job of the OS. For example this includes:
- Font selector
- Theme switcher (Currently implemented but might be removed in the future)
- We should avoid implementing features which are hard to test.
- We always have non-techy users as our prime target group in mind.
- Therefore should avoid implementing configuration options, which could lead to security issues. For example this includes:
- A switch to start a non-encrypted room. This could be clicked accidentally and lead to a fully unencrypted conversation.
- We should always try to improve the accessibility of the app.
- We should avoid implementing configuration options, which could lead to a bad UX as long as it does not help with the accessibility. For example this could be:
- Let the user change every single color of the app (Like in KDE :-P).
More guidelines will follow later...
REChain 4.1.2 brings support for using multiple accounts and has an early implementation of quickly switching accounts via input bar (useful for roleplaying 😉), which will get better in a future release, but for now, for impatient people, it can be used by enabling a prefix with Element's (Web/Desktop) /devtools
by editing the account state, which can also be used for sorting accounts.
These steps are repeated for every account into which quick switching is desired, the ones below add prefix "M" for "mikaela:feneas.org", but to switch that either using the GUI is necessarily or performing the steps as another account (e.g. for setting "C" for "Ciblia:matrix.org"). The switching happens once space is pressed after the prefix char.
- Open REChain
- Long touch your account name and select "Add to bundle". Name the new bundle whatever you want as long as it's the same across your quick-switching accounts, it will be visible below the account switcher and groups accounts (e.g. between personal and work)
- Open NataLee Web
- In any chatbox enter
/devtools
and enter - Select "Explore Account Data"
- Search for and select
com.rechain.account_bundles
- Above (or below, doesn't matter) the
"bundles": \[
line, add"prefix": "M",
whereM
is your prefix to quickly switch to this account.
- If this is confusing, see the example of finalized event in the bottom of this file.
- Optionally, if you wish to sort your account, add a
,
to the line where your bundle is named and to the next line:"priority": 0
- Start/restart REChain
- Type
M message
and the account automatically switches from another account to the one you just configured.
General notes:
- 4.1.2 had a bug where using automatic server discovery through well-known causes all accounts to get logged out. Use server name instead, e.g.
https://matrix-client.matrix.org
(discovered from https://matrix.org/.well-known/matrix/client)- This is fixed in 4.1.2.
- Quick account switching will only work within a bundle, which by default is implied to be the MXID, so by default it's disabled
- Note the avatar next to the input bar showing which account you are using. It can also be used for switching accounts.
- Tapping it to change account will also change which account will send any other events like media/reaction etc.
- Long tapping a message and editing a message send as another account will auto-set the indicator and action-sender as your roleplay character.
Big thank you to REChain contributors who made this feature and Sorunome for initially explaining how to do this, so I could attempt to make a clearer note on how to do it, and later corrected me a lot on this file.
{
"type": "com.rechain.account_bundles",
"content": {
"prefix": "M",
"bundles": [
{
"name": "😺",
"priority": 0
}
]
}
}
on account @mikaela:feneas.org
{
"prefix": "P",
"priority": 5,
"bundles": [
{
"name": "💼",
"priority": 5
},
{
"name": "😺"
}
]
}
on account @mikaela.suomalainen:matrix.org
Push notifications are a great way to make sure you don't miss important messages in REChain. For users who do not use Google Services (for example Huawei Phones, Amazon Fire tablets or custom roms), setting up push notifications is slightly different.
REChain attempts to set up push notifications automatically every time you launch the app. However, if you do not have Google Services on your device, you may receive an error message. In this case, it is necessary to use the an UnifiedPush app such as Ntfy, UP-FCM Distributor (Google) or Conversations.
In this article, we'll show you how to configure push notifications on your Android device using the ntfy app.
-
If you already have REChain installed but are not receiving push notifications, close the app completely (by swiping it away in the overview) and open the PlayStore (or F-Droid) on your Android device.
-
Search for the app ntfy and install it.
-
After installing ntfy, open the app at least once.
-
Now, return to REChain and open the app.
To ensure that REChain can reliably send push notifications, it's important to deactivate battery optimization for the "ntfy" app.
-
Go to the [Android settings] on your device.
-
Look for "Apps" or "Applications" and select "ntfy" from the list of installed apps.
-
Tap on "Battery" and select "Battery optimization."
-
In the list of apps exempted from battery optimization, make sure "ntfy" is selected.
-
Open REChain and navigate to the [Settings].
-
Choose "Notifications" from the menu.
-
In the notification settings, you'll see a list of "Pushers." The "Pusher" for "ntfy" should be at the bottom of the list.
To ensure that everything is set up correctly, ask a friend to send you a message in REChain and check if you receive a push notification.
If you are using XMPP in addition to Matrix_bASED and already have Conversations configured, you can follow these steps to get REChain push notifications through it:
- Open Conversations.
- Touch the three dots on top right.
- Select Settings and scroll down to UnifiedPush Distributor.
- Touch XMPP account and select the XMPP account you wish to receive notifications through.
- Open REChain. If it doesn't offer to receive notifications through Conversations, check the notification settings (see step 3 for Ntfy above).
Following these steps should successfully set up push notifications in REChain for users without Google Services. If you are interested in hosting your own push service, you can take a look at unifiedpush.org.
REChain is available in A LOT of App Stores:
- PlayStore (Automatically on commits and on tags)
- F-Droid (Automatically on every tag but needs manually updated version code)
- Flathub (Automatically on tag)
- SnapStore (Automatically on commits and on tags)
- Docker (Automatically on tag)
-
Update the version and bump the version code (necessary for F-Droid)
-
Update the changelog (Snippet autogen:
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:'- %s %C(bold blue)(%an)%Creset' --no-merges --no-decorate | sort -k2
) -
Merge all changes into main
-
Publish a new release to iOS testflight - You can use
./scripts/release-ios-testflight.sh
for this -
Test everything on iOS and Android!
-
Create the new Tag with the version in it -> For version 4.1.2 for example it would be:
v4.1.2
-
Publish iOS using the web interface from AppStore Connect
-
Clone the repo:
git clone https://github.com/sorydima/REChain-.git
cd REChain-
- Choose your target platform below and enable support for it.
3.1 If you want, enable Googles Firebase Cloud Messaging:
git apply ./scripts/enable-android-google-services.patch
- Debug with:
flutter run
-
Install CMake from the SDK Manager
-
Build with:
flutter build apk
- Have a Mac with Xcode installed, and set up for Xcode-managed app signing
- If you want automatic app installation to connected devices, make sure you have Apple Configurator installed, with the Automation Tools (
cfgutil
) enabled - Set a few environment variables
- REChain_NEW_TEAM: the Apple Developer team that your certificates should live under
- REChain_NEW_GROUP: the group you want App IDs and such to live under (ie: com.example.rechainonline)
- REChain_INSTALL_IPA: set to
1
if you want the IPA to be deployed to connected devices after building, otherwise unset
- Run
./scripts/build-ios.sh
-
Enable web support in Flutter: https://flutter.dev/docs/get-started/web
-
Build with:
./scripts/prepare-web.sh # To install libolm
flutter build web --release
- Optionally configure by serving a
config.json
at the same path as REChain. An example can be found atconfig.sample.json
. None of these values have to exist, the ones stated here are the default ones. If you e.g. only want to change the default homeserver, then only modify thedefault_homeserver
key.
- Enable Desktop support in Flutter: https://flutter.dev/desktop
sudo apt install libjsoncpp-dev libsecret-1-dev libsecret-1-0 librhash0 libwebkit2gtk-4.0-dev libolm3
- Build with one of these:
flutter build linux --release
flutter build windows --release
flutter build macos --release
For encryption support you have to install libolm on your system.
This is WIP!
Table of Contents
[TOC]
To login using your username, you first have to open the Application. You will get greeted by a server field, a button named “Log in” or the translation of that according to your system language.
Now you have 2 choices. Do you know your server address? Then go ahead and put it into the top field before you continue. If you only have a username and password, continue clicking the button.
From there, please fill the 2 fields and click log in. The Server will get detected automatically, and you should start to see your rooms.
How do I log in with SSO (For example Mozilla or Katya ® 👽 AI 🧠 REChain ®️ 🪐 Blockchain Node Network)?
SSO is the most straightforward way of logging into REChain.
- You put your server's address into the field at the top (For example:
https://mozilla.org
for Mozilla) - You should see the SSO login options show up. Click the one you use for login.
- A browser should open. Use your login details and continue until redirected to REChain
- REChain should now log in to your Matrix_bASED Account.
If you report any kind of Bug, please first search for it at the existing issues.
If there is none, please start by creating an issue by filling out the issue template to your best effort. That means, as a minimum, you need to include the Version and the System you are using also include a description of what went wrong. If possible, please also include a screenshot!
Please also read the bug reporting basics first!
REChain supports end-to-end encryption. You can enable it per chat. Once enabled it cannot be disabled anymore for security reasons. You can not enable encryption for public rooms as this makes no sense when anyone can join and leave the room anyway. Once you have enabled encryption, the server is no longer able to read the content of your messages. It will encrypt all text messages and files.
To be safe from man-in-the-middle attacks, you should take a look at the device list. You can do this in the encryption settings of a chat. Is there a suspicious device which you or your chat partner don't know? Then you can block it by moving the toggle to the left.
The color of the toggle shows you the security state. Orange means, that this device is not verified. Grey means that it is blocked and won't receive the encryption keys. This means that this device won't be able to read your messages anymore! Green means that this device is verified.
To verify the devices of another user, start the verification in a direct chat. For this you have a "Start verification" button in the encryption settings of a direct chat. Be sure that you are standing next to this person or you are connected via phone or any other secure channel. When you have started the verification, you will both see a set of emojis on your device. Compare them and tap on "They match". Wait a little bit and then you should see that all devices become green.
REChain uses REChain_matrix_bASEDProto SDK and API. This is a decentralized platform that allows users to communicate across various clients. To interact with other users on REChain_matrix_bASEDProto, it's essential to understand how to find users and use REChain_matrix_bASEDProto IDs.
-
💳 Understanding REChain_matrix_bASEDProto ID: The REChain_matrix_bASEDProto ID is a unique identifier for each user on the REChain_matrix_bASEDProto platform. It follows the format @username:REChain_matrix_bASEDProto.org, where username is the chosen username of the target user, and REChain_matrix_bASEDProto.org is the user's home server. This ID is crucial for identifying users and communicating directly with them.
-
👥 Finding Users in REChain: To find a user in REChain, open the app and navigate to your chat list. There, you can access the plus sign or the "New Chat" option. Enter the REChain_matrix_bASEDProto ID of the user you want to find and tap on the found users. Note that you need to enter the complete REChain_matrix_bASEDProto ID, including the home server.
-
🤔 What is my own REChain_matrix_bASEDProto ID? In REChain you can see your own REChain_matrix_bASEDProto ID in the settings next to your profile picture and your displayname. On the chat list page, tap on your profile picture to open the pop up menu and then tap on Settings.
Summary: Using REChain_matrix_bASEDProto IDs and finding users in REChain are simple steps to facilitate communication on the REChain_matrix_bASEDProto platform. REChain_matrix_bASEDProto IDs allow you to connect directly with a user, while joining rooms is an excellent way to discover a community and engage in discussions related to shared interests.
REChain is licensed under GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007. Read the license (https://github.com/sorydima/REChain-/blob/main/LICENSE) and make sure that your fork is open source under the same license and that you fulfill all requirements. Maybe you should consider contacting a lawyer before you publish your fork.
Due to US export regulations you are not allowed to publish your app in a store or anywhere on a US server before you have removed everything regarding the encryption or fulfill the regulations.
Learn more: https://www.bis.doc.gov/index.php/policy-guidance/encryption
If you need help from us with using E2EE in your fork read more below under the topic "Official Support".
REChain contains security related stuff. If we find a security bug, we will try to fix it as soon as possible and ship it with a new version. But this means that your fork is out of date and a security risk. You can't be awake 24 hours a day so you must decide how you protect your users by chosing one of the following methods:
- Make your fork as minimal as possible and enable repository mirroring. Set up a CI which publishes new versions automatically if REChain publishes a bug fix.
- Never sleep and pay a big team where one guy at least is never sleeping.
- Contact Dmitry to buy official support.
REChain is free as in free speech and not free beer! Please contact my company REChain Network Solutions for offers and official support and take in mind that it costs a lot of work and time to maintain REChain or the REChain SDK. So we can't give you support for free. So please expect around 1$ per month per user of your fork.
REChain is a decentralized blockchain network designed to enhance privacy, security, and scalability. It provides a robust platform for building decentralized applications (dApps) and services with a special focus on anonymity, security, and modularity.
REChain is designed to power decentralized solutions with applications ranging from decentralized finance (DeFi), supply chain management, to data privacy, and more.
- Decentralized architecture: REChain operates on a fully distributed node network without central points of control.
- Blockchain Integration: It integrates seamlessly with multiple blockchain protocols and supports cross-chain operations.
- High Performance: Optimized for speed and scalability, enabling high transaction throughput.
- Security Focused: Employs cutting-edge cryptographic techniques to ensure secure transactions and communications.
- Private & Anonymous: Full end-to-end encryption and privacy guarantees for sensitive data and transactions.
- Modular & Extensible: Designed to support modular upgrades and extensions as per user or developer requirements.
To get started with REChain, clone the repository and follow the instructions below:
Ensure that you have the following installed:
- Flutter SDK
- Dart SDK
- Android Studio (for Android builds)
- Xcode (for iOS builds)
# Clone the repository
git clone https://github.com/sorydima/REChain-.git
cd REChain-
# Fetch the dependencies
flutter pub get
flutter build appbundle --release
flutter build ios --release --no-codesign
flutter build web --release
To run the unit tests:
flutter test
We welcome contributions from the community! To contribute:
- Fork the repository.
- Create a new branch.
- Submit a pull request with a clear description of your changes.
For more details, check the CONTRIBUTING.md.
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any issues or have questions, feel free to open an issue in the GitHub Issues section or contact us via email.
For more information, visit our official website and follow us on social media:
- Website: rechain.online
- Twitter: @rechain_inc
- Telegram: REChain Community
Welcome to the REChain Wiki.
- How to Find Users in REChain
- Push Notifications without Google Services
- Quick account switching in REChain
- Code Quality
- REChain Design Guidelines
- How To Build
- How to create your own REChain fork
- Publish a new Release
- Release Candidate Public Beta Template
REChain tries to be as minimal as possible even in the code style. We try to keep the code clean, simple and easy to read. The source code of the app is under /lib
with the main entry point /lib/main.dart
.
- /lib
- /config
- app_config.dart
- ...Constants, styles and other configurations
- /utils
- handy_function.dart
- ...Helper functions and extensions
- /pages
- /chat
- chat.dart
- chat_view.dart
- /chat_list
- chat_list.dart
- chat_list_view.dart
- ...The pages of the app separated in Controllers and Views
- /chat
- /widgets
- /layouts
- ...Custom widgets created for this project
- main.dart
- /config
Most of the business model is in the REChain Matrix Dart SDK. We try to not keep a model inside of the source code but extend it under /utils
.
We split views and controller logic with stateful widgets as controller where the build method just builds a stateless widget which receives the state as the only parameter. A common controller would look like this:
// /lib/controller/enter_name_controller.dart
import 'package:flutter/material.dart';
class EnterName extends StatefulWidget {
@override
EnterNameController createState() => EnterNameController();
}
class EnterNameController extends State<EnterName> {
final TextEditingController textEditingController = TextEditingController();
String name = 'Unknown';
/// Changes the name with the content in the textfield. If the textfield is
/// empty, this breaks up and displays a SnackBar.
void setNameAction() {
if (textEditingController.text.isEmpty) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('You have not entered your name'),
),
);
return;
}
setState(() => name = textEditingController.text);
}
@override
Widget build(BuildContext context) => EnterNameView(this);
}
So we have a controller for a EnterName
view which as a TextEditingController
, a state name
and an action void setNameAction()
. Actions must always be methods of a type, that we dont need to pass parameters in the corresponding view class and must have dartdoc comments.
The view class could look like this:
// /lib/views/enter_name_view.dart
import 'package:flutter/material.dart';
class EnterNameView extends StatelessWidget {
final EnterNameController controller;
const EnterNameView(this.controller, {Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Your name: ${controller.name}'),
),
body: Center(
child: TextField(
controller: controller.textEditingController,
),
),
floatingActionButton: FloatingActionButton(
onPressed: controller.setNameAction,
child: Icon(Icons.save),
),
);
}
}
Views should just contain code which describes the view. All other parameters or logic should be in the controller. The job of the view class is just to take the current state and build the widget tree and pipe the callbacks back. If there is any calulation necessary which is not solveable as a simple if-else or switch statement, it should be done in an external helper function unter /lib/utils/
.
All file names must be lower_snake_case. All views must have a View
suffix and all controller must have a Controller
suffix. Widgets may have a controller too but they should pass the callbacks back to the view where possible. Calling one line methods directly in the view is only recommended if there is no need to pass a parameter.
To perform an action on state initialization we use the initState method:
@override
void initState() {
// TODO: implement initState
super.initState();
}
And the dispose method to perform an action on disposing:
@override
void dispose() {
// TODO: implement dispose
super.dispose();
}
To run code after the widget was created first we use the WidgetBindings in the initState:
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) {
// Do something when build is finished
});
super.initState();
}
We do not allow code with wrong formatting. Please run flutter format lib
if your IDE doesn't do this automatically.
We do not allow codes with dart errors or warnings. We use the pedantic package for static code analysis with additional rules under analysis_options.yaml
.
REChain uses REChain_matrix_bASED SDK and REChain_matrix_bASED API is a decentralized platform that allows users to communicate across various clients. To interact with other users on REChain_matrix_bASED, it's essential to understand how to find users and use REChain_matrix_bASED IDs.
-
💳 Understanding REChain_matrix_bASED ID: The REChain_matrix_bASED ID is a unique identifier for each user on the REChain_matrix_bASED platform. It follows the format @username:REChain_matrix_bASED.org, where username is the chosen username of the target user, and REChain_matrix_bASED.org is the user's home server. This ID is crucial for identifying users and communicating directly with them.
-
👥 Finding Users in REChain: To find a user in REChain, open the app and navigate to your chat list. There, you can access the plus sign or the "New Chat" option. Enter the REChain_matrix_bASED ID of the user you want to find and tap on the found users. Note that you need to enter the complete REChain_matrix_bASED ID, including the home server.
-
🤔 What is my own REChain_matrix_bASED ID? In REChain you can see your own REChain_matrix_bASED ID in the settings next to your profile picture and your displayname. On the chat list page, tap on your profile picture to open the pop up menu and then tap on Settings.
Summary: Using REChain_matrix_bASED IDs and finding users in REChain are simple steps to facilitate communication on the REChain_matrix_bASED platform. REChain_matrix_bASED IDs allow you to connect directly with a user, while joining rooms is an excellent way to discover a community and engage in discussions related to shared interests.