Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rjdellecese/confect/llms.txt
Use this file to discover all available pages before exploring further.
Introduction to Confect
Confect is a framework that deeply integrates Effect with Convex, enabling you to build type-safe, functional backend applications with the full power of Effect’s ecosystem.What is Confect?
Confect goes beyond simple Effect bindings for Convex - it’s a comprehensive framework that brings Effect’s schema-driven development, type safety, and functional programming patterns to the Convex platform.Schema-Driven Development
Define your database schema, function arguments, and return types using Effect’s powerful schema library for end-to-end type safety.
Effect Services
Access Convex platform capabilities through Effect services like
DatabaseReader and DatabaseWriter for composable, testable code.HTTP APIs
Build HTTP APIs using Effect’s HTTP modules with automatic OpenAPI documentation powered by Scalar.
Full-Stack Types
Automatically decode and encode data according to your schemas from client to function to database and back.
Why Confect?
Confect provides several key benefits for developers building Convex applications:Type Safety Everywhere
With Confect, you define your schemas once using Effect Schema, and they automatically validate data at runtime while providing compile-time types across your entire stack - from React components to database queries.Functional Effect Programming
Leverage Effect’s powerful abstractions for handling errors, managing dependencies, and composing business logic:Rich Schema Validation
Effect Schema provides runtime validation with detailed error messages, transformations, and composable validators:Seamless React Integration
Use Confect’s React hooks for type-safe queries, mutations, and actions:Prerequisites
Before using Confect, you should have:Required Knowledge: Familiarity with both Effect and Convex is essential for working with Confect.
Effect Experience
You should understand:- Effect’s core concepts (Effect type, generators, pipe)
- Effect Schema for validation and transformation
- Effect Layers for dependency injection
- Basic functional programming patterns
Learn Effect
Start with the official Effect documentation to learn the fundamentals
Convex Knowledge
You should be familiar with:- Convex’s architecture and real-time capabilities
- Queries, mutations, and actions
- The Convex development workflow
- Basic Convex schema and validators
Learn Convex
Read the Convex documentation to understand the platform
Architecture Overview
Confect applications follow a structured pattern:Define Database Schema
Create your database tables using Effect Schema and Confect’s
Table.make() API.Specify Functions
Define your queries, mutations, and actions with typed arguments and return values using
FunctionSpec.Implement Business Logic
Write your function implementations using Effect and Confect services like
DatabaseReader and DatabaseWriter.Core Packages
Confect is organized into several packages:| Package | Description |
|---|---|
@confect/core | Shared specs and schemas used by all packages |
@confect/server | Backend bindings and database access services |
@confect/react | Client-side React hooks for queries and mutations |
@confect/cli | Code generation and development tooling |
What’s Next?
Quickstart
Build your first Confect application in minutes
Core Concepts
Deep dive into Confect’s core concepts and patterns