Skip to content

Commit 59c14ba

Browse files
AlaaElattarzaelgoharyAhmedHanafy725
authored
update readme docs (#1007)
* update readme docs * Update README.md Co-authored-by: Zainab Elgohary <40770501+zaelgohary@users.noreply.github.com> * remove `new codebase` section * update readme files * update local development section && provide how to build apk * move flutter version inside app dir * Update app/README.md Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com> * clarify that qrcode scanner works with json * remove grid2 links from readme of backend * update background service interval --------- Co-authored-by: Zainab Elgohary <40770501+zaelgohary@users.noreply.github.com> Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com>
1 parent 83e9313 commit 59c14ba

3 files changed

Lines changed: 156 additions & 101 deletions

File tree

README.md

Lines changed: 4 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -4,76 +4,11 @@
44

55
Threefold Connect is a mobile app that serves as your main gateway to the Threefold Grid and various other Threefold products and services.
66

7-
It contains an ultra secure 2FA authenticator for authenticating through third party applications.
8-
9-
Inside the app, you can manage your Threefold Tokens(TFT).
10-
11-
## Features
12-
13-
### Threefold news
14-
15-
Inside the app, there is a "News" section where you can find all the latest Threefold news!
16-
17-
### Wallet
18-
19-
In the Threefold Connect app, it is possible to manage your TFT and view your transaction history on the TF chain.
20-
21-
### Farmers
22-
23-
If you own a Threefold node, you can manage your farm here.
24-
25-
### Support
26-
27-
If you have Threefold related questions, we provide a support chat where we will answer your questions as soon as possible!
28-
29-
30-
### Identity
31-
32-
When you are using the secure 2FA authentication, some third party apps require certain information (eg. phone number). In this tab you can verify your email, phone number and identity to provide this data to the third party application. This allows you total granular control over which data you choose to share or not share.
33-
34-
## New codebase
35-
36-
In June 2022, a new codebase has been written for this project. It is built on turborepository. This codebase is still in development and not ready yet, you can find this under v2 branch.
37-
38-
## Local development
39-
40-
### External repositories
41-
42-
Threefold News: <https://github.com/threefoldtech/threefold_connect_news>
43-
44-
Wallet v3: <https://github.com/threefoldtech/wallet-next>
45-
46-
Farmer: <https://github.com/threefoldtech/wallet-next>
47-
48-
Support: <https://github.com/threefoldtech/test_feedback>
49-
50-
## Frontend
51-
52-
Make sure the correct configuration is inside config.js. After that start the frontend by doing:
53-
54-
`yarn && yarn serve`
55-
56-
## Backend
57-
58-
Go inside virtual environment:
59-
60-
`source ./venv/bin/activate`
61-
62-
Start UWSGI backend:
63-
64-
```bash
65-
uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
66-
: 1643024584:0;uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
67-
```
68-
697
## App
708

71-
Make sure you have at least Flutter 2.8.1 installed. If everything is installed properly, execute the following commands:
72-
73-
Copy the file in /lib/app_config_local.template into /lib/app_config_local.dart and change the configuration to your local IP's
74-
75-
After that, use the build.sh script to set up the right environment
9+
## Local development
7610

77-
`./build.sh --init && ./build.sh --switch --local`
11+
- check [frontend/README.md](frontend/README.md)
12+
- check [backend/README.md](backend/README.md)
13+
- check [app/README.md](app/README.md)
7814

79-
Connect your phone / start an emulator and everything should work properly.

app/README.md

Lines changed: 125 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# threebotlogin
1+
# Threefold Connect
22

3-
A decentralized login application
3+
Decentralized login application for Threefold grid.
4+
5+
It contains an ultra secure 2FA authenticator for authenticating through third party applications.
6+
7+
Inside the app, you can manage your Threefold Tokens(TFT).
48

59
## Getting Started
610

@@ -15,11 +19,128 @@ For help getting started with Flutter, view our
1519
[online documentation](https://flutter.dev/docs), which offers tutorials,
1620
samples, guidance on mobile development, and a full API reference.
1721

22+
## Features ✨
23+
24+
### Wallet
25+
26+
In the ThreeFold Connect app, you can:
27+
28+
- Manage your ThreeFold Tokens (TFT) across multiple wallets
29+
- Import existing wallets using seed phrases or secret keys
30+
- Send and receive tokens on both TFChain and the Stellar network
31+
- Bridge tokens between TFChain, Stellar and Solana networks
32+
- Verify your identity for KYC requirements
33+
- Monitor your balance in real-time
34+
- Manage contacts for easy transfers
35+
36+
### Farm
37+
38+
In the ThreeFold Connect app, you can:
39+
40+
- Create and manage both v3 and v4 farms
41+
- View farm details and configurations
42+
- Track node status (online/offline) in real-time
43+
44+
### Node Monitoring
45+
46+
- Receive proactive notifications when nodes go offline
47+
- Smart notification system that categorizes offline nodes:
48+
- Recent outages (0-2 hour): Notifications every 15 minutes
49+
- Short outages (2-4 hours): Notifications every hour
50+
- Medium outages (4-24 hours): Notifications every 4 hours
51+
- Extended outages (1-3 days): Notifications every 12 hours
52+
- Long outages (3-7 days): Notifications once daily
53+
- Very long outages (beyond 7 days): Notifications suppressed
54+
55+
### DAO
56+
57+
Inside the app, you can vote on TFChain proposals and view the results of your votes.
58+
59+
### Signing
60+
61+
Inside the app you can sign content with one of your wallets.
62+
63+
The content is hashed by md5 and signed by sr25519 using one of your wallets.
64+
65+
There are 3 ways to sign:
66+
67+
- **Sign with text**
68+
- Enter custom text directly in the app
69+
- Select which wallet to sign with
70+
- Optionally specify a destination URL to send the signed data
71+
- **Sign with QR Code**
72+
- Scan a QR code containing content to be signed
73+
- The app decodes the QR code and displays the content for review
74+
- Choose which wallet to use for signing
75+
- The QR code may contain:
76+
- Direct content to sign (JSON key: `content`)
77+
- A source URL to fetch content from (JSON key: `src`)
78+
- An optional destination URL for the signed data (JSON key: `dest`)
79+
- **Sign with link**
80+
- Click on a specially formatted link
81+
- The app automatically fetches content from the link
82+
- Review the content before signing
83+
- Select a wallet to sign with
84+
85+
### Threefold News
86+
87+
Inside the app, there is a "News" section where you can find all the latest Threefold news!
88+
89+
### Identity
90+
91+
When you are using the secure 2FA authentication, some third party apps require certain information (eg. phone number). In this tab you can verify your email, phone number and identity to provide this data to the third party application. This allows you total granular control over which data you choose to share or not share.
92+
93+
### Support
94+
95+
If you have Threefold related questions, we provide a support chat where we will answer your questions as soon as possible!
96+
97+
## How to build an APK
98+
99+
### Prerequisites
100+
101+
- Flutter 3.27.2
102+
103+
To build an APK for distribution or testing:
104+
105+
1. Initialize the environment if you haven't already:
106+
107+
```bash
108+
./build.sh --init
109+
```
110+
111+
2. Choose your target environment:
112+
113+
```bash
114+
./build.sh --switch --[local|testing|staging|production]
115+
```
116+
117+
3. Build the APK:
118+
119+
```bash
120+
# For debug build
121+
./build.sh --build --[local|testing|staging|production] --debug
122+
123+
# For release build
124+
./build.sh --build --[local|testing|staging|production] --release
125+
```
126+
127+
4. The generated APK will be available at:
128+
- Debug APK: `build/app/outputs/flutter-apk/app-debug.apk`
129+
- Release APK: `build/app/outputs/flutter-apk/app-release.apk`
130+
18131
## How to run the app on Android
19132

20133
1. Connect your android device (make sure you have a new android version)
21-
2. Choose your environment `testing|staging|production`
22-
3. Run `./build.sh --run --testing|staging|production`
134+
2. Choose your environment `local|testing|staging|production`
135+
3. Run `./build.sh --run --local|testing|staging|production`
136+
137+
## How to run the app on IOS
138+
139+
1. Connect your ios device (make sure you have a new ios version) or start an emulator
140+
2. Choose your environment `local|testing|staging|production`
141+
3. Run `./build.sh --run --local|testing|staging|production`
142+
4. Run `pod install` in the `ios` folder
143+
5. Open the app in XCode and run it from there
23144

24145
### Local run
25146

@@ -29,11 +150,3 @@ samples, guidance on mobile development, and a full API reference.
29150
4. Run [openkyc](https://github.com/threefoldtech/threefold_connect_openkyc/blob/master/readme.md.old#L83)
30151
5. Copy the file in `app_config_local.template` into `app_config_local.dart` and change the configuration to your local IP's
31152
6. Run the app using `./build.sh --run --local`
32-
33-
## Known issues
34-
35-
- <https://github.com/threefoldtech/threefold_connect/issues/306>
36-
37-
## TODO
38-
39-
- signingConfigs

backend/README.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,44 @@
22

33
The (temporary) backend for 3Bot login.
44

5+
## Run service
6+
7+
Go inside virtual environment:
8+
9+
`source ./venv/bin/activate`
10+
11+
Start UWSGI backend:
12+
13+
```bash
14+
uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
15+
: 1643024584:0;uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
16+
```
17+
518
## Data to save
619

720
### User
821

922
A user is someone that authenticates using 3botlogin.
1023

11-
| Key | Type | Example | Description |
12-
| --- | --- | --- | --- |
13-
| double_name | String | ivan.coene | The name of the user (case insensitive) |
14-
| sid | String | EWFWEGFWGWGWDS | Socket ID |
15-
| email | String | <ivan.coene@gmail.com> | The email of the user (case insensitive) |
16-
| public_key | string | G1gcbyeTnR2i...H8_3yV3cuF | The public key of the user to verify access |
17-
| device_id | String | abc | The ID of the device where we can send notifications to |
24+
| Key | Type |  Example | Description |
25+
| ----------- | ------- | ------------------------- | ------------------------------------------------------- |
26+
| double_name |  String | ivan.coene | The name of the user (case insensitive) |
27+
| sid |  String | EWFWEGFWGWGWDS | Socket ID |
28+
| email |  String | <ivan.coene@gmail.com> | The email of the user (case insensitive) |
29+
| public_key |  string | G1gcbyeTnR2i...H8_3yV3cuF | The public key of the user to verify access |
30+
| device_id |  String | abc | The ID of the device where we can send notifications to |
1831

1932
### Login attempt
2033

2134
When a user tries to log in, an entry is added
2235

23-
| Key | Type | Example | Description |
24-
| --- | --- | --- | --- |
25-
| double_name | String | ivan.coene | The name of the user (case insensitive) |
26-
| state_hash | String | 1gcbyeTnR2iZSfx6r2qIuvhH8 | The "identifier" of a login-attempt |
27-
| timestamp | Datetime | 2002-12-25 00:00:00-06:39 | The time when this satehash came in |
28-
| scanned | Boolean | false | Flag to keep the QR-scanned state |
29-
| singed_statehash | String | 1gcbyeTnR2iZSfx6r2qIuvhH8 | The signed version of the state hash|
36+
| Key | Type |  Example | Description |
37+
| ---------------- | -------- | -------------------------- | --------------------------------------- |
38+
| double_name |  String | ivan.coene | The name of the user (case insensitive) |
39+
| state_hash | String | 1gcbyeTnR2iZSfx6r2qIuvhH8 |  The "identifier" of a login-attempt |
40+
|  timestamp | Datetime |  2002-12-25 00:00:00-06:39 | The time when this satehash came in |
41+
| scanned | Boolean | false | Flag to keep the QR-scanned state |
42+
| singed_statehash | String | 1gcbyeTnR2iZSfx6r2qIuvhH8 |  The signed version of the state hash |
3043

3144
## Run in dev mode
3245

@@ -46,9 +59,3 @@ sudo apt-get install sqlite3
4659
## Config file
4760

4861
Rename config.ini.example to config.ini and add your API key.
49-
50-
## From version 2.0.0 the app has switched to the grids explorer
51-
52-
<https://explorer.devnet.grid.tf/explorer#api-Users-createUser>
53-
<https://explorer.testnet.grid.tf/explorer#api-Users-createUser>
54-
<https://explorer.grid.tf/explorer#api-Users-createUser>

0 commit comments

Comments
 (0)