Getting Started
Project Structure
How Banata Auth is organized for dashboard-first usage and for self-hosting.
Banata Auth now needs to be read in two layers:
- Public, dashboard-first surface
- Self-hosting implementation surface
The first is what most users should integrate with. The second exists for Banata's own dogfooding and for teams that explicitly want to self-host.
Public Surface
These are the packages that fit a dashboard-first model:
| Package | Purpose |
|---|---|
@banata-auth/sdk | Remote admin API client |
@banata-auth/nextjs | Next.js proxy and server helpers |
@banata-auth/react | React provider, hooks, and auth UI |
@banata-auth/shared | Shared types and errors |
In this model, your app talks to Banata endpoints over HTTP and Banata owns the auth system of record.
Self-Hosting Surface
@banata-auth/convex is the self-hosting kit. It exists so Banata can dogfood the runtime and so advanced users can run the auth engine inside their own Convex deployment.
That path requires local backend files in the consumer app:
text
convex/
├── convex.config.ts
├── auth.config.ts
├── authNode.ts
├── http.ts
└── banataAuth/
├── convex.config.ts
├── schema.ts
├── auth.ts
└── adapter.tsIf you are self-hosting, use:
Monorepo Layout
text
banata-auth/
├── apps/
│ ├── dashboard/
│ ├── example-app/
│ ├── auth-ui/
│ ├── admin-portal/
│ └── docs/
├── packages/
│ ├── sdk/
│ ├── nextjs/
│ ├── react/
│ ├── convex/
│ ├── shared/
│ └── ui/
└── tooling/What Each App Is For
| App | Purpose |
|---|---|
apps/dashboard | Banata admin dashboard |
apps/example-app | Reference self-hosted integration |
apps/auth-ui | Auth UI pages |
apps/admin-portal | End-user admin portal |
apps/docs | Documentation site |
Practical Rule
- If a user only needs Banata as an auth service, point them to the dashboard and SDK.
- If a user explicitly wants to run auth inside their own Convex deployment, point them to the self-hosting docs and GitHub examples.