Bright ideas and techniques for building with Convex.
Profile image
Ian Macartney
a year ago

5 Dashboard Tricks

Running functions in the Convex Dashboard

I’ve been using the Dashboard a lot while developing my own apps, so I asked Arnold, the engineer behind the Dashboard, to put together some tips for using it effectively. I hope you find it as useful as I do!

So you’ve got your Convex app set up, eh? Maybe you’ve worked through the tutorial or tried out one of our demo apps. Perhaps you’ve even built your own app already!

Now that you’re familiar with Convex, I’d like to show you some of the tools you can use in the dashboard to level up your development productivity.

1. Iterate on and test new functions

To iterate quickly, it’s nice to be able to isolate your code and test backend functionality on its own, without needing to integrate into the frontend. Good news — you can do this straight from the Convex dashboard’s Functions page. To get started, click the “Run function” button found near your function’s implementation. From there, you can subscribe to live query results and run one-off actions and mutations. If you’re running npx convex dev in your code repo, any edits to the functions will sync automatically to your dev instance, so you can quickly edit and re-run your functions as you iterate.

An example of testing a “list messages” and “send message” Convex function using the dashboard

2. Seed and prototype data

Before you’ve gotten your functions fully wired up, you can use the dashboard to create tables and documents.

Convex provides two types of editors for editing documents — the default editor provides a simpler view of your data, broken down by field. Clicking the “Edit as JavaScript” button allows you to edit data using the same syntax you would in JavaScript code.

An example of adding a `channels` table to my chat app project, and associating an existing message with a new channel.

3. Search and destroy — data filters

Got a heap of data to sift through in your tables? Dashboard filters have got you covered. Find this handy button on the Data page, and use it to narrow down the results shown to just the documents you’re looking for.

An example of filtering a list of chat messages by channel ID

4. Upload files

Did you know that in addition to documents, Convex allows you to store and retrieve files, such as images and videos? Well now ya do — you can upload files programmatically in your Convex functions, or upload individual files using the File storage tab on the Data page.

Uploading a file to convex

5. Edit your app’s configuration live

Since Convex queries are fully reactive, updating your data in the dashboard will inform all clients subscribed to the related data that their queries should be re-run. See this post on using Convex to implement a basic kill switch.

Build in minutes, scale forever.

Convex is the backend application platform with everything you need to build your project. Cloud functions, a database, file storage, scheduling, search, and realtime updates fit together seamlessly.

Get started