@nimbleflux/fluxbase-sdk-vue
@nimbleflux/fluxbase-sdk-vue
Vue/Nuxt composables and SSR cookie storage for the Fluxbase SDK.
Scaffold status: provides the SSR-auth foundation (cookie storage, provide/inject composable). Full reactive composables (like the React/Svelte hooks) are a follow-on.
Install
bun add @nimbleflux/fluxbase-sdk-vue
Peer dependencies: @nimbleflux/fluxbase-sdk, vue.
Provide the client
// main.ts
import { createApp } from 'vue'
import { createClient } from '@nimbleflux/fluxbase-sdk'
import { FLUXBASE_CLIENT_KEY } from '@nimbleflux/fluxbase-sdk-vue'
import App from './App.vue'
const app = createApp(App)
app.provide(
FLUXBASE_CLIENT_KEY,
createClient({ url: 'http://localhost:8080' }),
)
app.mount('#app')
Use it in a component:
<script setup lang="ts">
import { useFluxbaseClient } from '@nimbleflux/fluxbase-sdk-vue'
const client = useFluxbaseClient()
const { data } = await client.from('products').select('*').execute()
</script>
SSR auth with httpOnly cookies (Nuxt)
Back the auth session with an httpOnly cookie via the h3 event's cookie API:
// server plugin / middleware
import { createClient } from '@nimbleflux/fluxbase-sdk'
import { createCookieStorage } from '@nimbleflux/fluxbase-sdk-vue'
export default defineEventHandler((event) => {
const client = createClient({
url: useRuntimeConfig().fluxbaseUrl,
auth: { storage: createCookieStorage(event) }, // httpOnly + sameSite=lax
})
event.context.fluxbase = client
})
License
MIT
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 2026.10.2 | ||
| 2026.10.1 | ||
| 2026.9.10 | ||
| 2026.9.9 | ||
| 2026.9.8 | ||
| 2026.9.7 | ||
| 2026.9.6 | ||
| 2026.9.5 | ||
| 2026.9.4 | ||
| 2026.9.3 | ||
| 2026.9.2 | ||
| 2026.9.1 | ||
| 2026.8.14 | ||
| 2026.8.13 | ||
| 2026.8.12 | ||
| 2026.8.11 | ||
| 2026.8.10 | ||
| 2026.8.9 | ||
| 2026.8.8 | ||
| 2026.8.7 | ||
| 2026.8.6 | ||
| 2026.8.5 | ||
| 2026.8.4 | ||
| 2026.8.3 | ||
| 2026.8.2 | ||
| 2026.8.1 | ||
| 2026.7.8 | ||
| 2026.7.7 | ||
| 2026.7.6 | ||
| 2026.7.5 |
Showing the latest 30 of 31. See every release on npm
Pre-releases (14)
| Version | Released | License |
|---|---|---|
| 2026.8.8-rc.7 | ||
| 2026.8.8-rc.6 | ||
| 2026.8.8-rc.5 | ||
| 2026.8.8-rc.4 | ||
| 2026.8.8-rc.3 | ||
| 2026.8.8-rc.2 | ||
| 2026.8.8-rc.1 | ||
| 2026.7.4-rc.6 | ||
| 2026.7.4-rc.5 | ||
| 2026.7.4-rc.4 | ||
| 2026.7.4-rc.3 | ||
| 2026.7.4-rc.2 | ||
| 2026.7.4-rc.1 | ||
| 2026.7.3-rc.24 |