Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .agent/rules/project-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
trigger: always_on
---

## Architecture & Priorities

- This is a PoC: prioritize developer speed and clarity over abstraction.
- Treat all backends as APIs; do not couple services together.
- The AI service is stateless and must not call application APIs directly.
- always use pnpm and pnpx for package management


## Monorepo Structure

- This is a TurboRepo monorepo with pnpm workspaces
- Apps live in `apps/` (currently only tanstack-start)
- Shared packages live in `packages/`
- External services live in `services/`
- Use `turbo.json` for task definitions and caching

## Environment & Configuration

- Use Zod for environment validation in TypeScript packages
- Follow the pattern in `packages/auth/env.ts` for type-safe env vars
- Never commit sensitive values; use `example.env` as a template
- Prefix AI service env vars with `AI_` to avoid conflicts

## Authentication

- Use [WorkOS](https://workos.com/docs/llms.txt) for authentication and organization context.
- Do not invent custom auth flows.
- User identity and org context must be passed explicitly to services.

## Frontend & UI

- All reusable UI components must live in the `packages/ui` package. use them
- Use Tailwind CSS for styling.
- Prefer shadcn/ui components where applicable.
- Do not create ad-hoc UI components in app folders.

## Forms & State
- Here are the Tanstack [docs](https://tanstack.com/llms.txt)
- Use `@tanstack/react-form` for all forms.
- Use `@tanstack/react-query` for data fetching, caching, and mutations.
- Use `@tanstack/react-router` for routing.

## APIs & Data Fetching

- Use tRPC for type-safe application API calls (user data, metrics, app state).
- Use @hey-api/openapi-ts to generate a typed client for the FastAPI AI service.
- Do not mix tRPC and OpenAPI clients.
- Do not have the AI service call the application API.

## Database & Validation

- Use Drizzle ORM for database access.
- Use Zod for validation.
- Use `drizzle-zod` for deriving Zod schemas from Drizzle models.
- Do not duplicate schema definitions manually.
- Place non-database Zod schemas in the `packages/validators` package.

## AI Service Integration

- The AI service receives all required inputs (user context, metrics, documents).
- The AI service must not fetch user or metrics data on its own.
- Inputs should be explicit, minimal, and versionable.
- AI service shouldn't have a seperate auth flow it should instead use the AI_SERVICE_KEY env var to authenticate requests from the main app which will have that variable sent using a secure header.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Typo: "seperate" should be "separate".

📝 Proposed fix
-- AI service shouldn't have a seperate auth flow it should instead use the AI_SERVICE_KEY env var to authenticate requests from the main app which will have that variable sent using a secure header.
+- AI service shouldn't have a separate auth flow; it should instead use the AI_SERVICE_KEY env var to authenticate requests from the main app which will have that variable sent using a secure header.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- AI service shouldn't have a seperate auth flow it should instead use the AI_SERVICE_KEY env var to authenticate requests from the main app which will have that variable sent using a secure header.
- AI service shouldn't have a separate auth flow; it should instead use the AI_SERVICE_KEY env var to authenticate requests from the main app which will have that variable sent using a secure header.
🤖 Prompt for AI Agents
In @.agent/rules/project-rules.md at line 67, Fix the typo in the rule sentence:
replace the misspelled word "seperate" with "separate" in the line that
currently reads 'AI service shouldn't have a seperate auth flow...' so it
becomes 'AI service shouldn't have a separate auth flow...'; update the
.agent/rules/project-rules.md entry containing that sentence.

5 changes: 3 additions & 2 deletions .github/.copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- This is a PoC: prioritize developer speed and clarity over abstraction.
- Treat all backends as APIs; do not couple services together.
- The AI service is stateless and must not call application APIs directly.
- always use pnpm and pnpx for package management

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix grammar/capitalization in the guidance bullets.
Minor doc polish: capitalize “Always” and make the second sentence a proper sentence.

✍️ Proposed edit
-- always use pnpm and pnpx for package management
+- Always use pnpm and pnpx for package management.

-- All reusable UI components must live in the `packages/ui` package. use them
+- All reusable UI components must live in the `packages/ui` package. Use them.

Also applies to: 31-31

🤖 Prompt for AI Agents
In @.github/.copilot-instructions.md at line 6, Update the bullet text "always
use pnpm and pnpx for package management" to correct grammar/capitalization by
capitalizing the first word and ending with a period: replace it with "Always
use pnpm and pnpx for package management." Apply the same capitalization and
punctuation fix to the duplicate occurrence mentioned (line 31).


## Monorepo Structure

Expand All @@ -27,7 +28,7 @@

## Frontend & UI

- All reusable UI components must live in the `packages/ui` package.
- All reusable UI components must live in the `packages/ui` package. use them
- Use Tailwind CSS for styling.
- Prefer shadcn/ui components where applicable.
- Do not create ad-hoc UI components in app folders.
Expand All @@ -41,7 +42,7 @@
## APIs & Data Fetching

- Use tRPC for type-safe application API calls (user data, metrics, app state).
- Use OpenAPI Generator to generate a typed client for the FastAPI AI service.
- Use @hey-api/openapi-ts to generate a typed client for the FastAPI AI service.
- Do not mix tRPC and OpenAPI clients.
- Do not have the AI service call the application API.

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ dist/
# tanstack
.tanstack

# generated SDK
packages/ai/src/

# ========= python =========
# Python-generated files
__pycache__/
Expand Down
2 changes: 1 addition & 1 deletion apps/tanstack-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@trpc/client": "catalog:",
"@trpc/server": "catalog:",
"@trpc/tanstack-react-query": "catalog:",
"better-auth": "catalog:",
"@workos/authkit-tanstack-react-start": "^0.5.0",
"nitro": "3.0.1-alpha.1",
"react": "catalog:react19",
"react-dom": "catalog:react19",
Expand Down
3 changes: 0 additions & 3 deletions apps/tanstack-start/src/auth/client.ts

This file was deleted.

16 changes: 0 additions & 16 deletions apps/tanstack-start/src/auth/server.ts

This file was deleted.

26 changes: 26 additions & 0 deletions apps/tanstack-start/src/component/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Link, useLocation } from "@tanstack/react-router";

export function NotFound() {
const location = useLocation();
console.log("NotFound triggered for path:", location.pathname);

Comment on lines +1 to +6

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove or gate the render-time console.log.

Logging on every 404 render can spam production logs and expose path data. Consider gating to dev or removing.

🛠️ Suggested fix (gate to dev)
 export function NotFound() {
-    const location = useLocation();
-    console.log("NotFound triggered for path:", location.pathname);
+    const location = useLocation();
+    if (import.meta.env.DEV) {
+        console.log("NotFound triggered for path:", location.pathname);
+    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { Link, useLocation } from "@tanstack/react-router";
export function NotFound() {
const location = useLocation();
console.log("NotFound triggered for path:", location.pathname);
import { Link, useLocation } from "@tanstack/react-router";
export function NotFound() {
const location = useLocation();
if (import.meta.env.DEV) {
console.log("NotFound triggered for path:", location.pathname);
}
🤖 Prompt for AI Agents
In `@apps/tanstack-start/src/component/NotFound.tsx` around lines 1 - 6, The
NotFound component currently calls console.log("NotFound triggered for path:",
location.pathname) on every render; remove that call or gate it to only run in
development (e.g., wrap it with a check like NODE_ENV === 'development' or an
isDev flag) so location.pathname is not logged in production; update the
NotFound function (which uses useLocation and the location variable) to either
delete the console.log line or conditionally execute it only when in dev.

return (
<div className="flex flex-col items-center justify-center min-h-screen bg-background text-foreground p-4">
<h1 className="text-9xl font-extrabold tracking-widest text-primary">404</h1>
<div className="bg-primary px-2 text-sm rounded rotate-12 absolute text-primary-foreground">
Page Not Found
</div>
<div className="mt-8 text-center">
<div className="text-xl font-medium mb-4">
Oops! The page you asked for doesn't exist.
</div>
<Link
to="/"
className="px-6 py-3 rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors duration-200"
>
Go Home
</Link>
</div>
</div>
);
}
42 changes: 20 additions & 22 deletions apps/tanstack-start/src/component/auth-showcase.tsx
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
import { useNavigate } from "@tanstack/react-router";
import { useAuth } from "@workos/authkit-tanstack-react-start/client";
import { getSignInUrl } from "@workos/authkit-tanstack-react-start";
import { createServerFn } from "@tanstack/react-start";

import { Button } from "@governance/ui/button";

import { authClient } from "~/auth/client";
const getSignInUrlFn = createServerFn({ method: "GET" }).handler(async () => {
return await getSignInUrl();
});

export function AuthShowcase() {
const { data: session } = authClient.useSession();
const navigate = useNavigate();
const { user, loading, signOut } = useAuth();

if (!session) {
if (loading) {
return <div className="text-muted-foreground">Loading...</div>;
}

if (!user) {
return (
<Button
size="lg"
onClick={async () => {
const res = await authClient.signIn.social({
provider: "discord",
callbackURL: "/",
});
if (!res.data?.url) {
throw new Error("No URL returned from signInSocial");
}
await navigate({ href: res.data.url, replace: true });
const signInUrl = await getSignInUrlFn();
window.location.href = signInUrl;
}}
>
Sign in with Discord
Sign in with WorkOS
</Button>
);
}

return (
<div className="flex flex-col items-center justify-center gap-4">
<p className="text-center text-2xl">
<span>Logged in as {session.user.name}</span>
<span>
Logged in as {user.firstName} {user.lastName}
</span>
</p>
<p className="text-muted-foreground">{user.email}</p>

<Button
size="lg"
onClick={async () => {
await authClient.signOut();
await navigate({ href: "/", replace: true });
}}
>
<Button size="lg" onClick={() => signOut()}>
Comment on lines +1 to +41

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "auth-showcase.tsx" | head -20

Repository: AFAskar/Governance-Agent

Length of output: 121


🏁 Script executed:

git ls-files | grep -E "(auth-showcase|authkit)" | head -30

Repository: AFAskar/Governance-Agent

Length of output: 119


🏁 Script executed:

fd "auth-showcase" --type f

Repository: AFAskar/Governance-Agent

Length of output: 119


🏁 Script executed:

cat -n ./apps/tanstack-start/src/component/auth-showcase.tsx

Repository: AFAskar/Governance-Agent

Length of output: 1569


🏁 Script executed:

rg "@workos/authkit-tanstack-react-start" -t tsx -t ts --context 3 | head -80

Repository: AFAskar/Governance-Agent

Length of output: 95


🏁 Script executed:

rg "getSignInUrl|signOut" -t tsx -t ts -A 2 -B 2 | head -100

Repository: AFAskar/Governance-Agent

Length of output: 95


🏁 Script executed:

find . -type f -name "package.json" -path "*/tanstack-start/*" -o -name "package.json" -path "*/root" | head -5

Repository: AFAskar/Governance-Agent

Length of output: 102


🏁 Script executed:

cat ./apps/tanstack-start/package.json

Repository: AFAskar/Governance-Agent

Length of output: 2028


🏁 Script executed:

rg "getSignInUrl|signOut" --type-list | grep -i tsx

Repository: AFAskar/Governance-Agent

Length of output: 457


🏁 Script executed:

rg "getSignInUrl|signOut" -A 3 -B 2 | head -150

Repository: AFAskar/Governance-Agent

Length of output: 2627


🏁 Script executed:

rg "useAuth" --max-count 20 -B 3 -A 5

Repository: AFAskar/Governance-Agent

Length of output: 1273


🏁 Script executed:

rg "try.*catch" apps/tanstack-start/src -B 2 -A 4 | head -80

Repository: AFAskar/Governance-Agent

Length of output: 50


🏁 Script executed:

rg "getSignInUrlFn" -B 2 -A 5

Repository: AFAskar/Governance-Agent

Length of output: 1355


🏁 Script executed:

rg "onClick.*async" apps/tanstack-start/src -B 2 -A 8 | head -100

Repository: AFAskar/Governance-Agent

Length of output: 872


🏁 Script executed:

rg "\.catch\|try\s*{" apps/tanstack-start/src -B 3 -A 4

Repository: AFAskar/Governance-Agent

Length of output: 163


🏁 Script executed:

find apps/tanstack-start/src -type f -name "*.ts" -o -name "*.tsx" | head -20

Repository: AFAskar/Governance-Agent

Length of output: 558


🏁 Script executed:

rg "\.catch|catch\s*\(" apps/tanstack-start/src -B 2 -A 3

Repository: AFAskar/Governance-Agent

Length of output: 50


🏁 Script executed:

cat apps/tanstack-start/src/routes/index.tsx

Repository: AFAskar/Governance-Agent

Length of output: 6966


🏁 Script executed:

rg "useState" apps/tanstack-start/src --max-count 10 -B 2 -A 2

Repository: AFAskar/Governance-Agent

Length of output: 50


🏁 Script executed:

grep -r "use client" apps/tanstack-start/src/component --include="*.tsx"

Repository: AFAskar/Governance-Agent

Length of output: 50


🏁 Script executed:

rg "onError|try|catch" packages/auth/src --max-count 20 -B 2 -A 3

Repository: AFAskar/Governance-Agent

Length of output: 50


🏁 Script executed:

cat apps/tanstack-start/src/component/auth-showcase.tsx | head -50

Repository: AFAskar/Governance-Agent

Length of output: 1247


🏁 Script executed:

web_search
What does `@workos/authkit-tanstack-react-start` getSignInUrl() and signOut() return and can they throw errors?

Repository: AFAskar/Governance-Agent

Length of output: 313


🌐 Web query:

@workos/authkit-tanstack-react-start getSignInUrl signOut error handling

💡 Result:

Where errors can happen (and how to handle them)

1) getSignInUrl() (server-side only)

getSignInUrl() is meant to be called in route loaders / server functions / server handlers (not in beforeLoad or directly in client components). The canonical pattern is to generate the URL and throw a TanStack redirect. (github.com)

Error handling pattern (loader):

import { createFileRoute, redirect } from '@tanstack/react-router'
import { getSignInUrl } from '@workos/authkit-tanstack-react-start'

export const Route = createFileRoute('/signin')({
  loader: async () => {
    try {
      const url = await getSignInUrl({ data: { returnPathname: '/dashboard' } })
      throw redirect({ href: url })
    } catch (err) {
      // log + send user somewhere safe
      console.error('getSignInUrl failed', err)
      throw redirect({ href: '/auth-error' })
    }
  },
})

(Options like returnPathname are supported.) (github.com)

2) signOut() (server-side)

Server-side signOut() ends the session and redirects to WorkOS logout (optionally with a returnTo). (github.com)

Error handling pattern (loader):

import { createFileRoute, redirect } from '@tanstack/react-router'
import { signOut } from '@workos/authkit-tanstack-react-start'

export const Route = createFileRoute('/logout')({
  loader: async () => {
    try {
      await signOut({ data: { returnTo: '/goodbye' } })
    } catch (err) {
      console.error('signOut failed', err)
      throw redirect({ href: '/auth-error' })
    }
  },
})

Note: if your WorkOS Dashboard has neither a Sign-out redirect nor an App homepage URL configured, WorkOS will redirect users to an error page on logout. (github.com)

3) signOut() (client-side via useAuth())

Client-side sign-out is available via the useAuth() hook and returns a promise, so handle it with try/catch (or .catch). (github.com)

import { useAuth } from '@workos/authkit-tanstack-react-start/client'

function SignOutButton() {
  const { signOut } = useAuth()

  return (
    <button
      onClick={async () => {
        try {
          await signOut({ returnTo: '/goodbye' })
        } catch (err) {
          console.error('Client signOut failed', err)
          window.location.href = '/auth-error'
        }
      }}
    >
      Sign out
    </button>
  )
}

4) OAuth callback failures (best place for “auth flow” error handling)

If you want centralized handling for login/callback errors, use handleCallbackRoute({ onError }) to return your own Response (JSON, redirect, etc.). (github.com)

import { handleCallbackRoute } from '@workos/authkit-tanstack-react-start'

GET: handleCallbackRoute({
  onError: ({ error }) => {
    console.error('Auth callback failed:', error)
    return new Response('Authentication failed', { status: 500 })
  },
})

Citations:


Add error handling for signOut() and getSignInUrl() to improve UX.

The signOut() hook method returns a promise that is not being awaited or caught (line 41). Similarly, getSignInUrlFn() can fail without user feedback (line 23). Per the library's documented patterns, both operations should include try/catch with user-visible error messaging.

Suggested fix
 import { useAuth } from "@workos/authkit-tanstack-react-start/client";
 import { getSignInUrl } from "@workos/authkit-tanstack-react-start";
 import { createServerFn } from "@tanstack/react-start";
+import { useState } from "react";

 import { Button } from "@governance/ui/button";

 const getSignInUrlFn = createServerFn({ method: "GET" }).handler(async () => {
   return await getSignInUrl();
 });

 export function AuthShowcase() {
   const { user, loading, signOut } = useAuth();
+  const [error, setError] = useState<string | null>(null);

   if (loading) {
     return <div className="text-muted-foreground">Loading...</div>;
   }

   if (!user) {
     return (
-      <Button
-        size="lg"
-        onClick={async () => {
-          const signInUrl = await getSignInUrlFn();
-          window.location.href = signInUrl;
-        }}
-      >
-        Sign in with WorkOS
-      </Button>
+      <div className="flex flex-col items-center gap-2">
+        {error && <p className="text-destructive">{error}</p>}
+        <Button
+          size="lg"
+          onClick={async () => {
+            try {
+              setError(null);
+              const signInUrl = await getSignInUrlFn();
+              window.location.href = signInUrl;
+            } catch (err) {
+              console.error(err);
+              setError("Unable to start sign-in. Please try again.");
+            }
+          }}
+        >
+          Sign in with WorkOS
+        </Button>
+      </div>
     );
   }

   return (
     <div className="flex flex-col items-center justify-center gap-4">
+      {error && <p className="text-destructive">{error}</p>}
       <p className="text-center text-2xl">
         <span>
           Logged in as {user.firstName} {user.lastName}
         </span>
       </p>
       <p className="text-muted-foreground">{user.email}</p>

-      <Button size="lg" onClick={() => signOut()}>
+      <Button
+        size="lg"
+        onClick={async () => {
+          try {
+            setError(null);
+            await signOut();
+          } catch (err) {
+            console.error(err);
+            setError("Unable to sign out. Please try again.");
+          }
+        }}
+      >
         Sign out
       </Button>
     </div>
   );
 }
🤖 Prompt for AI Agents
In `@apps/tanstack-start/src/component/auth-showcase.tsx` around lines 1 - 41, The
component AuthShowcase must await and catch errors from getSignInUrlFn() and
signOut(): wrap the getSignInUrlFn() call inside an async try/catch in the Sign
in button onClick, and handle failures by logging and showing a user-visible
error (e.g., set an error state or display alert/toast); likewise change the
signOut() invocation to an async function that awaits signOut() inside try/catch
and surfaces errors to the user. Update the handlers in AuthShowcase to use
await, try/catch, and a simple UI feedback mechanism (error state or toast) so
both getSignInUrlFn and signOut errors are handled and reported.

Sign out
</Button>
</div>
Expand Down
7 changes: 3 additions & 4 deletions apps/tanstack-start/src/env.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { authEnv } from "@governance/auth/env";
import { createEnv } from "@t3-oss/env-core";
import { vercel } from "@t3-oss/env-core/presets-zod";
import { z } from "zod/v4";

import { authEnv } from "@governance/auth/env";

export const env = createEnv({
clientPrefix: "VITE_",
extends: [authEnv(), vercel()],
Expand All @@ -22,10 +21,10 @@ export const env = createEnv({

/**
* Specify your client-side environment variables schema here.
* For them to be exposed to the client, prefix them with `NEXT_PUBLIC_`.
* For them to be exposed to the client, prefix them with `VITE_`.
*/
client: {
// NEXT_PUBLIC_CLIENTVAR: z.string(),
// VITE_CLIENTVAR: z.string(),
},
/**
* Destructure all variables from `process.env` to make sure they aren't tree-shaken away.
Expand Down
5 changes: 3 additions & 2 deletions apps/tanstack-start/src/lib/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
} from "@trpc/client";
import { createTRPCContext } from "@trpc/tanstack-react-query";
import SuperJSON from "superjson";
import { getAuth } from "@workos/authkit-tanstack-react-start";

import * as Api from "@governance/api";

import { auth } from "~/auth/server";
import { env } from "~/env";
import { getBaseUrl } from "~/lib/url";

Expand All @@ -22,9 +22,10 @@ export const makeTRPCClient = createIsomorphicFn()
unstable_localLink({
router: Api.appRouter,
transformer: SuperJSON,
createContext: () => {
createContext: async () => {
const headers = new Headers(getRequestHeaders());
headers.set("x-trpc-source", "tanstack-start-server");
const auth = await getAuth();
return Api.createTRPCContext({ auth, headers });
},
}),
Expand Down
37 changes: 19 additions & 18 deletions apps/tanstack-start/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import { Route as rootRouteImport } from './routes/__root'
import { Route as IndexRouteImport } from './routes/index'
import { Route as ApiTrpcSplatRouteImport } from './routes/api/trpc.$'
import { Route as ApiAuthSplatRouteImport } from './routes/api/auth.$'
import { Route as ApiAuthCallbackRouteImport } from './routes/api/auth/callback'

const IndexRoute = IndexRouteImport.update({
id: '/',
Expand All @@ -23,39 +23,39 @@ const ApiTrpcSplatRoute = ApiTrpcSplatRouteImport.update({
path: '/api/trpc/$',
getParentRoute: () => rootRouteImport,
} as any)
const ApiAuthSplatRoute = ApiAuthSplatRouteImport.update({
id: '/api/auth/$',
path: '/api/auth/$',
const ApiAuthCallbackRoute = ApiAuthCallbackRouteImport.update({
id: '/api/auth/callback',
path: '/api/auth/callback',
getParentRoute: () => rootRouteImport,
} as any)

export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/api/auth/$': typeof ApiAuthSplatRoute
'/api/auth/callback': typeof ApiAuthCallbackRoute
'/api/trpc/$': typeof ApiTrpcSplatRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/api/auth/$': typeof ApiAuthSplatRoute
'/api/auth/callback': typeof ApiAuthCallbackRoute
'/api/trpc/$': typeof ApiTrpcSplatRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/api/auth/$': typeof ApiAuthSplatRoute
'/api/auth/callback': typeof ApiAuthCallbackRoute
'/api/trpc/$': typeof ApiTrpcSplatRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '/api/auth/$' | '/api/trpc/$'
fullPaths: '/' | '/api/auth/callback' | '/api/trpc/$'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/api/auth/$' | '/api/trpc/$'
id: '__root__' | '/' | '/api/auth/$' | '/api/trpc/$'
to: '/' | '/api/auth/callback' | '/api/trpc/$'
id: '__root__' | '/' | '/api/auth/callback' | '/api/trpc/$'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
ApiAuthSplatRoute: typeof ApiAuthSplatRoute
ApiAuthCallbackRoute: typeof ApiAuthCallbackRoute
ApiTrpcSplatRoute: typeof ApiTrpcSplatRoute
}

Expand All @@ -75,30 +75,31 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ApiTrpcSplatRouteImport
parentRoute: typeof rootRouteImport
}
'/api/auth/$': {
id: '/api/auth/$'
path: '/api/auth/$'
fullPath: '/api/auth/$'
preLoaderRoute: typeof ApiAuthSplatRouteImport
'/api/auth/callback': {
id: '/api/auth/callback'
path: '/api/auth/callback'
fullPath: '/api/auth/callback'
preLoaderRoute: typeof ApiAuthCallbackRouteImport
parentRoute: typeof rootRouteImport
}
}
}

const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
ApiAuthSplatRoute: ApiAuthSplatRoute,
ApiAuthCallbackRoute: ApiAuthCallbackRoute,
ApiTrpcSplatRoute: ApiTrpcSplatRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>()

import type { getRouter } from './router.tsx'
import type { createStart } from '@tanstack/react-start'
import type { startInstance } from './start.ts'
declare module '@tanstack/react-start' {
interface Register {
ssr: true
router: Awaited<ReturnType<typeof getRouter>>
config: Awaited<ReturnType<typeof startInstance.getOptions>>
}
}
Loading
Loading