Architectural Patterns for Web3-Based Decentralized Applications (Blockchain, Web3 & Digital Trust Journal p-ISSN 3117-597X and e-ISSN 3117-5988, 2025)
Building a decentralised application is not the same as building a smart contract. The contract is the on-chain logic -- often just 500 to 2,000 lines of Solidity. The dApp is everything else: the frontend that users interact with, the indexer that makes on-chain data queryable, the wallet integration that manages signing, the off-chain storage for data too large or too private for the chain, and the bridge or relayer that connects to other chains. Most Web3 architectural failures happen not in the smart contract but in the glue between components -- a centralised API server that becomes a single point of failure, an indexer that falls behind and serves stale data, or a frontend hosted on a single cloud provider that gets taken down by a legal notice. We present the Web3 Decentralized Application Architecture Framework (W3DAAF), a systematic evaluation of six architectural patterns for building dApps -- fully on-chain, thin client, fat indexer, hybrid off-chain, progressive decentralisation, and modular microservice -- assessed across five dimensions: decentralisation fidelity, user experience quality, developer productivity, operational cost, and censorship resistance. Our Architecture Quality Score (AQS) shows that the modular microservice pattern achieves the highest overall quality (0.896) by decomposing the dApp into independently replaceable components, while progressive decentralisation offers the most practical path for teams migrating from Web2 to Web3.