Open fredprux opened 1 year ago
@chrisackermann any updates regarding that application?
@fredprux we currently have a PR to FCL with react-native support and HTTP/POST back-channel support: https://github.com/onflow/fcl-js/pull/1666
there is a sample app in progress and some further changes to FCL with deeplink front-channel support
React Native x FCL Sample Starter
Grant category
Description
There are several great FCL starters and sample apps for web frameworks like Next.js, Svelte, etc. Many web developers use React Native to build cross platform and mobile native apps. A full featured sample application built with React Native and FCL (fcl.js) would encourage more devs to create mobile apps for Flow. First we want to develop upgrades to fcl.js to support an alternative to iframe/pop/tab methods and post messaging between discovery and wallet approval windows and then create a full featured sample app.
This is a response to RFPS https://github.com/onflow/developer-grants/issues/121 .
Problem statement
There is currently no FCL sample or harness app for React Native. In order to create one, some upgrades to the fcl.js library are required. For example, some current features of fcl.js and wallet discovery rely on the existence of a browser window object, iframes, and post messaging between windows.
Proposed solution
Milestone 1
Milestone Idea Upgrades to fcl.js to support an alternative to iframe/pop/tab methods and post messaging between discovery and wallet approval windows.
There are two possible approaches to implement native app wallet integration using fcl library:
We plan on using the first one but we are open for using the second one or other basing on Onflow Board recommendation. This allows to keep the original wallet look and feel but it is not fully native solution. User would still need to be redirected to web browser.
On the other hand second approach gives much more flexibility by suggesting changes to the fcl itself. We would create json data structures that hold all required information to render simple form for any wallet. So the responsibility would be transferred to the native app creator to properly parse it and display form in any shape. Main drawback of this is that some of the unique style of the wallets would not be possible to display. Only part of the external wallet branding would be possible to display. But in this way it is possible to achieve full native support without any redirects to other apps or web browsers. If we were to use that option then we would need to add 2880 USD to the Milestone 1 budget and we would then also deliver an example code snippet displaying communication of wallet and FCL.
Milestone 2
Milestone Idea
The Ticket App is a sample application that will be build on the Flow blockchain that allows users to purchase, validate, and manage bus tickets. With this app, users can purchase different types of bus tickets, view their transaction history, access their user profile information, and see all of their tickets stored in their Flow wallet.
We intend to use all the methods of Fcl (JS) in that native react app and that above discussed scenario allows us to do so in real world scenario.
Wireframes:
https://app.excalidraw.com/l/3DlJZtdf3O8/4q3yHZogVgO
Functionalities
User Story: As a new user, I want to be able to sign up for the Ticket App account with a Flow Wallet so that I can buy ticket
User Story: As a user of the Ticket App, I want to be able to log in using my Flow Wallet so that I can access my ticket information and purchase new tickets.
Buying tickets User story: As a user, I want to be able to buy a bus ticket. I would like to see the available ticket types and choose the one that best fits my needs.
Validating tickets
User story: As a user, I want to be able to validate my bus ticket when boarding the bus. I want to be able to check the validity of my ticket by seeing the dates it is valid from and until.
User story: As a user of the Ticket App, I want to be able to see a collection of my tickets and access information about each one. I want to be able to view my active tickets, tickets that are waiting to be validated, and my archived tickets.
User story: As a user of the Ticket App, I want to be able to easily access and view my user profile, including my account ID from the Flow blockchain.
User story: As a user of the Ticket App, I want to be able to view my transaction history of ticket activity on the Flow blockchain. I want to see all of my ticket purchases and validations. I also would like to see details of single transaction.
Impact
Our solution aims to simplify the process of creating applications in the Flow ecosystem by utilizing Native React. This will allow developers to take advantage of the strengths of both technologies, resulting in a more efficient and user-friendly experience. To further support the development community, we will also be providing a sample app that will be open source. This will provide developers with a firsthand look at how the app is built, allowing them to investigate and learn from it. We believe that this will help to accelerate the growth of the Flow ecosystem and make it even more accessible to developers of all skill levels.
Milestones and funding
Total funding proposed: 43155 USD or 46035 USD (including 1b milestone)
Team