Files
shishantbiswas 0bfcb5ad71
Run Tests / test (pull_request) Successful in 4m57s
bknd is dead long live userbase
2026-09-27 19:34:06 +05:30

29 lines
749 B
Markdown

# userbase + Tanstack Start Example
This is a minimal example to shows how to integrate userbase with Tanstack Start.
## Setup
```bash
bun install
bun run dev
```
## How it works
1. **`userbase.config.ts`** - userbase configuration with database connection, schema, and seed data
2. **`src/routes/api.$.ts`** - Handles `/api/*` requests for userbase
3. **`src/routes/index.tsx`** - Using `getApp()` to fetch data in loader
3. **`src/routes/ssr.tsx`** - Server Side example with `getApp()` to fetch data on server
## API Endpoints
- `GET /admin` - for Admin Dashboard
- `GET /api/data/entity/todos` - List todos (requires auth)
- `POST /api/auth/password/login` - Login
## Test Credentials
- Email: `test@userbase.io`
- Password: `12345678`