- Added a new `api` service for the NestJS backend, including health checks and dependencies on PostgreSQL, Redis, and MinIO. - Introduced PostgreSQL and Redis services with health checks and configurations for data persistence. - Added MinIO for S3-compatible object storage and a one-shot service to initialize required buckets. - Updated the Nginx configuration to proxy requests to the new backend API and MinIO storage. - Enhanced the Dockerfile to support the new API environment variables and configurations. - Updated the `package.json` and `package-lock.json` to include new dependencies for QR code generation and other utilities. Co-authored-by: Cursor <cursoragent@cursor.com>
64 lines
1.8 KiB
TypeScript
64 lines
1.8 KiB
TypeScript
import { createRouter, createWebHistory } from 'vue-router'
|
|
import { setupGuards, authGuard, filmmakerGuard } from './guards'
|
|
import Browse from '../views/Browse.vue'
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
name: 'browse',
|
|
component: Browse,
|
|
meta: { requiresAuth: false }
|
|
},
|
|
{
|
|
path: '/library',
|
|
name: 'library',
|
|
component: Browse,
|
|
meta: { requiresAuth: false }
|
|
},
|
|
{
|
|
path: '/profile',
|
|
name: 'profile',
|
|
component: () => import('../views/Profile.vue'),
|
|
beforeEnter: authGuard,
|
|
meta: { requiresAuth: true }
|
|
},
|
|
|
|
// ── Creator / Filmmaker Routes ────────────────────────────────────────────
|
|
{
|
|
path: '/backstage',
|
|
name: 'backstage',
|
|
component: () => import('../views/backstage/Backstage.vue'),
|
|
beforeEnter: filmmakerGuard,
|
|
meta: { requiresAuth: true, requiresFilmmaker: true }
|
|
},
|
|
{
|
|
path: '/backstage/project/:id',
|
|
name: 'project-editor',
|
|
component: () => import('../views/backstage/ProjectEditor.vue'),
|
|
beforeEnter: filmmakerGuard,
|
|
meta: { requiresAuth: true, requiresFilmmaker: true }
|
|
},
|
|
{
|
|
path: '/backstage/analytics',
|
|
name: 'analytics',
|
|
component: () => import('../views/backstage/Analytics.vue'),
|
|
beforeEnter: filmmakerGuard,
|
|
meta: { requiresAuth: true, requiresFilmmaker: true }
|
|
},
|
|
{
|
|
path: '/backstage/settings',
|
|
name: 'filmmaker-settings',
|
|
component: () => import('../views/backstage/Settings.vue'),
|
|
beforeEnter: filmmakerGuard,
|
|
meta: { requiresAuth: true, requiresFilmmaker: true }
|
|
},
|
|
]
|
|
})
|
|
|
|
// Setup authentication guards
|
|
setupGuards(router)
|
|
|
|
export default router
|