All articles
The full, unabridged story on how the Convex internals work.
Sujay Jayakar
21 days ago
Read this article to learn how you can develop against our open-source backend using our packaged binaries.
Nipunn Koorapati
25 days ago
Which to choose, the expressive power of code, or the robustness of built-in database features? With Convex, you can have both. By eliminating the boundary between the application and the database, Convex provides a uniform and powerful way to model your entire backend data flow and security using plain ol' code.
Jamie Turner
2 months ago
Online migrations in Convex using mutations. Including a helper to track migration state!
Ian Macartney
7 days ago
I want to share my mental model of databases:
- Databases are just big spreadsheets
- An index is just a view of the spreadsheet sorted by one or more columns
- Binary search over a sorted list is faster than a linear scan (for large lists)
Sarah Shader
7 days ago
This post will cover various aspects of operational maturity, and steps to take as your app grows up.
Ian Macartney
13 days ago
Learn about best practices for testing your full-stack apps - running on Convex or elsewhere!
Ian Macartney
13 days ago
We shipped a behind-the-scenes update that lets customers run 10x concurrent functions than they used to. Emma, who helped ship the update, provides the context, architecture, and impact.
Emma Forman Ling
18 days ago
Read this article to learn how you can build our open-source backend from source.
Nipunn Koorapati
22 days ago
Contestants have been hard at work with our Winter Hackathon that we ran with Devpost. In this post, we announce the winners and their prizes!
Wayne Sutton
a month ago
By setting up dedicated tools, you can get actionable data to help understanding errors, performance, user behavior and allow you respond quickly when things change.
Ian Macartney
a month ago
Before you burden yourself with “best practices” for large-scale companies, focus on what will reduce your feedback cycles and help you ship early and often. Think about your use case, not your toolbox.
Ian Macartney
a month ago
There’s a new Convex helper to perform generic TypeScript filters, with the same performance as built-in Convex filters, and unlimited potential.
Lee Danilek
a month ago
Convex recently released an open source version of the backend. We can use this to unit test Convex functions by running them with a local backend. These tests will work by running a backend locally, pushing your code, and using the `ConvexClient` to execute queries and mutations from your favorite testing framework and asserting on the results.
Sarah Shader
a month ago
Patch all of your data in your database table with the bulk edit feature on the Convex dashboard, without writing migration code.
Ian Macartney
2 months ago
ESLint is a powerful tool that goes beyond simply type checking. We go over how to set it up and implement some basic workflows with the
Ian Macartney
2 months ago
Step by step guide to take a file URI provided by Expo media APIs and upload it to Convex in React Native.
Indy Khare
2 months ago
I recently built a full-stack app called notesGPT. It allows you to record a voice note, transcribes it, and extract action items and display them as action items. It’s fully open source and comes equipped with authentication, storage, vector search, action items, and is fully responsive on mobile for ease of use.
Hassan El Mghari
2 months ago
As your app grows from tens to hundreds to thousands of users, there are some techniques that will keep your database queries snappy and efficient. I’ve put together a short list of the most common techniques used by teams scaling on Convex.
Ian Macartney
2 months ago
Learn how to automatically retry actions in Convex while also learning a little about scheduling, system tables, and function references.
James Cowling
2 months ago
Convex Ents is a library that provides: simpler ways to model and query related documents, ability to easily map and filter documents, enforcing unique field values, default field values, cascading deletes, soft deletion and more!
Michal Srb
3 months ago
Advice and resources for session tracking per-tab or per-browser via localStorage / sessionStorage using React Context, hooks, and some utilities to make your life easier.
Ian Macartney
3 months ago
If you have a more specific type than what you can express with Convex validators, you can still document that at the type level in Convex by casting once in your schema definition.
Ian Macartney
3 months ago
Traverse database relationships in a readable, predictable, and debuggable way. Support for one-to-one, one-to-many, and many-to-many via utility functions available in convex-helpers.
Ian Macartney
3 months ago
A few more advanced techniques & helpers to further reduce duplication and accelerate your Convex workflow.
Anjana Vakil
3 months ago
Use Zod with TypeScript for argument validation on your server functions allows you to both protect against invalid data, and define TypeScript types that propagate to your client. This can now be used as an alternative to the built-in argument validation on Convex.
Ian Macartney
4 months ago
Re-use code and centralize request handler definitions with discoverability and type safety and without the indirection of middleware or nesting of wrappers. Use the new customFunction module in convex-helpers for your Convex TypeScript functions.
Ian Macartney
4 months ago
We hosted a hackathon for building features on top of a Notion clone created by CodeWithAntonio. Here are the results.
Wayne Sutton
4 months ago
It can be tough to wrangle types to behave how you want them to. Thankfully, Convex was designed to make the experience with types perfect. Learn why that's the case here.
Anjana Vakil
5 months ago
Does your app need to limit the amount of users that can use it at a time? You might need to add a waitlist, which you will learn to build in this post.
Michal Srb
5 months ago
Syncing your Pagerduty instance with Slack is a good way to stay on top of your on-call schedule. We cover syncing Pagerduty information with a Slack channel.
Gautam Gupta
5 months ago
This year vector databases have sprung up like mushrooms to enable applications to retrieve context based on semantic search. A large portion of these applications have used the retrieved context to augment the ability of large language models (LLMs) in a pattern known as RAG. On November 7th OpenAI released its Assistants API, enabling the implementation of AI chat interfaces with context retrieval without needing a separate message store or vector database. Does this new API make vector databases obsolete?
Michal Srb
5 months ago
Convex is a full-stack development platform and cloud database, including built-in vector search. In this third post in our [series](https://stack.convex.dev/ai-chat-using-openai-assistants-api), we’ll build an AI-powered chat interface using Convex, with our own message storage and context retrieval.
Michal Srb
5 months ago
In this second post in our series, we’ll build an AI-powered chat interface using LangChain and its new Convex integration.
Michal Srb
5 months ago
On November 7th OpenAI released its Assistants API, enabling chat bot with context retrieval implementations without needing a messages or vector database. In this post, we’ll cover how to leverage this API to build a fully functioning AI chat interface.
Michal Srb
5 months ago
Learn how you can win cash prizes for building features on an open-source Notion clone.
Wayne Sutton
5 months ago
Now that we've launched Preview Deployments on Convex, you can test out backend changes easier than ever. But you may want to seed your project with data first, so let's go over how to do that.
Ian Macartney
5 months ago
There’s a new fastest way to start building a new app on Convex. Use our new magical command, npm create convex, to spin up a new Convex app from a preexisting template.
Convex
6 months ago
Launching our official Convex Fivetran connector.
Nipunn Koorapati
6 months ago
It's never been a better time to make your own town of AIs.
Ian Macartney
6 months ago
Stream GPT responses without brittle browser-based HTTP streaming.
Multiplayer reactivity, persistence, reactivity via Convex. Using OpenAI’s Node SDK server-side, and Convex's useQuery hook client-side.
Ian Macartney
6 months ago
Learn more about how AI Town works and how to customize it. In this post, we'll dig into how character identities are represented: how to alter them, and how to add entirely new characters.
Anjana Vakil
8 months ago
Learn how to build a full stack app with authentication without any third-party auth providers, using Convex and the Lucia library.
Michal Srb
8 months ago
If you’re building a full-stack app, chances are you’ll want some of your users to pay you for the service you provide. How to use Stripe with Convex to get it done.
Michal Srb
9 months ago
Learn how to generate fake data for your dev deployments using the Faker library
Nicolas Ettlin
10 months ago
Pinecone and Convex are a good match when you're looking to build an application that leverages embeddings and also has application data.
Ian Macartney
10 months ago
Leverage Typeform while keeping the data in a powerful transactional application database.
Kate Rudolph
10 months ago
Embeddings, why they’re useful, and how we can store and use them in Convex.
Ian Macartney
a year ago
Is your project in Airtable ready for more code and less no-code? I’ve published some code to help you migrate your data into Convex.
Kate Rudolph
a year ago
If you've been itching to write Convex programs in Rust, your time has come. We take the new Convex Rust crate for a spin by writing a distributed system simulation of Santa and his team working together at the North Pole. Yes, really.
Jamie Turner
a year ago
Implementing row-level security on Convex as a library. Wrap access to the database with access checks written in plain old JS / TS.
Lee Danilek
a year ago
In this post we’ll look at some patterns for structuring relationships in the Convex database.
Ian Macartney
a year ago
Convex provides automatic type safety all the way from your database schema to your React app. How does it work? Hint: we use some wild TypeScript.
Alex Cole
a year ago
There are as many ways to migrate data as there are databases, but here’s some basic information to set the stage.
Ian Macartney
a year ago
Did you know you can use the Convex Dashboard to run functions, enter seed data, filter & delete data, upload files, and more?
Ian Macartney
a year ago
Your document is safely stored, but search is coming up empty? Inconsistent search systems can really confuse users! Don't worry–in Convex, transactional search indexing ensures that users always get what they expect and your apps just work.
Jamie Turner
a year ago
In this post, we’ll look at how to use the moderation API to flag messages before sending them to Chat-GPT, and patterns for handling these errors in a full-stack React app.
Ian Macartney
a year ago
How to store multiple personalities Convex and provide them to the chatGPT API, enabling changing personalities mid-conversation. This is a follow-up to Building a full-stack ChatGPT app.
Ian Macartney
a year ago
Adding advanced HTTP Endpoint functionality by extending Convex with Hono.
Sarah Shader
a year ago
Let's build a full-stack chat app to talk to ChatGPT on its new API!
Ian Macartney
a year ago
Reactive backends like Convex make building live-updating apps a cinch, but default behavior might be too reactive for some use cases. Not to worry! Let’s fine-tune the reactive dataflow of a Convex + React app to deliver a better UX.
Anjana Vakil
a year ago
Oftentimes during testing we want to mock out our backend so we can unit test our UI components without talking to our actual server code.
In this article, we’ll explore options for testing React components that call Convex React hooks using mocking and dependency injection. To do this, I’ve written a sample TypeScript React app using the Vitest testing framework. The patterns presented in this post are also applicable to other JavaScript apps and frameworks.
Arnold Trakhtenberg
a year ago
Implement asynchronous job patterns using a table to track progress. Fire-and-forget, cancelation, timeouts, and more.
Ian Macartney
a year ago
Implementing end-to-end encryption on top of Convex to build a secret-sharing app.
Lee Danilek
a year ago
Getting users to sign up for a new service before seeing any benefits is challenging. In this post, we looked at a couple of strategies for managing user information without requiring a login.
Ian Macartney
a year ago
Use Convex to fetch an image from OpenAI’s image generation service based on a user-provided prompt.
Ian Macartney
a year ago
Building multiplayer games requires a lot of synchronization logic and event systems. However, using Convex, we get a lot of this for free! Follow along here as we build a complex multiplayer game on Convex, leveraging its reactive-by-default queries, transactional mutations, backend storage, and scheduled functions.
Ian Macartney
a year ago
SQL has been a part of computing for a very long time, and SQL-based database systems underly most of the world's applications. But recently, developers have been clamoring for something better, and it's time to move on.
Jamie Turner
a year ago
An approach to server-persisted session data with Convex, wrapping your server functions and storing a session ID on the client.
Ian Macartney
a year ago
Function validation is important for a production app because you can’t always control which clients are talking to your server. See how to use zod to validate your Convex functions, using our withZod wrapper.
Ian Macartney
a year ago
Convex middleware serves many purposes. Sometimes authentication, sometimes i18n. This time? Making sense (or nonsense) of emerging technology industry trends.
Jamie Turner
a year ago
Using wrapper functions like withUser can help you organize your code into middleware-like blocks that you can compose to keep your function logic concise.
Ian Macartney
a year ago
Implementing an "upvote" feature 4 ways with Convex.
Kate Rudolph
a year ago
Some patterns for incorporating presence into a web app leveraging Convex, and sharing some tips & utilities I built along the way.
Ian Macartney
a year ago
When your database supports ACID semantics, you're free to write code the intuitive way and ignore the complexities of concurrency and failure.
Jamie Turner
a year ago
Working with Convex has made our development workflow so much more streamlined—we no longer have to worry about the complexities of traditional frontend-backend communication, enabling us to build out the core of our new application portal at a blazing-fast speed.
Web Development at Berkeley
a year ago
Paginating over large datasets is tricky when the data is changing. Naive approaches result in missing or duplicated data. The trick is to rewrite limit queries (fetch 5 items) into range queries (fetch between cursors). Convex handles this automatically!
Alex Cole
a year ago
For write-heavy applications, use single flighting to dynamically throttle requests. See how we implement this with React hooks for Convex.
Ian Macartney
a year ago
Convex 0.5.0 introduces built-in support for actions — arbitrary lambda functions that run in a Node.js environment on the Convex cloud. We use the term action to differentiate these functions from Convex mutation and query functions, which enable transactional writes and dynamic subscriptions that update whenever data changes.
James Cowling
a year ago
Today we’re going to talk about how to flip features on and off remotely using a clever use of the reactive nature of Convex queries.
Ian Macartney
a year ago
The serverless movement has eliminated so many problems but it has left application developers with the hardest one of all: managing distributed state.
James Cowling
a year ago
How do I ensure my Convex database queries are fast and efficient? When should I define an index? What is an index?
This document explains how you should think about query performance in Convex by describing a simplified model of how queries and indexes function.
Alex Cole
2 years ago
Why does anything really need to run on the server anymore? And even if it does, do I, the developer, need to be so involved?
Yes! Even in a serverless world, the backend computing context being a real, discrete environment that you have control and influence over is not only necessary but hugely beneficial.
Jamie Turner
2 years ago
You don’t have to worry about the platform locking you into a decision that seems convenient at first but is a headache to deal with later.
Indy Khare
2 years ago
While making Fast5, Convex's wordle-style multiplayer racing game, we ran into several interesting challenges. This week, let's dig into managing the combination of local and global state.
Jamie Turner
2 years ago
At Convex, we're creating a platform for managing global state for web developers. Unsurprisingly, we've found one of the best ways to improve our platform is to actually build stuff with it!
Jamie Turner
2 years ago
Relational databases are powerful tools for persisting data, but using them to build interactive web apps requires a lot of work. A web app architecture built on a relational database is an entire cluster of databases, backends, caching nodes, and Pub/Sub servers. And even after you invest in all of that infrastructure you'll still need to explicitly define your database schema upfront and write cumbersome SQL queries.
At Convex we believe that web developers shouldn't have to worry about any of this. We can handle the servers, caching, and reactivity and you can focus on your product.
Alex Cole
2 years ago
On Cloud Firestore, you'll have to do some acrobatics to integrate with React and listen for realtime updates. Down the road, you'll find your app full of slow loading experiences from request waterfalls and your database full of half-committed mutations.
Alex Cole
2 years ago
Ideas around immutability, purity, and dataflow programming are quietly saturating our technologies like Bitcoin and React. And while these early inroads are enabling exciting new ways to build large and dependable applications, there is still much to do to realize the full potential of this revolution.
Jamie Turner
2 years ago