Building decentralized applications shouldn’t mean hours lost to cryptic error messages, outdated documentation, and tooling that feels a decade behind. Yet for most web developers, the path to Web3 is paved with frustration - debugging transactions that fail silently, hunting through Discord for answers that should be in the docs, and wrestling with developer tools that make simple tasks painfully complex.

The Promise of Web3
Every developer has felt it - that moment when blockchain technology seems like the answer to everything. Decentralization, trustless systems, users owning their data. So you dive in.

But where do you even start? Ethereum’s Solidity feels like JavaScript with footguns. Solana’s account model is unlike anything else in software. Endless L2s - Arbitrum, Optimism, Base, zkSync - each with their own bridges and quirks. Other chains push Move, Cairo, or CosmWasm, fragmenting the ecosystem further.
That simple CRUD operation you could write in 5 minutes? It now requires storage slots, EVM opcodes, or account derivation paths. Every bug is permanent. Security vulnerabilities can drain your contract in seconds.
The Complexity Tax
Traditional web development has evolved beautifully. Frameworks like React and Next.js handle complexity for you. Deployment platforms like Amplify and Netlify turn “git push” into production deploys. Databases like Supabase and PlanetScale give you instant backends with familiar SQL.
dApp development? It’s still 2017.

Meanwhile, your friend shipped three apps this month using Next.js and Amplify. They have users. You have a testnet deployment and a Discord full of the same five people.
The Traditional Web Dev Comfort Zone
Most developers retreat. And honestly? It makes sense.
The modern web development stack is a joy to use. Hot reload. Type safety. One-click deploys. Managed databases. AI coding assistants that actually understand your codebase.

You can build real products that real people use. Reviews come in. Users are happy. The dopamine of shipping hits regularly.
But something nags at you.
Your data sits on AWS. Or Google Cloud. Or some VC-backed startup’s servers. You pay monthly fees that grow with your success. Users don’t own anything - you’re just another centralized platform. And monetization? Hope you like giving 30% to app stores or wrestling with payment processors.
The promise of Web3 - users owning data, creators getting paid directly, no middlemen - it was real. The execution just wasn’t there.
A Better Way
What if you could keep everything you love about modern web development - the familiar APIs, the instant deploys, the vibe coding flow - but get the benefits of blockchain?
What if your database was:
- On-chain - Data stored permanently on Celestia’s DA layer
- Monetizable - Built-in payments for every read and write
- Familiar - An intuitive SDK that feels natural to web developers

