devbase

what is devbase

devbase is the core data and onchain transaction engine for apps built with dev.fun. It enables persistent data storage and onchain logics for your dev.fun apps, such as payments and token management. When you integrate devbase into your dev.fun app, your app gains capabilities like onchain transaction logic and wallet integration—without writing any backend or smart contract code manually.


how to integrate devbase into your app

To activate devbase in your app, simply enter any prompt related payment or transaction in your first prompt when creating the app. This tells dev.fun to include devbase and wallet integration automatically.

Example prompt:

“ build an app where user need to pay 0.000001 SOL to roll a dice.”

This will:

  • Enable persistent storage for your app’s state.

  • Automatically add wallet support for handling SOL transactions.


how to set up a receiving wallet for direct transactions

To receive funds from onchain transactions (e.g., game entry fees or purchases), provide your Solana wallet address and specify that devbase should use it.

Example prompt:

“Use wallet 9wQsiWeutYdHfWbErRnP2sNX4FMe9beDQvJdyKfWV28W to receive the XXXXX transaction.”

Once set, all funds from defined transactions will be routed to this wallet.


how to set up a vault to store and later distribute tokens

You can instruct devbase to create a vault wallet—a program-controlled wallet that holds tokens temporarily and later allows claims (e.g., by a winner or based on specific rules).

You can find the vault address and export the private key of the vault under "configuration" tab.

Example prompt:

“Use vault to hold the token deposit of 0.000001 SOL for every game play. The winner of the game can claim all the deposited tokens.”

This setup allows for:

  • Secure storage of funds during gameplay.

  • Controlled release of tokens based on app logic (like choosing a winner).


how to view your devbase schema

You can view more details of your devbase schema in the "configuration" tab. Under the "devbase" item, you can see your devbase schema in JSON to indicate your data structure, as well as a plain language explaination of your devbase and onchain logics.

This schema shows:

  • The data structure being stored.

  • The onchain operations involved.


how to understand your devbase logic

If you’re unsure what your app’s devbase setup does, or you want a breakdown of the logic or transactions involved, simply switch to “brainstorm” mode in dev.fun and ask for an explanation.

Example:

“Explain my devbase schema.”

The dev.fun AI will describe:

  • What triggers the transaction

  • Who sends/receives funds

  • Any vault mechanics or rules applied

Last updated