Skip to main content

Setup your development environment

Learn how to update your docs locally and deploy them to the public.

Install Convex Client

Configure Environment

Create a .env.local file in your project root:
Never commit your secret keys to version control. Use environment variables for all sensitive configuration.

Initialize Convex Client

Make your first request

Let’s start by fetching all available categories:
Expected response:

Authentication

Most API endpoints require authentication. Here’s how to set it up:
1

Install Clerk

2

Configure Clerk Provider

3

Use Authenticated Queries

Common Use Cases

1. Register a Customer

2. Create a Store

3. Add Products to Cart

4. Create an Order

Error Handling

Always implement proper error handling:

Rate Limiting

The API implements rate limiting to ensure fair usage:
  • Queries: 1000 requests per minute
  • Mutations: 100 requests per minute
  • Actions: 50 requests per minute
Use the useQuery hook for real-time data that updates automatically, and useMutation for user actions.

Next Steps

Explore API Reference

Dive deep into all available endpoints

Authentication Guide

Learn about user authentication and permissions

Payment Integration

Set up Stripe payments and marketplace fees

Real-time Features

Build reactive UIs with live data

Need Help?

Use the generateUploadUrl function to get a secure upload URL:
Use the useQuery hook which automatically updates when data changes:
Use the pagination options in queries: