feat: add design persistence functionality with Auth0 and Supabase integration
- Implemented `useDesignPersistence` composable for managing design records. - Enhanced `useSlipmatDesigner` to support loading designs from JSON. - Created global authentication middleware for route protection. - Added Supabase client plugin for database interactions. - Developed API endpoints for fetching, saving, and retrieving designs. - Introduced utility functions for Auth0 token verification and Supabase client retrieval. - Updated Nuxt configuration to include Auth0 and Supabase environment variables. - Added necessary dependencies for Auth0 and Supabase. - Enhanced TypeScript configuration for improved type support.
This commit is contained in:
@@ -5,6 +5,30 @@ export default defineNuxtConfig({
|
||||
compatibilityDate: "2025-07-15",
|
||||
devtools: { enabled: true },
|
||||
css: ["./app/assets/css/main.css"],
|
||||
runtimeConfig: {
|
||||
auth0: {
|
||||
clientSecret: process.env.AUTH0_CLIENT_SECRET,
|
||||
},
|
||||
supabase: {
|
||||
serviceRoleKey: process.env.SUPABASE_SERVICE_ROLE_KEY,
|
||||
},
|
||||
public: {
|
||||
auth0: {
|
||||
domain: process.env.AUTH0_DOMAIN,
|
||||
clientId: process.env.AUTH0_CLIENT_ID,
|
||||
audience: process.env.AUTH0_AUDIENCE,
|
||||
scope: process.env.AUTH0_SCOPE ?? "openid profile email",
|
||||
baseUrl: process.env.AUTH0_BASE_URL ?? "http://localhost:3000",
|
||||
redirectUri:
|
||||
process.env.AUTH0_REDIRECT_URI ?? "http://localhost:3000/auth/callback",
|
||||
},
|
||||
supabase: {
|
||||
url: process.env.SUPABASE_URL,
|
||||
anonKey: process.env.SUPABASE_ANON_KEY,
|
||||
storageBucket: process.env.SUPABASE_STORAGE_BUCKET ?? "designs",
|
||||
},
|
||||
},
|
||||
},
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user