Stack logo
Sync up on the latest from Convex.

All articles

Sync collaborative documents with Convex
Or how I learned to love Tiptap and ProseMirror OT sync.
Ian Macartney's avatar
Ian Macartney
5 hours ago
Keeping Users in Sync: Building Real-time Collaboration with Convex
Hamza Saleem shares how Convex simplifies building real-time data sync apps like Sticky by using the useQuery hook, where you can easily fetch and sync data, like sticky notes, with minimal setup. He explains how Convex handles challenges like syncing data, live updates, and user tracking.
Hamza Saleem's avatar
Hamza Saleem
2 days ago
picture of a cave and representation of an api to represent code spelunking
As the newest member of the Convex team I am keen to find out how the magic works. Join me as I go spelunking through the codebase and uncover how the API generation actually works under the covers.
Mike Cann's avatar
Mike Cann
13 days ago
The Convex team actually enjoying working together
A good set of values can be critically important in establishing a team that stands for something. This post outlines why company values are important, what characteristics good and bad company values have, and how to run a process to determine your company values. This applies equally well to a company or team or any other organization.
James Cowling's avatar
James Cowling
15 days ago
briefcase with michael cann's face and arrows to represent changing careers
Today is my first day working for Convex 🎉, so I thought I’d take the opportunity to share my thoughts on why I decided to join and what excites me about the technology.
Mike Cann's avatar
Mike Cann
18 days ago
Building Type-Safe Rust Applications with Convex: Introducing convex-typegen
Building Type-Safe Rust Applications with Convex: Introducing convex-typegen from CodingWIthJamal - a tool that brings Convex's type safety and developer experience to the Rust ecosystem.
Jamal Lyons's avatar
Jamal Lyons
a month ago
Building a collaborative task list using Automerge CRDTs and Convex sync
Learn about Automerge CRDTs for collaborative editing, syncing changes using Convex.
Ian Macartney's avatar
Ian Macartney
a month ago
Visual of vector embedding and how they work in the game Midpoints
Ever wondered what word sits perfectly between "sporty" and "practical"? Or perhaps "sweet" and "crunchy"? Midpoints is a new word game that gives you 10 chances to find the best match and scores you accordingly!
Tom Redman's avatar
Tom Redman
a month ago
An Object Sync Engine
Object sync engines manage a rich object graph across multiple clients and a centralized server and are a great fit for building local-first apps.
Sujay Jayakar's avatar
Sujay Jayakar
a month ago
Create an AI blog chatbot
Mike, a Senior Software Developer and Convex Champion, built “Mike Bot”—a virtual chatbot on his blog that captures his knowledge, experience, and personality—using Convex as the backend, along with OpenAI and a custom React UI.
Mike Cann's avatar
Mike Cann
a month ago
Sync symbol next to the google photos logo
Indy, our Head of Product, led building Google Photos for Android. This is his story.
Indy Khare's avatar
Indy Khare
a month ago
A Map of Sync
We can categorize sync platforms across nine dimensions: data size, data update rate, the structure of the data, input latency, offline support, number of concurrent clients, centralization, flexibility, and consistency.
Sujay Jayakar's avatar
Sujay Jayakar
2 months ago
multiple puzzle pieces connecting with circuitry to some main technology, to represent convex components.
Convex Components enable an ecosystem of powerful building blocks to reduce the amount of code you have to write and maintain yourself. Geospatial search, Expo push notifications, LaunchDarkly feature flags, durable function workflows, and more.
Ian Macartney's avatar
Ian Macartney
2 months ago
Sync icons in zen garden
Sync platforms like Convex simplify distributed state management, ensuring that developers can focus on building their applications rather than managing backend complexities.
Jamie Turner's avatar
Jamie Turner
2 months ago
Convex for Swift illustration
I’m excited to announce Convex Swift, which unlocks the ability to build iOS and MacOS clients for your Convex app.
Lightning bolt to represent trigger and alert on computer
Triggers automatically run code whenever data in a table changes. A library in the convex-helpers npm package allows you to attach trigger functions to your Convex database.
Lee Danilek's avatar
Lee Danilek
2 months ago
useState() with a hook extending from the text to represent react hooks
The React Hook useState is probably used more than necessary. We'll go over how you can port those usages over to Convex with simple queries and mutations.
Celine Soeiro's avatar
Celine Soeiro
3 months ago
Screenshot of Cursor Composer with the text "Cursor, do my job for me"
I was curious to see if I could prompt my way through developing an entire app with Cursor and Claude. It went pretty well - but there are some important caveats to keep in mind.
Tom Redman's avatar
Tom Redman
3 months ago
Zero to one hackathon Vol 2results
We're excited to announce the winners of the Zero to One Hackathon V2! Thousands of developers and startup founders brought their A-game, building some impressive fullstack apps on Convex.
Wayne Sutton's avatar
Wayne Sutton
3 months ago
Image of a branch, referencing a github repository, next to a shield, which represents type safety.
Turns out, you can organize your Convex project across multiple repositories! Check out this guide on how to implement this in your project.
Jordan Hunt's avatar
Jordan Hunt
3 months ago
icons representing create, read, update and delete
The term CRUD, or CRUD API, is often tossed around when interacting with databases or building backend APIs. This article will examine what CRUD is, what it’s suitable for, and its shortcomings. Finally, we’ll explore how to quickly implement a CRUD API using a modern backend like Convex.
Jamie Turner's avatar
Jamie Turner
3 months ago
Image of phone with gears and pencil next to it to represent mobile dev.
It was my goal to create an API that both feels natural to Android developers who have kept up with modern application architecture principles, as well something that feels like a natural fit in the Convex ecosystem.
Abstract visual of cross-origin-resource-sharing in the Convex brand colors
Cross-Origin Resource Sharing (CORS) is a crucial concept in modern web development, yet it's often misunderstood and can be a source of frustration for many developers. This article aims to demystify CORS, explain its importance, and provide practical guidance on its implementation. Whether you're a seasoned developer or just starting out, this guide will help you navigate the intricacies of CORS and use it effectively in your projects.
Tom Redman's avatar
Tom Redman
4 months ago
Acting as a user from the Convex dashboard
You can test functions that rely on a sign-in by decoding your JWT and using the fields with "Act as a user" on the dashboard.
Ian Macartney's avatar
Ian Macartney
4 months ago
icon of a gear and timer, representing scheduled cron jobs
Even though Convex supports the creation of cron jobs out of the box, until now, we've only supported static jobs. With user space crons, we now support the programmatic definition of crons at runtime.
James Cowling's avatar
James Cowling
5 months ago
a page 1 icon and some brackets with ellipsis to represent pagination
Convex offers robust control over pagination with a powerful function, getPage, enabling complex edge cases. In this article, we go over how to use that function in your Convex app.
Lee Danilek's avatar
Lee Danilek
5 months ago
padlock icon to represent auth
Convex Auth is a library for implementing authentication natively in your Convex backend.
Michal Srb's avatar
Michal Srb
5 months ago
icon of logs and then icon of a stream, to represent log streaming!
Log streams like Axiom and Datadog can be used to provide powerful querying and alerting on logs and errors from your Convex functions, helping with debugging issues when they come up and providing early insights to detect smaller issues before they become bigger. This article covers how to do the several common things with either Axiom or Datadog hooked up as a Convex log stream including filtering to a request, logging structured metadata, and visualizing usage.
Sarah Shader's avatar
Sarah Shader
6 months ago
Icon of a person throwing a ball for a dog to fetch and a stream on the right, representing the post title
Learn the basics of HTTP streaming with Convex by re-implementing OpenAI's SDK using built-in fetch and async iterators. No npm dependencies needed.
Ian Macartney's avatar
Ian Macartney
6 months ago
an icon representing fullstack programming inside a paradoxical shape
When people want a full-stack framework, what they really want is an opinionated backend that interoperates seamlessly with their frontends in a way that empowers full-stack developers to easily build apps that can scale.
Ian Macartney's avatar
Ian Macartney
6 months ago
ai chat robot next to a river stream representing http streaming
By leveraging HTTP actions with streaming, this chat app balances real-time responsiveness with efficient bandwidth usage. Users receive character-by-character updates to their own responses directly from ChatGPT, while other users see periodic updates, minimizing database bandwidth.
Sarah Shader's avatar
Sarah Shader
6 months ago
A magnifying glass looking for a specific property next to a database, representing SELECT DISTINCT in SQL
You'll often want to retrieve unique records from your database. While SELECT DISTINCT is the traditional way to do this in SQL databases, we've improved on this pattern in Convex by making it more consistent.
Nipunn Koorapati's avatar
Nipunn Koorapati
6 months ago
Icon of rate limiting and then an icon of a bucket, representing token bucketing
Implementing application rate limiting when you have fast access to a database with strong ACID guarantees. Token bucket and fixed window, with fairness, burst accommodation and fire-and-forget support.
Ian Macartney's avatar
Ian Macartney
7 months ago
the definition of cache invalidation: a cache is a non-authoritative representation of data maintained for performance
A cache is a non-authoritative representation of data maintained for performance reasons. Find out what these words mean and when you should care about them here.
Jamie Turner's avatar
Jamie Turner
7 months ago
On the left, a distributed server icon, on the right a folder icon with a pirate's hook in it
Compare push-based load balancing with pull-based work stealing as scalable strategies for distributing resource-intensive workloads, such as running LLM models for AI apps.
Ian Macartney's avatar
Ian Macartney
7 months ago
A distributed server on the left and a folder icon with a pirate's hook in it
Implementing "work stealing" - a workload distribution strategy - using Convex's reactive database.
Ian Macartney's avatar
Ian Macartney
7 months ago
Convex with Auth.js
Learn how to use Auth.js with your Next.js server and Convex backend to build a full-featured authentication system.
Michal Srb's avatar
Michal Srb
7 months ago
Next auth logo inside the convex logo
Learn how to install and configure the Convex adapter for Auth.js as part of getting set up with Convex and Next.js.
Michal Srb's avatar
Michal Srb
7 months ago
image of a rocket taking off with a person standing to the left. on the right side of the image is an icon of a trophy.
Earlier this year we ran a hackathon to find who could use Convex's features the best to build an application from scratch. From 2400 participants, Konrad Hylton pulled it off with Launchpie.
Wayne Sutton's avatar
Wayne Sutton
8 months ago
Icon of a schema in a yellow box next to an icon of a file migration in a black box
Online migrations in Convex using mutations, including a Convex Component to manage them.
Ian Macartney's avatar
Ian Macartney
8 months ago
a database icon, an equals icon, followed by a spreadsheet icon
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's avatar
Sarah Shader
8 months ago
the basics of operational maturity
This post will cover various aspects of operational maturity, and steps to take as your app grows up.
Ian Macartney's avatar
Ian Macartney
8 months ago
setting up your testing mvp for peace of mind
Learn about best practices for testing your full-stack apps - running on Convex or elsewhere!
Ian Macartney's avatar
Ian Macartney
8 months ago
how we scaled function execution by ten times
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's avatar
Emma Forman Ling
8 months ago
How Convex works
The full, unabridged story on how the Convex internals work.
Sujay Jayakar's avatar
Sujay Jayakar
9 months ago
building the open source backend from source
Read this article to learn how you can build our open-source backend from source.
Nipunn Koorapati's avatar
Nipunn Koorapati
9 months ago
Developing with the convex open-source binaries
Read this article to learn how you can develop against our open-source backend using our packaged binaries.
Nipunn Koorapati's avatar
Nipunn Koorapati
9 months ago
Zero to one hackathon 2024 results
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's avatar
Wayne Sutton
9 months ago
Observing your app in production
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's avatar
Ian Macartney
9 months ago
How to build quickly when starting a project: yolo
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's avatar
Ian Macartney
9 months ago
Using TypeScript to Write Complex Query Filters
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's avatar
Lee Danilek
9 months ago
Running tests using a local open-source backend
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's avatar
Sarah Shader
9 months ago
Bulk edit documents with a patch to apply
Patch all of your data in your database table with the bulk edit feature on the Convex dashboard, without writing migration code.
Ian Macartney's avatar
Ian Macartney
9 months ago
Setup ESLint to enforce type checking and Typescript code quality
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's avatar
Ian Macartney
10 months ago
Uploading files from React Native / Expo
Step by step guide to take a file URI provided by Expo media APIs and upload it to Convex in React Native.
Indy Khare's avatar
Indy Khare
10 months ago
The Software-Defined Database
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's avatar
Jamie Turner
10 months ago
AI-Powered Voice Note Taking
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's avatar
Hassan El Mghari
10 months ago
Queries that scale: Indexing, Pagination, Read/Write Isolation
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's avatar
Ian Macartney
10 months ago
Retry your actions: use the power of convex scheduling
Learn how to automatically retry actions in Convex while also learning a little about scheduling, system tables, and function references.
James Cowling's avatar
James Cowling
10 months ago
Convex Ents: Bring your ORM workflow to Convex
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's avatar
Michal Srb
a year ago
Session tracking without cookies?
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's avatar
Ian Macartney
a year ago
Using branded types in validators with type casting in your schema
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's avatar
Ian Macartney
a year ago
Code for joining queries with helpers for one-to-many, many-to-many, and more.
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's avatar
Ian Macartney
a year ago
Argument validation without repetition: Advanced tips and tricks
A few more advanced techniques & helpers to further reduce duplication and accelerate your Convex workflow.
Anjana Vakil's avatar
Anjana Vakil
a year ago
Use zCustomQuery to add zod argument validation
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's avatar
Ian Macartney
a year ago
Customize your Convex functions with the new customQuery helper
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's avatar
Ian Macartney
a year ago
Convex Build Bounty for CodeWithAntonio's Jotion: Announcing the Winners
We hosted a hackathon for building features on top of a Notion clone created by CodeWithAntonio. Here are the results.
Wayne Sutton's avatar
Wayne Sutton
a year ago
"types and validators" in bold text. "best practices and useful tidbits" in light text. a colored cookbook
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's avatar
Anjana Vakil
a year ago
example of waiting customers
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's avatar
Michal Srb
a year ago
"who's on call?" in black text, above an image of the pagerduty logo with a red arrow going to the slack logo.
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's avatar
Gautam Gupta
a year ago
open AI logo followed by a text box with the word assistants API followed by a list of vector database logos with the skull emoji next to them
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's avatar
Michal Srb
a year ago
AI chat bot in a docs site
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's avatar
Michal Srb
a year ago
AI chat bot in a docs site
In this second post in our series, we’ll build an AI-powered chat interface using LangChain and its new Convex integration.
Michal Srb's avatar
Michal Srb
a year ago
AI chat bot in a docs site
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's avatar
Michal Srb
a year ago
Convex Build Bounty for CodeWithAntonio's Jotion: Build features and earn prizes
Learn how you can win cash prizes for building features on an open-source Notion clone.
Wayne Sutton's avatar
Wayne Sutton
a year ago
Text: "seeding preview deployments" in a red box. Below it is the text: "3 ways" in a yellow box. To the right is a small image of preview deployments.
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's avatar
Ian Macartney
a year ago
"npm create convex" in monospace font
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's avatar
Convex
a year ago
Convex and Fivetran logos over a colored stripe. Text reads: "Seamless data integration from Convex to your destinations of choice" alongside a stylized version of the Convex frontend.
Launching our official Convex Fivetran connector.
The new AI town frontend with new assets, featuring a forest camp where the agents hang out.
It's never been a better time to make your own town of AIs.
Ian Macartney's avatar
Ian Macartney
a year ago
Multi-user chat with ChatGPT streaming responses.
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's avatar
Ian Macartney
a year ago
AI Town
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's avatar
Anjana Vakil
a year ago
Screenshot of an authentication UI
Learn how to build a full stack app with authentication without any third-party auth providers, using Convex and the Lucia library.
Michal Srb's avatar
Michal Srb
a year ago
Convex starts a checkout with Stripe, then handles the success webhook
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's avatar
Michal Srb
a year ago
A code block showing how to generate fake data using Faker. Robot hands typing on a keyboard are visible in the background.
Learn how to generate fake data for your dev deployments using the Faker library
Nicolas Ettlin's avatar
Nicolas Ettlin
a year ago
Convex sits between the browser and cloud services like Pinecone and OpenAI
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's avatar
Ian Macartney
a year ago
Moving data from Typeform into Convex
Leverage Typeform while keeping the data in a powerful transactional application database.
Kate Rudolph's avatar
Kate Rudolph
a year ago
Embeddings turn text into an array of numbers
Embeddings, why they’re useful, and how we can store and use them in Convex.
Ian Macartney's avatar
Ian Macartney
2 years ago
Migrating from Airtable to Convex
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's avatar
Kate Rudolph
2 years ago
Convex gets Rusty with Santa
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's avatar
Jamie Turner
2 years ago
image of row and security shield to represent row level security
Add row-level security to your database access by wrapping database reads and writes in your Convex serverless functions.
Lee Danilek's avatar
Lee Danilek
2 years ago
A web of relationships
In this post we’ll look at some patterns for structuring relationships in the Convex database.
Ian Macartney's avatar
Ian Macartney
2 years ago
Convex provides automatic type safety from your database schema to your React app. How does it work? Hint: we use some wild TypeScript.
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's avatar
Alex Cole
2 years ago
Make changes without taking chances
There are as many ways to migrate data as there are databases, but here’s some basic information to set the stage.
Ian Macartney's avatar
Ian Macartney
2 years ago
Running functions in the Convex Dashboard
Did you know you can use the Convex Dashboard to run functions, enter seed data, filter & delete data, upload files, and more?
Ian Macartney's avatar
Ian Macartney
2 years ago
Searching for Sanity
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's avatar
Jamie Turner
2 years ago
Using the createModeration API to moderate code
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's avatar
Ian Macartney
2 years ago
Identities for ChatGPT
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's avatar
Ian Macartney
2 years ago
Defining a Hono endpoint in Convex
Adding advanced HTTP Endpoint functionality by extending Convex with Hono.
Sarah Shader's avatar
Sarah Shader
2 years ago
Building a fullstack chat-gpt application
Let's build a full-stack chat app to talk to ChatGPT on its new API!
Ian Macartney's avatar
Ian Macartney
2 years ago
Image of Roy Lichtenstein's 1963 pop art piece “Crying Girl", depicting a woman looking nervous & upset with tears in her eyes (image via WikiArt, fair use)
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's avatar
Anjana Vakil
2 years ago
A prompt and response from a Discord bot powered by Convex
Convex provides client libraries for storing and interacting with data, but sometimes we want a third-party app like Discord to interact with data in Convex. In this post, we use webhooks to build a simple Discord bot powered by Convex.
Sarah Shader's avatar
Sarah Shader
2 years ago
A screenshot of Jest test results
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.
Ari's avatar
Ari
2 years ago
Using a table to manage background jobs
Implement asynchronous job patterns using a table to track progress. Fire-and-forget, cancelation, timeouts, and more.
Ian Macartney's avatar
Ian Macartney
2 years ago
The Whisper app for sending encrypted secrets
Implementing end-to-end encryption on top of Convex to build a secret-sharing app.
Lee Danilek's avatar
Lee Danilek
2 years ago
Friends don't make friends log in
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's avatar
Ian Macartney
2 years ago
A chat app with images generated by OpenAI
Use Convex to fetch an image from OpenAI’s image generation service based on a user-provided prompt.
Ian Macartney's avatar
Ian Macartney
2 years ago
People discussing art: what was the Dall-E prompt?
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's avatar
Ian Macartney
2 years ago
It's not you, it's SQL
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's avatar
Jamie Turner
2 years ago
Store per-session data in Convex
An approach to server-persisted session data with Convex, wrapping your server functions and storing a session ID on the client.
Ian Macartney's avatar
Ian Macartney
2 years ago
Convex loves zod
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's avatar
Ian Macartney
2 years ago
The Edge
Convex middleware serves many purposes. Sometimes authentication, sometimes i18n. This time? Making sense (or nonsense) of emerging technology industry trends.
Jamie Turner's avatar
Jamie Turner
2 years ago
Layers. Photo by Hasan Almasi: @hasanalmasi on Unsplash
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's avatar
Ian Macartney
2 years ago
A happy goat is one that gets votes
Implementing an "upvote" feature 4 ways with Convex.
Kate Rudolph's avatar
Kate Rudolph
2 years ago
Feel connected to your team by adding presence to your site
Some patterns for incorporating presence into a web app leveraging Convex, and sharing some tips & utilities I built along the way.
Ian Macartney's avatar
Ian Macartney
2 years ago
Dare to resist weak platform guarantees. A.C.I.D. in the style of a D.A.R.E. logo
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's avatar
Jamie Turner
2 years ago
An application field live-updating in the application table and application review page
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.
Reactive Pagination automatically updates the page when inserting a new element.
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's avatar
Alex Cole
2 years ago
Two planes with colored exhaust trails
For write-heavy applications, use single flighting to dynamically throttle requests. See how we implement this with React hooks for Convex.
Ian Macartney's avatar
Ian Macartney
2 years ago
Movie clap board
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's avatar
James Cowling
2 years ago
An iron gate
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's avatar
Ian Macartney
2 years ago
A toy train approaches a gap in the track
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's avatar
James Cowling
2 years ago
An open drawer in a card file
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's avatar
Alex Cole
2 years ago
Fast 5 logo
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's avatar
Jamie Turner
2 years ago
Chart depicting 'complexity of your app' on the x-axis and 'complexity of using Convex' on the y-axis. The line is horizontal.
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's avatar
Indy Khare
3 years ago
Fast 5 logo
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's avatar
Jamie Turner
3 years ago
Fast 5 logo
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's avatar
Jamie Turner
3 years ago
Convex and PostgreSQL logos
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's avatar
Alex Cole
3 years ago
Convex and Firebase logos
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's avatar
Alex Cole
3 years ago
Visualization of many different data points
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's avatar
Jamie Turner
3 years ago