diff --git a/docs/building-on-flow/app-architecture/_category_.yml b/docs/building-on-flow/app-architecture/_category_.yml new file mode 100644 index 0000000000..42b643e320 --- /dev/null +++ b/docs/building-on-flow/app-architecture/_category_.yml @@ -0,0 +1,3 @@ +position: 3 +customProps: + description: Describes building self-custody and app custody applications on Flow Blockchain. diff --git a/docs/building-on-flow/app-architecture/app-custody.png b/docs/building-on-flow/app-architecture/app-custody.png new file mode 100644 index 0000000000..7dad71fa77 Binary files /dev/null and b/docs/building-on-flow/app-architecture/app-custody.png differ diff --git a/docs/building-on-flow/app-architecture/index.md b/docs/building-on-flow/app-architecture/index.md new file mode 100644 index 0000000000..d6d839f97f --- /dev/null +++ b/docs/building-on-flow/app-architecture/index.md @@ -0,0 +1,76 @@ +--- +sidebar_position: 1 +title: App Architecture +description: Describes building self-custody and app custody applications on Flow Blockchain. +--- + +# App Architecture on Flow Blockchain + +The Flow blockchain, with its focus on scalability and user-centric design, offers a unique environment for app development. Designed from the ground up, Flow prioritizes user experience, aiming to bridge the gap to mainstream adoption without compromising on decentralization or security. + +While the Flow blockchain offers various architectural patterns, the recommended approaches for developers are **Self-Custody** and **App Custody**. These choices align with Flow's ethos of user-centric design and flexibility. + +### **Self-Custody Architecture** + +In a self-custody architecture, users retain direct control over their private keys and assets. This model emphasizes user sovereignty and decentralization, placing the responsibility of asset management squarely on the user's shoulders. While it offers the highest degree of control, it also demands a certain level of technical knowledge and awareness from the user, which can sometimes lead to a more complex user experience. + +![self-custody.png](self-custody.png) + +**Architectural Elements**: + +- **Wallet**: A wallet where users store their private keys and sign transactions. +- **Frontend**: Interfaces directly with the user and their wallet for signing transactions. +- **Method of Talking to Chain**: Through FCL directly. + +**Benefits**: + +- **Control**: Users maintain full ownership of their assets and transactions. +- **Security**: Direct management of private keys reduces potential points of failure. + +**Considerations**: + +- **User Experience**: The direct control model can lead to a more complex user experience, especially for those unfamiliar with blockchain. Typically, all transactions must be approved by the user, which can be cumbersome. +- **Key Management**: Users are solely responsible for managing, backing up, and ensuring the safe generation and storage of their keys. + +**Ideal Use Cases**: + +- **Decentralized Finance (DeFi)**: Users interacting with financial protocols while maintaining full control. +- **Web3 Native Users**: Those familiar with blockchain technology and key management. + +### **App Custody Architecture** + +App custody on Flow offers a unique approach to key management and user experience. Unlike traditional app custody solutions on other blockchains, Flow's App Custody architecture introduces features like **account linking** and **walletless onboarding**. These features ensure that while users enjoy a seamless experience, they still have the option to link their accounts and move their assets freely around the Flow ecosystem, providing a balanced approach to key management. + +![app-custody.png](app-custody.png) + +**Architectural Elements**: + +- **Wallet**: Both user custody and app custody wallets coexist. +- **Frontend**: Interfaces for both wallet types and features for account linking and walletless onboarding. +- **Backend**: Manages app-custody user keys and assets. Also supports direct blockchain interactions. +- **Method of Interacting with the Chain**: Both direct FCL calls and backend-managed interactions. +- **Payment Rails**: Flexible methods, accommodating both direct and managed transactions. + +**Benefits**: + +- **Walletless Onboarding**: Users can start interacting with the app using traditional, familiar web2 mechanics without the initial need for a blockchain wallet. +- **Streamlined Experience**: Transactions can be processed without constant user approval, offering a smoother user journey. +- **Open Ecosystem with Account Linking**: Users can link their accounts, ensuring they can move their assets freely around the Flow ecosystem without being locked into a single application. +- **Flexibility**: Cater to both tech-savvy users and newcomers without compromising on security. +- **Platform Versatility**: The abstraction of the user wallet allows for integration with various platforms, including Unity games, consoles, and mobile applications. + +**Considerations**: + +- **Complexity**: Implementing app custody can be more intricate. +- **Trust**: Users need to trust the dApp with certain aspects of their data and assets. +- **Legal Implications**: Operating with app custody may come with legal considerations, depending on jurisdiction and the nature of the dApp. It's essential to consult with legal professionals to ensure compliance. + +**Ideal Use Cases**: + +- **Gaming**: Seamless gaming without constant transaction approvals. +- **Social Media Platforms**: Earning tokens for content without initial blockchain familiarity. +- **Loyalty Programs**: Earning rewards without deep blockchain setup. + +## Wrapping Up + +Selecting the right architecture is crucial when developing an app on the Flow blockchain. Your choice will influence not only the technical aspects but also the user experience and overall trust in your application. While Flow offers the tools and flexibility to cater to various needs, it's up to developers to harness these capabilities effectively. Whether you opt for a self-custody or app custody approach, ensure that your decision aligns with the core objectives of your app and the expectations of your users. Making informed architectural decisions will lay a strong foundation for your app's success. diff --git a/docs/building-on-flow/app-architecture/self-custody.png b/docs/building-on-flow/app-architecture/self-custody.png new file mode 100644 index 0000000000..4233cb11ad Binary files /dev/null and b/docs/building-on-flow/app-architecture/self-custody.png differ diff --git a/docs/building-on-flow/app-vs-platform/_category_.yml b/docs/building-on-flow/app-vs-platform/_category_.yml deleted file mode 100644 index c7c7bd811a..0000000000 --- a/docs/building-on-flow/app-vs-platform/_category_.yml +++ /dev/null @@ -1,3 +0,0 @@ -position: 3 -customProps: - description: diff --git a/docs/building-on-flow/app-vs-platform/app.md b/docs/building-on-flow/app-vs-platform/app.md deleted file mode 100644 index e133a18944..0000000000 --- a/docs/building-on-flow/app-vs-platform/app.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sidebar_position: 1 -title: Anatomy of a Flow App -description: ---- diff --git a/docs/building-on-flow/app-vs-platform/index.mdx b/docs/building-on-flow/app-vs-platform/index.mdx deleted file mode 100644 index 18a88f8271..0000000000 --- a/docs/building-on-flow/app-vs-platform/index.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Differences between an App and a Platform -description: ---- - -import DocCardList from '@theme/DocCardList'; - - diff --git a/docs/building-on-flow/app-vs-platform/platform.md b/docs/building-on-flow/app-vs-platform/platform.md deleted file mode 100644 index c84ca54a97..0000000000 --- a/docs/building-on-flow/app-vs-platform/platform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -sidebar_position: 2 -title: Anatomy of a Flow Platform -description: ----