feat: initialize monorepo structure with Bun and Turborepo
- Add package.json for the root with workspace configuration and scripts - Create @gruperly/config package with TypeScript configuration - Establish shared package @gruperly/shared with Zod schemas for validation - Implement group, student, and payment schemas using Zod - Set up TypeScript configuration for shared package - Document stack architecture and technical specifications in stack.md - Configure Turborepo with build, dev, lint, and typecheck tasks
This commit is contained in:
49
apps/web/src/router.tsx
Normal file
49
apps/web/src/router.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import { createRootRoute, createRoute, createRouter } from '@tanstack/react-router'
|
||||
import { RootLayout } from './components/layout'
|
||||
import { HomeView } from './routes/home'
|
||||
import { GroupsView } from './routes/groups'
|
||||
import { PaymentsView } from './routes/payments'
|
||||
import { SettingsView } from './routes/settings'
|
||||
|
||||
const rootRoute = createRootRoute({
|
||||
component: RootLayout,
|
||||
})
|
||||
|
||||
const indexRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/',
|
||||
component: HomeView,
|
||||
})
|
||||
|
||||
const groupsRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/groups',
|
||||
component: GroupsView,
|
||||
})
|
||||
|
||||
const paymentsRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/payments',
|
||||
component: PaymentsView,
|
||||
})
|
||||
|
||||
const settingsRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/settings',
|
||||
component: SettingsView,
|
||||
})
|
||||
|
||||
const routeTree = rootRoute.addChildren([
|
||||
indexRoute,
|
||||
groupsRoute,
|
||||
paymentsRoute,
|
||||
settingsRoute,
|
||||
])
|
||||
|
||||
export const router = createRouter({ routeTree })
|
||||
|
||||
declare module '@tanstack/react-router' {
|
||||
interface Register {
|
||||
router: typeof router
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user