Platform Operators
Convex Integration
Platform-runtime reference for self-hosting Banata on Convex.
@banata-auth/convex is the platform-runtime package that powers every Banata deployment. It contains the Convex component, schema, migrations, and plugins that make Banata work. If you are running the Banata platform itself, this is the package that does the heavy lifting.
Who This Is For
You should read this page if you are:
- Operating the hosted Banata service — you deploy and maintain the production platform.
- Self-hosting Banata — you run your own instance of the Banata platform.
- Contributing to Banata internals — you are working on runtime code, plugins, or migrations.
If you are a regular app developer integrating authentication into your product, this package is not for you. Head to the SDK, Next.js, or React guides instead.
What It Provides
Inside a Banata platform deployment, @banata-auth/convex gives you:
- Component registration — the packaged Convex component that gets installed into your deployment.
- Schema — the packaged component schema for all Banata tables.
- Migrations — versioned data migrations that run automatically on deploy.
- Better Auth runtime helpers — the auth engine configuration and request handling.
- Banata plugins — emails, API keys, projects, RBAC, organizations, vault, and audit logs.
Minimal Local Files
The platform keeps a thin local convex/banataAuth/ folder for the pieces that cannot live entirely inside the Convex component environment.
convex/
|-- convex.config.ts
|-- auth.config.ts
|-- authNode.ts
|-- http.ts
`-- banataAuth/
|-- auth.ts
|-- adapter.ts
`-- schema.tsWhy these files remain local:
banataAuth/auth.ts— binds your deployment environment and runtime config.banataAuth/adapter.ts— closes over the local auth factory.banataAuth/schema.ts— serves as the local codegen anchor that Convex components require.
Everything else comes from the package.
Product Boundary
There is an important distinction between the platform and customer apps:
- Customer apps authenticate through a Banata dashboard project.
- Project scope comes from a project-scoped API key that you create in the dashboard.
- Self-hosting keeps that same dashboard-first flow — you still create projects and issue keys.
So @banata-auth/convex powers the Banata platform, while customer apps use the client-facing packages:
@banata-auth/sdk— framework-agnostic client@banata-auth/nextjs— Next.js integration@banata-auth/react— React hooks and components
Next Steps
- Self-Hosting — set up your own Banata instance.
- Environment Variables — configure secrets and service URLs.
- Deploying — push your platform to production.