<p>My self have been looking for something similar to the Web 3 stack on Ethereum. I think I found an example of a dApp which illustrates the integration between a web application and the Cardano blockchain through not just one but three wallets (Nami, CCVault, Flint).</p>
<p><a href="https://jsrepos.com/lib/dynamicstrategies-cardano-wallet-connector" rel="nofollow noreferrer">https://jsrepos.com/lib/dynamicstrategies-cardano-wallet-connector</a></p>

CC BY-SA 4.0
2022-04-23T00:26:24.680Z
2022-04-23T00:26:24.680Z
raul garvizu
<p>Depending on how many features your dApp needs, most of it cannot be fully decentralized yet. The following is a non-exhaustive list of common components of an application, and how to decentralize them on Cardano:</p>
<ul>
<li><strong>Authentication</strong> - If you store additional data about a user - besides what can be determined from the contents of their wallet - you need a way to authenticate them with your backend. <a href="https://cardano.stackexchange.com/a/4814/965">See the guide here</a>.</li>
<li><strong>One-time payments</strong> - You can use a wallet for payments to a smart contract or wallet. This can be accomplished by making the user send money themselves through their wallet app, or by using a wallet extension (which will only work on desktop currently, as mobile phones don't support browser extensions to my knowledge).</li>
<li><strong>Recurring payments</strong> - I don't think this is possible in the traditional sense. You could allow users to send extra funds to give their account &quot;credit&quot;, then subtract from this credit whenever your payment period starts. In the future, it would be cool if you could use a reputation system to create a &quot;credit score&quot; for a user, and allow users to build up debt if you trust that they will pay it.</li>
<li><strong>Identity</strong> - The most well-known decentralized identity system being built on Cardano is <a href="https://atalaprism.io/app" rel="nofollow noreferrer">Atala Prism</a>. It's still in develop from what I understand, but you can join their <a href="https://atalaprism.io/pioneers" rel="nofollow noreferrer">pioneer program</a> if you'd like to integrate it into your application. Identity will be the basis of reputation systems, as over time they can generate a <a href="https://en.wikipedia.org/wiki/Web_of_trust" rel="nofollow noreferrer">web of trust</a>.</li>
<li><strong>Public time-series data</strong> - Public data from sensors, IoT devices, drones, price feeds, etc. will be best suited to store on oracles. There are many companies creating oracles on Cardano. You can find a list <a href="https://github.com/input-output-hk/essential-cardano/blob/main/essential-cardano-list.md#oracles" rel="nofollow noreferrer">here</a>. I don't believe any of these are fully working yet.</li>
<li><strong>Random numbers</strong> - This is also a service handled by oracles. <a href="https://docs.chain.link/docs/chainlink-vrf/" rel="nofollow noreferrer">Here</a> is how Chainlink does it.</li>
<li><strong>Small, unchanging public data</strong> - Probably something that should be stored on-chain or on <a href="https://ipfs.io/" rel="nofollow noreferrer">IPFS</a>.</li>
<li><strong>Large, unchanging public data</strong> - IPFS may be suitable for this, but I'm not sure.</li>
<li><strong>Private data</strong> - This can be as simple as using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/FileSystem" rel="nofollow noreferrer">FileSystem API</a> (which I believe only works on Chrome - not even Brave) to read/write data locally on the user's machine. You can also use a service like <a href="https://www.storj.io/" rel="nofollow noreferrer">Storj</a> for private cloud data. Ideally, there would be some program that users can run on their local machine that syncs data between their local file system, their backup drives, and the decentralized cloud so applications don't need to set up access to their cloud account directly. But such a service does not exist.</li>
<li><strong>NoSQL database</strong> - I don't think any decentralized databases are stable enough for a production application yet, but you could look into <a href="https://orbitdb.org/" rel="nofollow noreferrer">OrbitDB</a>.</li>
<li><strong>SQL database</strong> - No decentralized SQL database architectures exist, unfortunately.</li>
<li><strong>Hosting</strong> - The only decentralized hosting platform I know of being built on Cardano is <a href="https://nunet.io/" rel="nofollow noreferrer">NuNet</a>. They are in private alpha, so you can't use it yet. Alternatively, you can host your application using <a href="https://akash.network/" rel="nofollow noreferrer">Akash</a>. The only downside is that this is on the Cosmos blockchain, so if you're hoping to pay for your website automatically from user payments in Ada, good luck.</li>
<li><strong>Certificates</strong> - Likely every dApp is using <a href="https://letsencrypt.org/" rel="nofollow noreferrer">Let's Encrypt</a>, which is great because it's free, automated, and open-source (I think). But I don't believe it is decentralized.</li>
</ul>

CC BY-SA 4.0
2022-04-23T12:08:20.450Z
2022-04-23T12:08:20.450Z
Matt Halloran
<p>I have been doing some research on how to properly design and architect a dApp solution on Cardano and came across this nicely, written article (albeit on Ethereum) <a href="https://www.preethikasireddy.com/post/the-architecture-of-a-web-3-0-application" rel="nofollow noreferrer">The Architecture of a Web3.0 Application</a>. I was wondering if anyone could point me in the right direction for something similar on Cardano. How are mainstream dApps like Sundaeswap, etc. architecting their solutions? I think having such documents/diagrams/suggestions readily available in the Cardano community can be of great help! Possible design ideas are also welcome.</p>
<p>Thanks in advance for your responses.</p>

<blockchain>
How to architect a truly decentralized dApp on Cardano?
# How to architect a truly decentralized dApp on Cardano?

(Asked by: username_0 on 2022-03-04)

I have been doing some research on how to properly design and architect a dApp solution on Cardano and came across this nicely, written article (albeit on Ethereum) [The Architecture of a Web3.0 Application](https://www.preethikasireddy.com/post/the-architecture-of-a-web-3-0-application). I was wondering if anyone could point me in the right direction for something similar on Cardano. How are mainstream dApps like Sundaeswap, etc. architecting their solutions? I think having such documents/diagrams/suggestions readily available in the Cardano community can be of great help! Possible design ideas are also welcome.

Thanks in advance for your responses.

**Tags:** blockchain

---

## 2 answers

### Answer by username_1 on 2022-04-23. Score: 1

My self have been looking for something similar to the Web 3 stack on Ethereum. I think I found an example of a dApp which illustrates the integration between a web application and the Cardano blockchain through not just one but three wallets (Nami, CCVault, Flint).

<https://jsrepos.com/lib/dynamicstrategies-cardano-wallet-connector>


---

### Answer by username_2 on 2022-04-23. Score: 0

Depending on how many features your dApp needs, most of it cannot be fully decentralized yet. The following is a non-exhaustive list of common components of an application, and how to decentralize them on Cardano:

* **Authentication** - If you store additional data about a user - besides what can be determined from the contents of their wallet - you need a way to authenticate them with your backend. [See the guide here](https://cardano.stackexchange.com/a/4814/965).
* **One-time payments** - You can use a wallet for payments to a smart contract or wallet. This can be accomplished by making the user send money themselves through their wallet app, or by using a wallet extension (which will only work on desktop currently, as mobile phones don't support browser extensions to my knowledge).
* **Recurring payments** - I don't think this is possible in the traditional sense. You could allow users to send extra funds to give their account "credit", then subtract from this credit whenever your payment period starts. In the future, it would be cool if you could use a reputation system to create a "credit score" for a user, and allow users to build up debt if you trust that they will pay it.
* **Identity** - The most well-known decentralized identity system being built on Cardano is [Atala Prism](https://atalaprism.io/app). It's still in develop from what I understand, but you can join their [pioneer program](https://atalaprism.io/pioneers) if you'd like to integrate it into your application. Identity will be the basis of reputation systems, as over time they can generate a [web of trust](https://en.wikipedia.org/wiki/Web_of_trust).
* **Public time-series data** - Public data from sensors, IoT devices, drones, price feeds, etc. will be best suited to store on oracles. There are many companies creating oracles on Cardano. You can find a list [here](https://github.com/input-output-hk/essential-cardano/blob/main/essential-cardano-list.md#oracles). I don't believe any of these are fully working yet.
* **Random numbers** - This is also a service handled by oracles. [Here](https://docs.chain.link/docs/chainlink-vrf/) is how Chainlink does it.
* **Small, unchanging public data** - Probably something that should be stored on-chain or on [IPFS](https://ipfs.io/).
* **Large, unchanging public data** - IPFS may be suitable for this, but I'm not sure.
* **Private data** - This can be as simple as using the [FileSystem API](https://developer.mozilla.org/en-US/docs/Web/API/FileSystem) (which I believe only works on Chrome - not even Brave) to read/write data locally on the user's machine. You can also use a service like [Storj](https://www.storj.io/) for private cloud data. Ideally, there would be some program that users can run on their local machine that syncs data between their local file system, their backup drives, and the decentralized cloud so applications don't need to set up access to their cloud account directly. But such a service does not exist.
* **NoSQL database** - I don't think any decentralized databases are stable enough for a production application yet, but you could look into [OrbitDB](https://orbitdb.org/).
* **SQL database** - No decentralized SQL database architectures exist, unfortunately.
* **Hosting** - The only decentralized hosting platform I know of being built on Cardano is [NuNet](https://nunet.io/). They are in private alpha, so you can't use it yet. Alternatively, you can host your application using [Akash](https://akash.network/). The only downside is that this is on the Cosmos blockchain, so if you're hoping to pay for your website automatically from user payments in Ada, good luck.
* **Certificates** - Likely every dApp is using [Let's Encrypt](https://letsencrypt.org/), which is great because it's free, automated, and open-source (I think). But I don't believe it is decentralized.


---

