This is an opinionated starter project that to quickly spin up Nuxt based web projects with Google OAuth, Supabase backend, and client side state management with Pinia.
- Vue.js (latest version) / Nuxt 3
- Supabase for data persistences (PaaS)
- Pinia for state management (with Pinia Persisted State)
- Tailwind CSS for utility-first styling
- Lucide Vue Next for icons
- Vue3-Google-Sign-In for authentication
- Node.js (version compatible with Nuxt 3)
- npm or yarn
Clone the repository:
git clone [your-repo-url]
cd vue-nuxt-supabase-starter
Install dependencies:
npm install
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Go to the Credentials page
- Create an OAuth 2.0 Client ID
- Application type: Web application
- Add authorized JavaScript origins: https://localhost:3000(for development)
- Add authorized redirect URIs: https://localhost:3000(for development)
 
- Copy the Client ID and paste it into your .envfile asGOOGLE_CLIENT_ID
Local dev now requires HTTPS. Use mkcert to create local certificates:
Note: Install mkcert using chocolately (Windows) or Homebrew (Mac)
mkcert localhost
Note: nuxt.config.ts is already set up to use the cert during local dev:
export default defineNuxtConfig({
  devServer: {
    https: {
      key: './localhost-key.pem',
      cert: './localhost.pem',
    }
  },
- 
Add the variables SUPABASE_URL,SUPABASE_SERVICE_KEY, andSUPABASE_SCHEMAto your.envfile
- 
Run the automated setup script: pnpm run setup:supabaseThis will generate a SQL script with all necessary schema setup commands. 
- 
Go to your Supabase Dashboard 
- 
Navigate to SQL Editor 
- 
Copy and paste the generated SQL script 
- 
Execute the script 
- 
Go to Settings > API 
- 
Add your schema name to the exposed schemas list 
- 
Save the changes 
Note: We default to org_id = 1 in UserService, but modify as needed.
Background: This approach uses Postgres schemas to allow multiple projects on Supabase's free tier. See this gist for more details about the schema-based approach.
This project uses Tailwind CSS for styling. Tailwind provides a set of utility classes that you can use directly in your HTML to style your components. To customize your Tailwind setup, you can modify the tailwind.config.js file (if you've created one) or add Tailwind-specific configuration to your nuxt.config.ts file.
The project includes Lucide for icons. You can use these icons in your Vue components as needed.
To change the title and favicon, update nuxt.config.ts. Create your own favicon at https://favicon.io/ and simply drop overtop of the files in the public folder.
Create a .env file in the root directory of the project to store secret project variables.
NUXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id
SUPABASE_URL=your_supabase_project_url
SUPABASE_SCHEMA=your_supabase_schema
SUPABASE_SERVICE_KEY=your_supabase_service_key