Step 1: Create Your App
- Go to app.ondb.ai
- Create a new App to get your
appId - Navigate to the “Security” tab to generate your
appKey
Step 2: Install the SDK
TypeScript
Step 3: Initialize the Client
TypeScript
Step 4: Create Indexes
Creating indexes automatically creates the collections and sets up the data structure.TypeScript
Step 5: Store Data
TypeScript
Step 6: Query Data
TypeScript
That’s It!
You now have a fully functional database with indexed queries, automatic payment handling, and built-in data monetization. Optional immutability is available if your use case requires on-chain verification.Next Steps
Authentication
Learn about App Key and Agent Key authentication
Query Builder
Build complex queries with the fluent API
Payment Flows
Understand USDC payment callbacks
CRUD Operations
Document operations