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

2.1 KiB

userbase starter: Nuxt

A minimal example of a Nuxt project with userbase integration.

Project Structure

Inside of your Nuxt project, you'll see the following folders and files:

.
├── app
│   ├── assets
│   │   └── css
│   ├── components
│   │   ├── Buttons.vue
│   │   ├── Footer.vue
│   │   └── List.vue
│   ├── composables
│   │   ├── useTodoActions.ts
│   │   └── useUser.ts
│   └── pages
│       ├── index.vue
│       └── user.vue
├── userbase.config.ts
├── bun.lock
├── nuxt.config.ts
├── package.json
├── public
│   ├── admin # generated by userbase and contains the admin UI
│   ├── userbase.ico
│   ├── userbase.svg
│   ├── favicon.ico
│   ├── file.svg
│   ├── globe.svg
│   ├── nuxt.svg
│   ├── robots.txt
│   └── window.svg
├── README.md
├── server
│   ├── middleware
│   │   └── userbase.ts # intercepts api and admin ui requests
│   ├── routes
│   │   └── todos.post.ts
│   └── utils
│       └── userbase.ts # initializes userbase instance
└── tsconfig.json

Here is a quick overview about how to adjust the behavior of userbase:

  • Initialization of the userbase config with helper functions are located at src/server/utils/userbase.ts
  • Admin UI is rendered at src/server/middleware/userbase.ts

Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:3000
npm run build Build your production site

Want to learn more?

Feel free to check our documentation or jump into our Discord server.