mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-22 03:51:08 -05:00
feat: major API restructure and Vue.js frontend integration
- Centralize API endpoints in dedicated api app with v1 versioning - Remove individual API modules from parks and rides apps - Add event tracking system with analytics functionality - Integrate Vue.js frontend with Tailwind CSS v4 and TypeScript - Add comprehensive database migrations for event tracking - Implement user authentication and social provider setup - Add API schema documentation and serializers - Configure development environment with shared scripts - Update project structure for monorepo with frontend/backend separation
This commit is contained in:
104
frontend/src/router/index.ts
Normal file
104
frontend/src/router/index.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Home from '@/views/Home.vue'
|
||||
import ParkList from '@/views/parks/ParkList.vue'
|
||||
import ParkDetail from '@/views/parks/ParkDetail.vue'
|
||||
import RideList from '@/views/rides/RideList.vue'
|
||||
import RideDetail from '@/views/rides/RideDetail.vue'
|
||||
import SearchResults from '@/views/SearchResults.vue'
|
||||
import Login from '@/views/accounts/Login.vue'
|
||||
import Signup from '@/views/accounts/Signup.vue'
|
||||
import ForgotPassword from '@/views/accounts/ForgotPassword.vue'
|
||||
import NotFound from '@/views/NotFound.vue'
|
||||
import Error from '@/views/Error.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: Home,
|
||||
},
|
||||
{
|
||||
path: '/parks/',
|
||||
name: 'park-list',
|
||||
component: ParkList,
|
||||
},
|
||||
{
|
||||
path: '/parks/:slug/',
|
||||
name: 'park-detail',
|
||||
component: ParkDetail,
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: '/parks/:parkSlug/rides/',
|
||||
name: 'park-ride-list',
|
||||
component: RideList,
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: '/parks/:parkSlug/rides/:rideSlug/',
|
||||
name: 'ride-detail',
|
||||
component: RideDetail,
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: '/rides/',
|
||||
name: 'global-ride-list',
|
||||
component: RideList,
|
||||
},
|
||||
{
|
||||
path: '/rides/:rideSlug/',
|
||||
name: 'global-ride-detail',
|
||||
component: RideDetail,
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: '/search/',
|
||||
name: 'search-results',
|
||||
component: SearchResults,
|
||||
},
|
||||
{
|
||||
path: '/search/parks/',
|
||||
name: 'search-parks',
|
||||
component: SearchResults,
|
||||
props: { searchType: 'parks' },
|
||||
},
|
||||
{
|
||||
path: '/search/rides/',
|
||||
name: 'search-rides',
|
||||
component: SearchResults,
|
||||
props: { searchType: 'rides' },
|
||||
},
|
||||
// Authentication routes
|
||||
{
|
||||
path: '/auth/login/',
|
||||
name: 'login',
|
||||
component: Login,
|
||||
},
|
||||
{
|
||||
path: '/auth/signup/',
|
||||
name: 'signup',
|
||||
component: Signup,
|
||||
},
|
||||
{
|
||||
path: '/auth/forgot-password/',
|
||||
name: 'forgot-password',
|
||||
component: ForgotPassword,
|
||||
},
|
||||
// Error routes
|
||||
{
|
||||
path: '/error/',
|
||||
name: 'error',
|
||||
component: Error,
|
||||
},
|
||||
// 404 catch-all route (must be last)
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
name: 'not-found',
|
||||
component: NotFound,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user