---
title: 'Build a User Management App with Vue 3'
description: 'Learn how to use Supabase in your Vue 3 App.'
---
<$Partial path="quickstart_intro.mdx" />

If you get stuck while working through this guide, refer to the [full example on GitHub](https://github.com/supabase/supabase/tree/master/examples/user-management/vue3-user-management).
<$Partial path="project_setup.mdx" />
## Building the app
Let's start building the Vue 3 app from scratch.
### Initialize a Vue 3 app
We can quickly use [Vite with Vue 3 Template](https://vitejs.dev/guide/#scaffolding-your-first-vite-project) to initialize
an app called `supabase-vue-3`:
```bash
# npm 6.x
npm create vite@latest supabase-vue-3 --template vue
# npm 7+, extra double-dash is needed:
npm create vite@latest supabase-vue-3 -- --template vue
cd supabase-vue-3
```
Then let's install the only additional dependency: [supabase-js](https://github.com/supabase/supabase-js)
```bash
npm install @supabase/supabase-js
```
And finally we want to save the environment variables in a `.env`.
All we need are the API URL and the `anon` key that you copied [earlier](#get-the-api-keys).
<$CodeTabs>
```bash name=.env
VITE_SUPABASE_URL=YOUR_SUPABASE_URL
VITE_SUPABASE_PUBLISHABLE_KEY=YOUR_SUPABASE_PUBLISHABLE_KEY
```
$CodeTabs>
With the API credentials in place, create an `src/supabase.js` helper file to initialize the Supabase client. These variables are exposed
on the browser, and that's completely fine since we have [Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.
<$CodeTabs>
```js name=src/supabase.js
import { createClient } from '@supabase/supabase-js'
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY
export const supabase = createClient(supabaseUrl, supabaseAnonKey)
```
$CodeTabs>
Optionally, update [src/style.css](https://raw.githubusercontent.com/supabase/supabase/master/examples/user-management/vue3-user-management/src/style.css) to style the app.
### Set up a login component
Set up an `src/components/Auth.vue` component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords.
<$CodeTabs>
```vue name=/src/components/Auth.vue
```
$CodeTabs>
### Account page
After a user is signed in we can allow them to edit their profile details and manage their account.
Create a new `src/components/Account.vue` component to handle this.
<$CodeTabs>
```vue name=src/components/Account.vue
```
$CodeTabs>
### Launch!
Now that we have all the components in place, let's update `App.vue`:
<$CodeTabs>
```vue name=src/App.vue
```
$CodeTabs>
Once that's done, run this in a terminal window:
```bash
npm run dev
```
And then open the browser to [localhost:5173](http://localhost:5173) and you should see the completed app.

## Bonus: Profile photos
Every Supabase project is configured with [Storage](/docs/guides/storage) for managing large files like photos and videos.
### Create an upload widget
Create a new `src/components/Avatar.vue` component that allows users to upload profile photos:
<$CodeTabs>
```vue name=src/components/Avatar.vue
```
$CodeTabs>
### Add the new widget
And then we can add the widget to the Account page in `src/components/Account.vue`:
<$CodeTabs>
```vue name=src/components/Account.vue
```
$CodeTabs>
At this stage you have a fully functional application!