Adds a complete user authentication system and a protected dashboard. - Implements JWT-based authentication using ElysiaJS. - Integrates Prisma for database access and user management. - Creates a login page and protected routes for the dashboard. - Adds a dashboard layout with pages for API key management. - Includes necessary UI components from Mantine.
12 lines
257 B
TypeScript
12 lines
257 B
TypeScript
import { treaty } from '@elysiajs/eden'
|
|
import type { ServerApp } from '..'
|
|
|
|
const URL = process.env.BUN_PUBLIC_BASE_URL
|
|
if (!URL) {
|
|
throw new Error('BUN_PUBLIC_BASE_URL is not defined')
|
|
}
|
|
|
|
const apiFetch = treaty<ServerApp>(URL)
|
|
|
|
export default apiFetch
|