That’s OnchainDB.
How It Actually Works
Here’s what OnchainDB code looks like:
import { createClient } from '@onchaindb/sdk';
const db = createClient({
endpoint: 'https://api.onchaindb.io',
appId: 'your-app-id',
apiKey: 'your-api-key'
});
// Store data with payment callback
await db.store(
{
collection: 'products',
data: [{
id: 'prod_1',
name: 'Vintage Camera',
price: 299,
seller: userId
}]
},
async (quote) => {
const txHash = await wallet.signAndBroadcast(
quote.broker_address,
`${quote.total_cost_utia}utia`,
'OnchainDB storage'
);
return { txHash, network: 'mocha-4' };
}
);
// Query with QueryBuilder
const results = await db.queryBuilder()
.collection('products')
.whereField('category').equals('electronics')
.selectAll()
.limit(20)
.execute();
No Solidity or overly complex Rust smart contracts.
Your data is stored on Celestia’s blockchain, but you never query the blockchain directly. That’s where materialized views come in.
Materialized Views
Querying raw blockchain data directly is impractical for most apps. Network latency, parsing transaction data, reconstructing state - it’s not built for the read patterns web apps need.
OnchainDB solves this with materialized views - pre-computed query results that update automatically when your data changes. When you write data, it goes to Celestia for permanent storage. Simultaneously, OnchainDB updates indexed views optimized for reads.
You can create custom views for your most common queries:
// Create a materialized view for top-selling products
await db.createView(
'topSellers',
['products', 'orders'],
{
filter: { status: 'active' },
groupBy: 'productId',
aggregate: { totalSales: { $count: 'orders' } }
}
);
// Query the view - it's just another collection
const topProducts = await db.queryBuilder()
.collection('topSellers')
.selectAll()
.limit(100)
.execute();
Views are indexed and cached. Complex aggregations that would be impractical on-chain become straightforward queries. And yes, you can price access to your views separately from raw collection queries.
The real power? Views can join data across apps. Create a view that combines your product catalog with another app’s reviews, a third app’s pricing data, and a fourth’s inventory levels - all in one pre-computed, queryable result. Revenue splits automatically between all data providers every time someone queries your view.
Every data access generates revenue through the HTTP 402 payment protocol.
The Developer Experience Comparison
| What You Want | Traditional dApp | With OnchainDB |
|---|---|---|
| Store data on-chain | Write Solidity, optimize gas, audit | db.store() |
| Query data | Build custom indexers | db.queryBuilder() |
| Deploy | Testnet, audit, mainnet, pray | Git push to Amplify/Netlify |
| Monetize | Build token economics | Automatic with HTTP 402 |
| User onboarding | Wallet + ETH + tutorials | Just works |
The Revenue Model That Makes Sense
Think of OnchainDB as Shopify meets Stripe for data. You set the prices, we handle the payments.
Every interaction with your data generates revenue:
- Reads - Fee per query, customizable per collection or index
- Writes - Fee per record (stored on Celestia)
- Your cut - 70% of all fees, automatically
- No hosting costs - Infrastructure paid by the 30% platform fee
You control your pricing. Want to charge more for premium data? Set higher fees on specific collections. Running a public dataset? Set lower fees to drive volume. Have a high-value index that took months to build? Price it accordingly.
Your app earns money from day one. No ads. No subscriptions to manage. No payment processor negotiations. Just build, deploy, configure your pricing, and earn.
Cross-App Data: A Positive-Sum Game
Here’s where OnchainDB gets truly powerful: you can join data across different apps.
Traditional databases are silos. Your user data lives in your database. Another app’s product catalog lives in theirs. Want to combine them? Good luck negotiating API access, data sharing agreements, and revenue splits. In traditional webapps, data sharing is zero-sum - if someone else uses your data, you lose control or get nothing in return.
OnchainDB flips this model. Cross-app data becomes a positive-sum game where everyone wins.
With OnchainDB, every app’s data lives in the same global layer. You can query and join collections from multiple apps in a single request - and revenue automatically splits between all data providers. When someone queries your data, you get paid. When you query someone else’s data, they get paid. The more your data gets used, the more you earn.
// Query your products joined with another app's reviews
const enrichedProducts = await db.queryBuilder()
.collection('products')
.joinMany('reviews', 'reviewapp::reviews')
.onField('productId').equals('$data.id')
.selectFields(['rating', 'comment', 'author'])
.build()
.whereField('category').equals('electronics')
.selectAll()
.execute();
// Revenue splits automatically: you get paid, reviewapp gets paid
This creates a new economy for app builders and data curators:
- Data marketplaces - Monetize your data by letting other apps query it
- Instant partnerships - No contracts, no API negotiations - just query and pay
- Composable apps - Build on top of existing data instead of starting from scratch
- Shared revenue - Every query that touches your data earns you money
- Network effects - More apps joining means more data to combine, more queries, more revenue for everyone
The incentives are aligned. App builders want other apps to succeed because cross-app queries generate revenue. Data curators want their datasets used because usage equals income. Everyone benefits from a richer, more connected data ecosystem.
If Ethereum is a World VM, OnchainDB is a Collective Intelligence Database - a single, queryable data layer where apps collaborate, earn together, and grow the pie instead of fighting over slices.
See It Working
We built demo apps to show what’s possible:
- Todo App - Basic CRUD with on-chain persistence
- Store - E-commerce with built-in payments
- Social Feed - Social features that generate revenue
Each one was built with standard web technologies. Each one stores data on-chain. Each one earns money from usage.
Start Building
npm install @onchaindb/sdk
Keep using React. Keep deploying to Amplify or Netlify. Keep vibe coding with your favorite AI assistant.
Just swap your database layer for one that’s on-chain, monetized, and truly decentralized.
Ready to build? Check out our documentation or follow us on Twitter.
