Skip to content

Commit

Permalink
initial clean
Browse files Browse the repository at this point in the history
  • Loading branch information
rawdaGastan committed Jun 4, 2023
1 parent e90bfa8 commit 38942d3
Show file tree
Hide file tree
Showing 62 changed files with 10,114 additions and 36,533 deletions.
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@

## Introduction

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

It contains an ultra secure 2FA authenticator for authenticating through third party applications.

Inside the app, you can manage your Threefold Tokens(TFT).

## Features

#### Threefold news
### Threefold news

Inside the app, there is a "News" section where you can find all the latest Threefold news!

#### Wallet
### Wallet

In the Threefold Connect app, it is possible to manage your TFT and view your transaction history on the TF chain.

#### Farmers
### Farmers

If you own a Threefold node, you can manage your farm here.

#### Support
### Support

If you have Threefold related questions, we provide a support chat where we will answer your questions as soon as possible!

#### Planetary network
### Planetary network

It is possible to have a a planetary network IPv6 address. Here you can enable the planety network connection and your phone will automatically be connected to the p2p network.
It is possible to have a a planetary network IPv6 address. Here you can enable the planetary network connection and your phone will automatically be connected to the p2p network.

#### Identity
### Identity

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.

Expand All @@ -42,43 +42,41 @@ In June 2022, a new codebase has been written for this project. It is built on t

### External repositories

Threefold News: https://github.com/threefoldtech/threefold_connect_news
Threefold News: <https://github.com/threefoldtech/threefold_connect_news>

Wallet v3: https://github.com/threefoldtech/wallet-next
Wallet v3: <https://github.com/threefoldtech/wallet-next>

Farmer: https://github.com/threefoldtech/wallet-next
Farmer: <https://github.com/threefoldtech/wallet-next>

Support: https://github.com/threefoldtech/tfsupport
Support: <https://github.com/threefoldtech/tfsupport>

## Frontend

Make sure the correct configuration is inside config.js. After that start the frontend by doing:

`yarn && yarn serve`


## Backend

Go inside virtual environement:
Go inside virtual environment:

`source ./venv/bin/activate
`
`source ./venv/bin/activate`

Start UWSGI backend:

` uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
: 1643024584:0;uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030`

```bash
uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
: 1643024584:0;uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030
```

## App

Make sure you have at least Flutter 2.8.1 installed. If everything is installed properly, execute the following commands:
Make sure you have at least Flutter 2.8.1 installed. If everything is installed properly, execute the following commands:

Copy the file in /lib/app_config_local.template into /lib/app_config_local.dart and change the configuration to your local IP's

After that, use the build.sh script to set up the right environement
After that, use the build.sh script to set up the right environment

`./build.sh --init && ./build.sh --switch --local`

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

45 changes: 23 additions & 22 deletions app/2fa_login_examples.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
## Code examples
# Code examples

### How to integrate 3Bot Connect app as decentralized login mechanism
## How to integrate 3Bot Connect app as decentralized login mechanism

#### Python
### Python

https://github.com/threefoldtech/Threefold-Circles/blob/production/taiga/threebot/api.py#L42
<https://github.com/threefoldtech/Threefold-Circles/blob/production/taiga/threebot/api.py#L42>

#### php
### php

https://github.com/freeflowpages/freeflow-threebot-login/blob/master/authclient/ThreebotAuth.php#L26
<https://github.com/freeflowpages/freeflow-threebot-login/blob/master/authclient/ThreebotAuth.php#L26>

https://github.com/freeflowpages/freeflow-threebot-login/blob/master/controllers/user/UserController.php#L43
<https://github.com/freeflowpages/freeflow-threebot-login/blob/master/controllers/user/UserController.php#L43>

#### Crystal lang
### Crystal lang

https://github.com/crystaluniverse/kemal-threebot
<https://github.com/crystaluniverse/kemal-threebot>

#### Go
### Go

See lines 137-179 as well as SignIn and VerifyCallback function in :
https://github.com/threefoldtech/tf-gitea/blob/b63f8429483290e96fadbc7a9ca0bf9ff9c1232a/routers/user/auth.go
See lines 137-179 as well as SignIn and VerifyCallback function in :
<https://github.com/threefoldtech/tf-gitea/blob/b63f8429483290e96fadbc7a9ca0bf9ff9c1232a/routers/user/auth.go>

#### Python extra tooling
### Python extra tooling

##### Proxy for Redirection
#### Proxy for Redirection

A proxy written in python where u can talk to, using any language using http client.
It can help you for url redirection for 3bot connect. You can define the call back in your application at any point, then get then same parameters sent by 3bot connect to your endpoint to this proxy to decrypt data for you.
So you can verify whether the user has logged in, get his 3Bot name, e-mail etc.
A proxy written in python where u can talk to, using any language using http client.
It can help you for url redirection for 3bot connect. You can define the call back in your application at any point, then get then same parameters sent by 3bot connect to your endpoint to this proxy to decrypt data for you.
So you can verify whether the user has logged in, get his 3Bot name, e-mail etc.

https://github.com/threefoldtech/threefold-forums/tree/master/3bot
<https://github.com/threefoldtech/threefold-forums/tree/master/3bot>

##### Library
#### Library

pyncal

Keys can be generated using
`
Keys can be generated using

```bash
import nacl.signing
nacl.signing.SigningKey.generate().encode(nacl.encoding.Base64Encoder)
`
```
11 changes: 11 additions & 0 deletions app/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include: package:flutter_lints/flutter.yaml

linter:
rules:
prefer_const_constructors: true
prefer_final_fields: true
use_key_in_widget_constructors: true
prefer_const_literals_to_create_immutables: true
prefer_const_constructors_in_immutables: true
avoid_print: true
prefer_single_quotes: true
Loading

0 comments on commit 38942d3

Please sign in to comment.