Home / Companies / Convex / Blog / March 2024

March 2024 Summaries

10 posts from Convex

Filter
Month: Year:
Post Summaries Back to Blog
Convex offers an open-source version of its backend, allowing developers to perform local development of applications built on the platform, providing benefits such as lower latency, faster push times, and offline capabilities. To begin, developers need to download and run the appropriate Convex backend binary for their operating system, which can be executed from the terminal. Once running, the local OSS backend can be accessed using specific commands that require a URL and an admin key, both of which can be conveniently managed with a Justfile from the open-source repo. Developers can then run their frontend using appropriate commands, with the application identifying the local URL from a configuration file. Although upgrading the local backend may necessitate wiping the local database, a variety of CLI commands can be executed similarly to cloud development processes. Convex supports building full-stack projects with features like cloud functions, databases, file storage, and real-time updates.
Mar 29, 2024 468 words in the original blog post.
The Zero to One Hackathon by Convex showcased the talents of developers and startup founders who competed in building full-stack applications using Convex’s platform. The event featured a variety of innovative applications, including LaunchPie, an equity tracking app that won Best Overall App for its effective use of Convex features, and Quizzex, a real-time multiplayer quiz game that won Best Multiplayer App. Other notable winners included Farmware for Best Startup Idea, leveraging satellite imagery for soil moisture readings, and ConvJobs, an AI-based recruiting platform, which took Best AI App. Recapit won Most Viral App for its community engagement, while individuals like Reece Yang and Trace were recognized for valuable feedback and assistance in the Convex community. The hackathon celebrated creativity and problem-solving, with the judging panel comprising experts from various fields. Convex continues to encourage innovation and collaboration in the developer community.
Mar 27, 2024 778 words in the original blog post.
Observability and monitoring are crucial aspects of managing applications in production, encompassing logs, metrics, exceptions, and more to understand app behavior. Starting with logs is a fundamental step, offering insights into debug outputs, exceptions, and notable events via tools like the Convex dashboard and CLI commands. As applications scale, adopting dedicated observability platforms such as Axiom and DataDog provides advanced features like infinite log history, enriched metadata, and dashboards for metrics and trends. Reporting exceptions to Sentry and integrating with tools like Slack ensures rapid response to issues, while platforms like Plausible offer insights into user interactions and website traffic. PagerDuty facilitates on-call duties and incident management, ensuring timely alerts for app issues. Additionally, persisting important events to structured tables and utilizing analytics tools like BigQuery enhances data analysis capabilities, enabling comprehensive understanding and optimization of app performance and user engagement.
Mar 21, 2024 3,868 words in the original blog post.
The text provides strategies for rapidly achieving a Minimum Viable Product (MVP) in software development without becoming constrained by industry best practices or complex infrastructure. It emphasizes the importance of fast iteration cycles and offers practical tips such as committing code frequently, using logs effectively, and experimenting with queries interactively. The text advises against prematurely incorporating complex tools like containerization, CI/CD pipelines, or low-level cloud platforms, suggesting instead to focus on locally developing and deploying changes quickly. It also recommends creating an auth-free version initially, delaying schema validation, and using snapshot exports to experiment with significant changes. The emphasis is on reducing feedback loops and avoiding unnecessary complexity until the application matures, allowing developers to focus on core functionality and iterate swiftly.
Mar 20, 2024 1,596 words in the original blog post.
The text explores the use of TypeScript for writing complex query filters in the Convex database, highlighting its ability to enhance query performance and flexibility. It explains how Convex allows developers to leverage TypeScript's runtime to perform complex filtering tasks that go beyond the basic capabilities of Convex's built-in query filters. The article provides examples of how to implement TypeScript filters for retrieving posts with specific tags and discusses the limitations and benefits of using these filters compared to traditional SQL queries. It also touches on the potential of combining TypeScript filters with database indexes to optimize query performance and scalability, emphasizing that TypeScript filters are as efficient as SQL unindexed WHERE clauses in certain scenarios. Furthermore, the text introduces advanced indexing techniques, such as full-text and vector indexes, to further enhance data retrieval capabilities. Throughout, it underscores the flexibility and power of using TypeScript within the Convex runtime, allowing for custom filtering logic and integration with npm libraries, ultimately offering developers a robust toolset for building scalable data queries.
Mar 13, 2024 3,243 words in the original blog post.
Convex provides a method for unit testing its functions using a locally running open-source backend, which is advantageous for verifying the behavior of applications such as a notes app. This setup involves running a local backend, deploying code, and executing queries and mutations through a testing framework, with the option to clear all test data between runs to maintain isolation. The process includes creating a script to manage the backend lifecycle and using testing helpers to ensure that functions only run in designated test environments. Despite offering a robust testing framework, there are limitations such as the inability to run scheduled functions or control randomness within tests. A practical example involves testing a notes app to ensure that users can only access their own notes, while more complex scenarios, like a chess app, demonstrate how to test authenticated functions. The article also contrasts using this method with the newer convex-test library for unit tests, highlighting the flexibility of Convex's backend platform for building scalable full-stack AI projects.
Mar 12, 2024 1,587 words in the original blog post.
Ian Macartney's discussion on lightweight migrations in databases focuses on making small changes to documents without causing downtime or deploying new code. Migrations, which transform data from one format to another, can be challenging when dealing with large datasets, requiring code that temporarily handles both old and new data formats. The post explains how to use the Convex dashboard's bulk edit feature to apply transformations directly, offering a JSON editor to patch documents while avoiding race conditions thanks to serializable isolation in transactions. However, schema validation can prevent invalid data from being applied, and precautions are suggested for using this functionality primarily in development environments to avoid accidental data loss. The importance of documenting changes and testing through migration helpers is emphasized, especially for complex migrations requiring more than simple value changes. The Convex platform is described as a comprehensive backend solution for building scalable full-stack AI projects.
Mar 08, 2024 1,417 words in the original blog post.
James Cowling, CTO and co-founder of Convex, discusses the challenges faced by product developers due to the complex nature of current backend platforms and advocates for a shift towards more developer-friendly backends. He argues that traditional backend systems, while powerful, have become overly complex and difficult for developers to manage, particularly concerning data models, query languages like SQL, and system concerns like caching and data consistency. Cowling highlights the need for improved abstractions that simplify backend interactions, suggesting that platforms should function more like libraries with clean APIs, allowing developers to focus on building applications without being bogged down by backend complexities. He introduces Convex as a solution, emphasizing its ability to provide dynamic consistent caching, true end-to-end type safety, and the integration of Typescript functions within the database, all aimed at enhancing the developer experience and enabling faster, more efficient application development.
Mar 06, 2024 8,627 words in the original blog post.
Web Dev Cody introduces a file storage application project that incorporates role-based authorization using Next.js, Shadcn, and Typescript, emphasizing its scalability and rapid development potential. The project utilizes Convex, a comprehensive backend platform designed for full-stack AI projects, which offers integrated features such as cloud functions, a database, file storage, scheduling, workflow management, vector search, and real-time updates. This setup aims to provide a seamless experience for building and scaling applications efficiently.
Mar 04, 2024 56 words in the original blog post.
ESLint is a linter for JavaScript and TypeScript that enforces best practices, extending beyond type checking to catch potential bugs such as unused parameters or unawaited promises. The guide focuses on setting up ESLint for serverless functions, particularly with Convex, highlighting the importance of awaiting promises in server functions to ensure code execution. It discusses configuration options, such as using npm init @eslint/config to create a custom setup or adopting established best practices like Airbnb’s eslint-config-airbnb. Special attention is given to enforcing import rules to encourage the use of custom functions over raw server functions to maintain security and consistency, with tools like no-restricted-imports helping to manage imports effectively. The post also covers the integration of plugins like @typescript-eslint and eslint-plugin-react for enhanced functionality and rule enforcement, demonstrating how ESLint configurations can improve code quality and security in a React/Vite project using Convex.
Mar 01, 2024 1,564 words in the original blog post.