();
+
+/* ROUTE_MANIFEST_START
+{
+ "routes": {
+ "__root__": {
+ "filePath": "__root.tsx",
+ "children": [
+ "/",
+ "/dashboard",
+ "/auth/login",
+ "/auth/oauth",
+ "/live/$ticleId",
+ "/ticle/$ticleId",
+ "/ticle/open"
+ ]
+ },
+ "/": {
+ "filePath": "index.tsx"
+ },
+ "/dashboard": {
+ "filePath": "dashboard/_layout.tsx",
+ "children": [
+ "/dashboard/apply",
+ "/dashboard/open"
+ ]
+ },
+ "/auth/login": {
+ "filePath": "auth/login.tsx"
+ },
+ "/auth/oauth": {
+ "filePath": "auth/oauth.tsx"
+ },
+ "/dashboard/apply": {
+ "filePath": "dashboard/apply.tsx",
+ "parent": "/dashboard"
+ },
+ "/dashboard/open": {
+ "filePath": "dashboard/open.tsx",
+ "parent": "/dashboard"
+ },
+ "/live/$ticleId": {
+ "filePath": "live/$ticleId.tsx"
+ },
+ "/ticle/$ticleId": {
+ "filePath": "ticle/$ticleId.tsx"
+ },
+ "/ticle/open": {
+ "filePath": "ticle/open.tsx"
+ }
+ }
+}
+ROUTE_MANIFEST_END */
diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsx
new file mode 100644
index 00000000..39cad695
--- /dev/null
+++ b/apps/web/src/routes/__root.tsx
@@ -0,0 +1,22 @@
+import { Outlet, createRootRoute, useLocation } from '@tanstack/react-router';
+
+import Header from '@/components/common/Header';
+
+const NO_HEADER_PATHS = ['/live', '/auth'];
+
+export const Route = createRootRoute({
+ component: RootComponent,
+});
+
+function RootComponent() {
+ const location = useLocation();
+ const currentPath = location.pathname;
+ const hasHeader = !NO_HEADER_PATHS.some((path) => currentPath.startsWith(path));
+
+ return (
+ <>
+ {hasHeader && }
+
+ >
+ );
+}
diff --git a/apps/web/src/routes/auth/login.tsx b/apps/web/src/routes/auth/login.tsx
new file mode 100644
index 00000000..712242c5
--- /dev/null
+++ b/apps/web/src/routes/auth/login.tsx
@@ -0,0 +1,9 @@
+import { createFileRoute } from '@tanstack/react-router';
+
+export const Route = createFileRoute('/auth/login')({
+ component: RouteComponent,
+});
+
+function RouteComponent() {
+ return 'local 로그인';
+}
diff --git a/apps/web/src/routes/auth/oauth.tsx b/apps/web/src/routes/auth/oauth.tsx
new file mode 100644
index 00000000..a07012af
--- /dev/null
+++ b/apps/web/src/routes/auth/oauth.tsx
@@ -0,0 +1,16 @@
+import { createFileRoute, Link } from '@tanstack/react-router';
+
+export const Route = createFileRoute('/auth/oauth')({
+ component: RouteComponent,
+});
+
+function RouteComponent() {
+ return (
+
+ OAuth 로그인
+
+ 로컬 로그인
+
+
+ );
+}
diff --git a/apps/web/src/routes/dashboard/_layout.tsx b/apps/web/src/routes/dashboard/_layout.tsx
new file mode 100644
index 00000000..1c44db74
--- /dev/null
+++ b/apps/web/src/routes/dashboard/_layout.tsx
@@ -0,0 +1,23 @@
+import { createFileRoute, Outlet, redirect } from '@tanstack/react-router';
+
+import DashboardTab from '@/components/dashboard';
+
+export const Route = createFileRoute('/dashboard')({
+ component: RouteComponent,
+ beforeLoad: () => {
+ if (window.location.pathname === '/dashboard') {
+ throw redirect({
+ to: '/dashboard/apply',
+ });
+ }
+ },
+});
+
+function RouteComponent() {
+ return (
+ <>
+
+
+ >
+ );
+}
diff --git a/apps/web/src/routes/dashboard/apply.tsx b/apps/web/src/routes/dashboard/apply.tsx
new file mode 100644
index 00000000..56ce5bab
--- /dev/null
+++ b/apps/web/src/routes/dashboard/apply.tsx
@@ -0,0 +1,9 @@
+import { createFileRoute } from '@tanstack/react-router';
+
+export const Route = createFileRoute('/dashboard/apply')({
+ component: RouteComponent,
+});
+
+function RouteComponent() {
+ return '내가 신청한 티클';
+}
diff --git a/apps/web/src/routes/dashboard/open.tsx b/apps/web/src/routes/dashboard/open.tsx
new file mode 100644
index 00000000..33fc20bf
--- /dev/null
+++ b/apps/web/src/routes/dashboard/open.tsx
@@ -0,0 +1,9 @@
+import { createFileRoute } from '@tanstack/react-router';
+
+export const Route = createFileRoute('/dashboard/open')({
+ component: RouteComponent,
+});
+
+function RouteComponent() {
+ return '내가 개설한 티클';
+}
diff --git a/apps/web/src/routes/index.tsx b/apps/web/src/routes/index.tsx
new file mode 100644
index 00000000..a2d07bc8
--- /dev/null
+++ b/apps/web/src/routes/index.tsx
@@ -0,0 +1,24 @@
+import { createFileRoute, Link } from '@tanstack/react-router';
+
+export const Route = createFileRoute('/')({
+ component: IndexPage,
+});
+
+function IndexPage() {
+ return (
+ <>
+ 티클 개설하기
+
+
+ Ticle 1
+
+
+ Ticle 2
+
+
+ Ticle 3
+
+
+ >
+ );
+}
diff --git a/apps/web/src/routes/live/$ticleId.tsx b/apps/web/src/routes/live/$ticleId.tsx
new file mode 100644
index 00000000..9ded0d41
--- /dev/null
+++ b/apps/web/src/routes/live/$ticleId.tsx
@@ -0,0 +1,10 @@
+import { createFileRoute } from '@tanstack/react-router';
+
+export const Route = createFileRoute('/live/$ticleId')({
+ component: RouteComponent,
+});
+
+function RouteComponent() {
+ const { ticleId } = Route.useParams();
+ return `live ${ticleId}`;
+}
diff --git a/apps/web/src/routes/ticle/$ticleId.tsx b/apps/web/src/routes/ticle/$ticleId.tsx
new file mode 100644
index 00000000..62ff6019
--- /dev/null
+++ b/apps/web/src/routes/ticle/$ticleId.tsx
@@ -0,0 +1,10 @@
+import { createFileRoute } from '@tanstack/react-router';
+
+export const Route = createFileRoute('/ticle/$ticleId')({
+ component: RouteComponent,
+});
+
+function RouteComponent() {
+ const { ticleId } = Route.useParams();
+ return `ticle ${ticleId}`;
+}
diff --git a/apps/web/src/routes/ticle/open.tsx b/apps/web/src/routes/ticle/open.tsx
new file mode 100644
index 00000000..1e3ecaf4
--- /dev/null
+++ b/apps/web/src/routes/ticle/open.tsx
@@ -0,0 +1,9 @@
+import { createFileRoute } from '@tanstack/react-router';
+
+export const Route = createFileRoute('/ticle/open')({
+ component: RouteComponent,
+});
+
+function RouteComponent() {
+ return '티클 개설하기';
+}
diff --git a/apps/web/tailwind.config.ts b/apps/web/tailwind.config.ts
index f7d4110a..aa284dc9 100644
--- a/apps/web/tailwind.config.ts
+++ b/apps/web/tailwind.config.ts
@@ -3,7 +3,7 @@ import type { Config } from 'tailwindcss';
const config: Config = {
content: [
- './src/pages/**/*.{js,ts,jsx,tsx}',
+ './src/routes/**/*.{js,ts,jsx,tsx}',
'./src/components/**/*.{js,ts,jsx,tsx}',
'./src/*.tsx',
],
diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts
index edda3dee..6f1052d1 100644
--- a/apps/web/vite.config.ts
+++ b/apps/web/vite.config.ts
@@ -1,8 +1,9 @@
+import { TanStackRouterVite } from '@tanstack/router-vite-plugin';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
// https://vite.dev/config/
export default defineConfig({
- plugins: [react(), tsconfigPaths()],
+ plugins: [react(), tsconfigPaths(), TanStackRouterVite({ routeToken: '_layout' })],
});