FISTA Solutions does not load Google Analytics until you accept. Rejecting keeps optional analytics off. Read the Cookie Policy.

All field notes

Blockchain · 5 minute read

dApp Architecture: What Goes On-Chain, Off-Chain, and in Between

dApp architecture places only what needs trustless execution or shared state on-chain, contracts for ownership, settlement, and rules, and keeps everything else off-chain: indexers that make chain data queryable, backends for business logic and integration, storage for large data, and frontends that handle wallets and transaction lifecycles. The chain is a component behind an abstraction, not the application.

By FISTA Solutions· AI-Native Engineering Team·
dApp Architecture: What Goes On-Chain, Off-Chain, and in Between article cover

The word decentralized makes dApps sound as if everything runs on-chain. In practice a dApp is a conventional application with a small on-chain core: contracts hold ownership, settlement, and rules; indexers make chain data queryable; backends handle logic and integration; frontends manage wallets and transactions. Getting the split right determines cost, performance, security, and whether the platform decision can ever be revisited. This guide covers the architecture layer by layer, drawing on FISTA Solutions' blockchain practice. The developer roles are in hire web3 developers and the contract layer in the smart contract development guide.

What are the layers?

LayerResponsibilityTechnology
ContractsOwnership, settlement, rules, commitmentsSmart contracts on the chosen chain
IndexerTurn events into queryable state; handle reorgsEvent listeners; database; query API
BackendBusiness logic, integration, metadata, notifications, orchestrationConventional services with chain adapters
StorageLarge data and content with hashes on-chainObject or decentralized storage
FrontendWallet connection, transaction lifecycle, displayWeb or mobile app with wallet libraries
Oracles and bridgesExternal data and cross-chain needsAssessed per trust model

Oracle trust is in blockchain oracles explained and bridges in cross-chain bridges explained.

What belongs on-chain?

Only what needs trustless execution or shared state: asset ownership and transfers, settlement logic, rules the parties must not be able to change unilaterally, and commitments such as hashes that let off-chain data be verified. Every on-chain operation costs gas and is public and permanent, so business logic, personal data, and large content stay off. Gas discipline is in gas optimization techniques.

Why is the indexer essential?

Chains are append-only transaction logs, not query engines. An indexer subscribes to contract events, writes them to a database in a shape the application needs, handles chain reorganizations by rolling back and replaying, and exposes queries for lists, histories, and aggregates. Frontends that read the chain directly for anything beyond a single account's current state are slow and fragile. Real-time patterns are in real-time web applications.

What does the backend do?

Everything a conventional backend does: authentication that may include wallet signatures, business logic that need not be trustless, integration with payments, identity, analytics, and enterprise systems, metadata and content serving, notifications, and, where the product design calls for it, transaction orchestration on users' behalf with appropriate custody controls. Backend skills are in hire backend developers.

How should the frontend handle wallets and transactions?

Wallet connection that handles multiple wallets, networks, and account changes; gas estimation and clear cost display before signing; explicit lifecycle states from preparing through confirmed or failed, including reorg handling; retry and cancellation paths; and signing requests that explain what the user is authorizing. Most dApp abandonment happens at unclear signing prompts and silent pending states. Security patterns are in web3 security best practices.

Where does data live?

Large content, documents, media, and metadata live in conventional object storage or decentralized storage systems, with content hashes recorded on-chain so integrity is verifiable. Personal data stays in systems with access control and deletion capability, never on-chain. Anchoring patterns are in blockchain audit trails.

Where are the security boundaries?

Contracts: audited, minimal, with upgrade controls. Indexer: reorg-safe and validated against chain state. Backend: conventional API security plus key custody for any orchestrated transactions. Frontend: signing safety, phishing resistance, and input validation. Oracles and bridges: assessed by trust model and minimized. API security is in api security best practices and contract upgrades in smart contract upgradeability.

How do you keep the platform decision reversible?

Abstract chain interaction behind an integration layer with stable interfaces; keep business logic off-chain; use standard token and identity formats; keep keys and contracts under the organization's control; and document a migration path. Chains change; an application whose logic lives off-chain migrates in weeks rather than years. Platform selection is in how to choose a blockchain platform.

What mistakes are common?

Business logic on-chain that costs gas and cannot be changed; frontends reading the chain directly for lists; no reorg handling in indexers; personal data on-chain; large content on-chain; transaction states hidden from users; and architecture bound to one chain's specifics. Cost realism is in dapp development cost.

What does sound architecture look like?

A tokenized asset platform keeps ownership and transfer rules in audited contracts, indexes events into a database for portfolio views and histories, runs a backend for identity verification, compliance checks, document management, and notifications, stores documents in object storage with hashes on-chain, and builds a frontend with explicit transaction states and clear signing prompts. Chain interaction sits behind an adapter layer, and a second chain is added later as configuration. The tokenization context is in the real-world asset tokenization whitepaper.

How FISTA Solutions builds dApps

FISTA Solutions designs dApps with a minimal audited on-chain core, reorg-safe indexers, conventional backends with chain adapters, off-chain storage with anchoring, frontends with explicit transaction lifecycles, and platform-agnostic abstraction. The blockchain practice delivers the systems, web and mobile builds the frontends, and forward deployed engineers embed with client teams. The record behind the approach is 150+ projects with 99.9% uptime.

To build a dApp that is fast, secure, and not married to one chain, message FISTA on WhatsApp, or read the smart contract development guide for the on-chain core.

Share-ready article cover

Download the generated social format.

Download cover

Clear answers

Questions raised by this field note.

Straightforward guidance for evaluating scope, fit, and the next step.

01What belongs on-chain?

Logic and state that must be trustless or shared among parties who do not trust each other: asset ownership, transfers and settlement, rules enforced by contract, and commitments such as hashes and anchors. Anything that can be computed or stored off-chain without losing that property should be.

02Why do dApps need indexers?

Chains are optimized for writing transactions, not for querying history or aggregating state. Indexers listen to events, store them in a database, and expose queries, so frontends can show lists, histories, and aggregates without scanning the chain, with reorg handling to stay consistent.

03What does the backend do in a dApp?

Business logic that need not be on-chain, integration with off-chain systems such as payments, identity, and analytics, metadata and content serving, notifications, and orchestration of transactions on users' behalf where appropriate, using conventional engineering with chain-aware components.

04How should transactions be handled in the frontend?

With explicit lifecycle states: preparing, awaiting signature, submitted, pending, confirmed, failed, and reorged, each shown clearly, with gas estimates before signing, retry and cancellation paths, and wallet connection that handles networks and accounts gracefully.

05Where does large data go?

In conventional or decentralized storage systems, with content hashes recorded on-chain so integrity can be verified. Writing large data on-chain is prohibitively expensive and often conflicts with privacy and deletion obligations.

Start with the hard problem

Need the outcome owned, not merely analyzed?

Tell us where delivery is constrained. We’ll map the fastest credible path from intent to verified production.

Start a project