diff --git a/app.config.ts b/app.config.ts deleted file mode 100644 index f8ceaac..0000000 --- a/app.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { defineConfig } from "@tanstack/react-start/config"; -import tsConfigPaths from "vite-tsconfig-paths"; - -export default defineConfig({ - vite: { - plugins: [tsConfigPaths({ projects: ["./tsconfig.json"] })], - ssr: { noExternal: ["react-dropzone"] }, - }, -}); diff --git a/app/api.ts b/app/api.ts deleted file mode 100644 index 89daf18..0000000 --- a/app/api.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { - createStartAPIHandler, - defaultAPIFileRouteHandler, -} from "@tanstack/react-start/api"; - -export default createStartAPIHandler(defaultAPIFileRouteHandler); diff --git a/app/routeTree.gen.ts b/app/routeTree.gen.ts deleted file mode 100644 index 3f0c67a..0000000 --- a/app/routeTree.gen.ts +++ /dev/null @@ -1,611 +0,0 @@ -/* eslint-disable */ - -// @ts-nocheck - -// noinspection JSUnusedGlobalSymbols - -// This file was automatically generated by TanStack Router. -// You should NOT make any changes in this file as it will be overwritten. -// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. - -import { createFileRoute } from '@tanstack/react-router' - -// Import Routes - -import { Route as rootRoute } from './routes/__root' -import { Route as UnauthorizedImport } from './routes/unauthorized' -import { Route as UnauthenticatedImport } from './routes/unauthenticated' -import { Route as TermsOfServiceImport } from './routes/terms-of-service' -import { Route as SuccessImport } from './routes/success' -import { Route as PurchaseImport } from './routes/purchase' -import { Route as PrivacyPolicyImport } from './routes/privacy-policy' -import { Route as LoginImport } from './routes/login' -import { Route as CreateTestimonialImport } from './routes/create-testimonial' -import { Route as CancelImport } from './routes/cancel' -import { Route as AboutImport } from './routes/about' -import { Route as IndexImport } from './routes/index' -import { Route as LearnIndexImport } from './routes/learn/index' -import { Route as LearnNotFoundImport } from './routes/learn/not-found' -import { Route as LearnNoSegmentsImport } from './routes/learn/no-segments' -import { Route as LearnCourseCompletedImport } from './routes/learn/course-completed' -import { Route as LearnAddImport } from './routes/learn/add' -import { Route as LearnSlugEditImport } from './routes/learn/$slug/edit' -import { Route as LearnSlugLayoutImport } from './routes/learn/$slug/_layout' -import { Route as LearnSlugLayoutIndexImport } from './routes/learn/$slug/_layout.index' - -// Create Virtual Routes - -const LearnSlugImport = createFileRoute('/learn/$slug')() - -// Create/Update Routes - -const UnauthorizedRoute = UnauthorizedImport.update({ - id: '/unauthorized', - path: '/unauthorized', - getParentRoute: () => rootRoute, -} as any) - -const UnauthenticatedRoute = UnauthenticatedImport.update({ - id: '/unauthenticated', - path: '/unauthenticated', - getParentRoute: () => rootRoute, -} as any) - -const TermsOfServiceRoute = TermsOfServiceImport.update({ - id: '/terms-of-service', - path: '/terms-of-service', - getParentRoute: () => rootRoute, -} as any) - -const SuccessRoute = SuccessImport.update({ - id: '/success', - path: '/success', - getParentRoute: () => rootRoute, -} as any) - -const PurchaseRoute = PurchaseImport.update({ - id: '/purchase', - path: '/purchase', - getParentRoute: () => rootRoute, -} as any) - -const PrivacyPolicyRoute = PrivacyPolicyImport.update({ - id: '/privacy-policy', - path: '/privacy-policy', - getParentRoute: () => rootRoute, -} as any) - -const LoginRoute = LoginImport.update({ - id: '/login', - path: '/login', - getParentRoute: () => rootRoute, -} as any) - -const CreateTestimonialRoute = CreateTestimonialImport.update({ - id: '/create-testimonial', - path: '/create-testimonial', - getParentRoute: () => rootRoute, -} as any) - -const CancelRoute = CancelImport.update({ - id: '/cancel', - path: '/cancel', - getParentRoute: () => rootRoute, -} as any) - -const AboutRoute = AboutImport.update({ - id: '/about', - path: '/about', - getParentRoute: () => rootRoute, -} as any) - -const IndexRoute = IndexImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRoute, -} as any) - -const LearnSlugRoute = LearnSlugImport.update({ - id: '/learn/$slug', - path: '/learn/$slug', - getParentRoute: () => rootRoute, -} as any) - -const LearnIndexRoute = LearnIndexImport.update({ - id: '/learn/', - path: '/learn/', - getParentRoute: () => rootRoute, -} as any) - -const LearnNotFoundRoute = LearnNotFoundImport.update({ - id: '/learn/not-found', - path: '/learn/not-found', - getParentRoute: () => rootRoute, -} as any) - -const LearnNoSegmentsRoute = LearnNoSegmentsImport.update({ - id: '/learn/no-segments', - path: '/learn/no-segments', - getParentRoute: () => rootRoute, -} as any) - -const LearnCourseCompletedRoute = LearnCourseCompletedImport.update({ - id: '/learn/course-completed', - path: '/learn/course-completed', - getParentRoute: () => rootRoute, -} as any) - -const LearnAddRoute = LearnAddImport.update({ - id: '/learn/add', - path: '/learn/add', - getParentRoute: () => rootRoute, -} as any) - -const LearnSlugEditRoute = LearnSlugEditImport.update({ - id: '/edit', - path: '/edit', - getParentRoute: () => LearnSlugRoute, -} as any) - -const LearnSlugLayoutRoute = LearnSlugLayoutImport.update({ - id: '/_layout', - getParentRoute: () => LearnSlugRoute, -} as any) - -const LearnSlugLayoutIndexRoute = LearnSlugLayoutIndexImport.update({ - id: '/', - path: '/', - getParentRoute: () => LearnSlugLayoutRoute, -} as any) - -// Populate the FileRoutesByPath interface - -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexImport - parentRoute: typeof rootRoute - } - '/about': { - id: '/about' - path: '/about' - fullPath: '/about' - preLoaderRoute: typeof AboutImport - parentRoute: typeof rootRoute - } - '/cancel': { - id: '/cancel' - path: '/cancel' - fullPath: '/cancel' - preLoaderRoute: typeof CancelImport - parentRoute: typeof rootRoute - } - '/create-testimonial': { - id: '/create-testimonial' - path: '/create-testimonial' - fullPath: '/create-testimonial' - preLoaderRoute: typeof CreateTestimonialImport - parentRoute: typeof rootRoute - } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginImport - parentRoute: typeof rootRoute - } - '/privacy-policy': { - id: '/privacy-policy' - path: '/privacy-policy' - fullPath: '/privacy-policy' - preLoaderRoute: typeof PrivacyPolicyImport - parentRoute: typeof rootRoute - } - '/purchase': { - id: '/purchase' - path: '/purchase' - fullPath: '/purchase' - preLoaderRoute: typeof PurchaseImport - parentRoute: typeof rootRoute - } - '/success': { - id: '/success' - path: '/success' - fullPath: '/success' - preLoaderRoute: typeof SuccessImport - parentRoute: typeof rootRoute - } - '/terms-of-service': { - id: '/terms-of-service' - path: '/terms-of-service' - fullPath: '/terms-of-service' - preLoaderRoute: typeof TermsOfServiceImport - parentRoute: typeof rootRoute - } - '/unauthenticated': { - id: '/unauthenticated' - path: '/unauthenticated' - fullPath: '/unauthenticated' - preLoaderRoute: typeof UnauthenticatedImport - parentRoute: typeof rootRoute - } - '/unauthorized': { - id: '/unauthorized' - path: '/unauthorized' - fullPath: '/unauthorized' - preLoaderRoute: typeof UnauthorizedImport - parentRoute: typeof rootRoute - } - '/learn/add': { - id: '/learn/add' - path: '/learn/add' - fullPath: '/learn/add' - preLoaderRoute: typeof LearnAddImport - parentRoute: typeof rootRoute - } - '/learn/course-completed': { - id: '/learn/course-completed' - path: '/learn/course-completed' - fullPath: '/learn/course-completed' - preLoaderRoute: typeof LearnCourseCompletedImport - parentRoute: typeof rootRoute - } - '/learn/no-segments': { - id: '/learn/no-segments' - path: '/learn/no-segments' - fullPath: '/learn/no-segments' - preLoaderRoute: typeof LearnNoSegmentsImport - parentRoute: typeof rootRoute - } - '/learn/not-found': { - id: '/learn/not-found' - path: '/learn/not-found' - fullPath: '/learn/not-found' - preLoaderRoute: typeof LearnNotFoundImport - parentRoute: typeof rootRoute - } - '/learn/': { - id: '/learn/' - path: '/learn' - fullPath: '/learn' - preLoaderRoute: typeof LearnIndexImport - parentRoute: typeof rootRoute - } - '/learn/$slug': { - id: '/learn/$slug' - path: '/learn/$slug' - fullPath: '/learn/$slug' - preLoaderRoute: typeof LearnSlugImport - parentRoute: typeof rootRoute - } - '/learn/$slug/_layout': { - id: '/learn/$slug/_layout' - path: '/learn/$slug' - fullPath: '/learn/$slug' - preLoaderRoute: typeof LearnSlugLayoutImport - parentRoute: typeof LearnSlugRoute - } - '/learn/$slug/edit': { - id: '/learn/$slug/edit' - path: '/edit' - fullPath: '/learn/$slug/edit' - preLoaderRoute: typeof LearnSlugEditImport - parentRoute: typeof LearnSlugImport - } - '/learn/$slug/_layout/': { - id: '/learn/$slug/_layout/' - path: '/' - fullPath: '/learn/$slug/' - preLoaderRoute: typeof LearnSlugLayoutIndexImport - parentRoute: typeof LearnSlugLayoutImport - } - } -} - -// Create and export the route tree - -interface LearnSlugLayoutRouteChildren { - LearnSlugLayoutIndexRoute: typeof LearnSlugLayoutIndexRoute -} - -const LearnSlugLayoutRouteChildren: LearnSlugLayoutRouteChildren = { - LearnSlugLayoutIndexRoute: LearnSlugLayoutIndexRoute, -} - -const LearnSlugLayoutRouteWithChildren = LearnSlugLayoutRoute._addFileChildren( - LearnSlugLayoutRouteChildren, -) - -interface LearnSlugRouteChildren { - LearnSlugLayoutRoute: typeof LearnSlugLayoutRouteWithChildren - LearnSlugEditRoute: typeof LearnSlugEditRoute -} - -const LearnSlugRouteChildren: LearnSlugRouteChildren = { - LearnSlugLayoutRoute: LearnSlugLayoutRouteWithChildren, - LearnSlugEditRoute: LearnSlugEditRoute, -} - -const LearnSlugRouteWithChildren = LearnSlugRoute._addFileChildren( - LearnSlugRouteChildren, -) - -export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/about': typeof AboutRoute - '/cancel': typeof CancelRoute - '/create-testimonial': typeof CreateTestimonialRoute - '/login': typeof LoginRoute - '/privacy-policy': typeof PrivacyPolicyRoute - '/purchase': typeof PurchaseRoute - '/success': typeof SuccessRoute - '/terms-of-service': typeof TermsOfServiceRoute - '/unauthenticated': typeof UnauthenticatedRoute - '/unauthorized': typeof UnauthorizedRoute - '/learn/add': typeof LearnAddRoute - '/learn/course-completed': typeof LearnCourseCompletedRoute - '/learn/no-segments': typeof LearnNoSegmentsRoute - '/learn/not-found': typeof LearnNotFoundRoute - '/learn': typeof LearnIndexRoute - '/learn/$slug': typeof LearnSlugLayoutRouteWithChildren - '/learn/$slug/edit': typeof LearnSlugEditRoute - '/learn/$slug/': typeof LearnSlugLayoutIndexRoute -} - -export interface FileRoutesByTo { - '/': typeof IndexRoute - '/about': typeof AboutRoute - '/cancel': typeof CancelRoute - '/create-testimonial': typeof CreateTestimonialRoute - '/login': typeof LoginRoute - '/privacy-policy': typeof PrivacyPolicyRoute - '/purchase': typeof PurchaseRoute - '/success': typeof SuccessRoute - '/terms-of-service': typeof TermsOfServiceRoute - '/unauthenticated': typeof UnauthenticatedRoute - '/unauthorized': typeof UnauthorizedRoute - '/learn/add': typeof LearnAddRoute - '/learn/course-completed': typeof LearnCourseCompletedRoute - '/learn/no-segments': typeof LearnNoSegmentsRoute - '/learn/not-found': typeof LearnNotFoundRoute - '/learn': typeof LearnIndexRoute - '/learn/$slug': typeof LearnSlugLayoutIndexRoute - '/learn/$slug/edit': typeof LearnSlugEditRoute -} - -export interface FileRoutesById { - __root__: typeof rootRoute - '/': typeof IndexRoute - '/about': typeof AboutRoute - '/cancel': typeof CancelRoute - '/create-testimonial': typeof CreateTestimonialRoute - '/login': typeof LoginRoute - '/privacy-policy': typeof PrivacyPolicyRoute - '/purchase': typeof PurchaseRoute - '/success': typeof SuccessRoute - '/terms-of-service': typeof TermsOfServiceRoute - '/unauthenticated': typeof UnauthenticatedRoute - '/unauthorized': typeof UnauthorizedRoute - '/learn/add': typeof LearnAddRoute - '/learn/course-completed': typeof LearnCourseCompletedRoute - '/learn/no-segments': typeof LearnNoSegmentsRoute - '/learn/not-found': typeof LearnNotFoundRoute - '/learn/': typeof LearnIndexRoute - '/learn/$slug': typeof LearnSlugRouteWithChildren - '/learn/$slug/_layout': typeof LearnSlugLayoutRouteWithChildren - '/learn/$slug/edit': typeof LearnSlugEditRoute - '/learn/$slug/_layout/': typeof LearnSlugLayoutIndexRoute -} - -export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: - | '/' - | '/about' - | '/cancel' - | '/create-testimonial' - | '/login' - | '/privacy-policy' - | '/purchase' - | '/success' - | '/terms-of-service' - | '/unauthenticated' - | '/unauthorized' - | '/learn/add' - | '/learn/course-completed' - | '/learn/no-segments' - | '/learn/not-found' - | '/learn' - | '/learn/$slug' - | '/learn/$slug/edit' - | '/learn/$slug/' - fileRoutesByTo: FileRoutesByTo - to: - | '/' - | '/about' - | '/cancel' - | '/create-testimonial' - | '/login' - | '/privacy-policy' - | '/purchase' - | '/success' - | '/terms-of-service' - | '/unauthenticated' - | '/unauthorized' - | '/learn/add' - | '/learn/course-completed' - | '/learn/no-segments' - | '/learn/not-found' - | '/learn' - | '/learn/$slug' - | '/learn/$slug/edit' - id: - | '__root__' - | '/' - | '/about' - | '/cancel' - | '/create-testimonial' - | '/login' - | '/privacy-policy' - | '/purchase' - | '/success' - | '/terms-of-service' - | '/unauthenticated' - | '/unauthorized' - | '/learn/add' - | '/learn/course-completed' - | '/learn/no-segments' - | '/learn/not-found' - | '/learn/' - | '/learn/$slug' - | '/learn/$slug/_layout' - | '/learn/$slug/edit' - | '/learn/$slug/_layout/' - fileRoutesById: FileRoutesById -} - -export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - AboutRoute: typeof AboutRoute - CancelRoute: typeof CancelRoute - CreateTestimonialRoute: typeof CreateTestimonialRoute - LoginRoute: typeof LoginRoute - PrivacyPolicyRoute: typeof PrivacyPolicyRoute - PurchaseRoute: typeof PurchaseRoute - SuccessRoute: typeof SuccessRoute - TermsOfServiceRoute: typeof TermsOfServiceRoute - UnauthenticatedRoute: typeof UnauthenticatedRoute - UnauthorizedRoute: typeof UnauthorizedRoute - LearnAddRoute: typeof LearnAddRoute - LearnCourseCompletedRoute: typeof LearnCourseCompletedRoute - LearnNoSegmentsRoute: typeof LearnNoSegmentsRoute - LearnNotFoundRoute: typeof LearnNotFoundRoute - LearnIndexRoute: typeof LearnIndexRoute - LearnSlugRoute: typeof LearnSlugRouteWithChildren -} - -const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - AboutRoute: AboutRoute, - CancelRoute: CancelRoute, - CreateTestimonialRoute: CreateTestimonialRoute, - LoginRoute: LoginRoute, - PrivacyPolicyRoute: PrivacyPolicyRoute, - PurchaseRoute: PurchaseRoute, - SuccessRoute: SuccessRoute, - TermsOfServiceRoute: TermsOfServiceRoute, - UnauthenticatedRoute: UnauthenticatedRoute, - UnauthorizedRoute: UnauthorizedRoute, - LearnAddRoute: LearnAddRoute, - LearnCourseCompletedRoute: LearnCourseCompletedRoute, - LearnNoSegmentsRoute: LearnNoSegmentsRoute, - LearnNotFoundRoute: LearnNotFoundRoute, - LearnIndexRoute: LearnIndexRoute, - LearnSlugRoute: LearnSlugRouteWithChildren, -} - -export const routeTree = rootRoute - ._addFileChildren(rootRouteChildren) - ._addFileTypes() - -/* ROUTE_MANIFEST_START -{ - "routes": { - "__root__": { - "filePath": "__root.tsx", - "children": [ - "/", - "/about", - "/cancel", - "/create-testimonial", - "/login", - "/privacy-policy", - "/purchase", - "/success", - "/terms-of-service", - "/unauthenticated", - "/unauthorized", - "/learn/add", - "/learn/course-completed", - "/learn/no-segments", - "/learn/not-found", - "/learn/", - "/learn/$slug" - ] - }, - "/": { - "filePath": "index.tsx" - }, - "/about": { - "filePath": "about.tsx" - }, - "/cancel": { - "filePath": "cancel.tsx" - }, - "/create-testimonial": { - "filePath": "create-testimonial.tsx" - }, - "/login": { - "filePath": "login.tsx" - }, - "/privacy-policy": { - "filePath": "privacy-policy.tsx" - }, - "/purchase": { - "filePath": "purchase.tsx" - }, - "/success": { - "filePath": "success.tsx" - }, - "/terms-of-service": { - "filePath": "terms-of-service.tsx" - }, - "/unauthenticated": { - "filePath": "unauthenticated.tsx" - }, - "/unauthorized": { - "filePath": "unauthorized.tsx" - }, - "/learn/add": { - "filePath": "learn/add.tsx" - }, - "/learn/course-completed": { - "filePath": "learn/course-completed.tsx" - }, - "/learn/no-segments": { - "filePath": "learn/no-segments.tsx" - }, - "/learn/not-found": { - "filePath": "learn/not-found.tsx" - }, - "/learn/": { - "filePath": "learn/index.tsx" - }, - "/learn/$slug": { - "filePath": "learn/$slug", - "children": [ - "/learn/$slug/_layout", - "/learn/$slug/edit" - ] - }, - "/learn/$slug/_layout": { - "filePath": "learn/$slug/_layout.tsx", - "parent": "/learn/$slug", - "children": [ - "/learn/$slug/_layout/" - ] - }, - "/learn/$slug/edit": { - "filePath": "learn/$slug/edit.tsx", - "parent": "/learn/$slug" - }, - "/learn/$slug/_layout/": { - "filePath": "learn/$slug/_layout.index.tsx", - "parent": "/learn/$slug/_layout" - } - } -} -ROUTE_MANIFEST_END */ diff --git a/app/routes/api/stripe/webhook.ts b/app/routes/api/stripe/webhook.ts deleted file mode 100644 index 5510df0..0000000 --- a/app/routes/api/stripe/webhook.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { createAPIFileRoute } from "@tanstack/react-start/api"; -import { stripe } from "~/lib/stripe"; -import { updateUserToPremiumUseCase } from "~/use-cases/users"; -import { env } from "~/utils/env"; - -const webhookSecret = env.STRIPE_WEBHOOK_SECRET!; - -export const APIRoute = createAPIFileRoute("/api/stripe/webhook")({ - POST: async ({ request }) => { - const sig = request.headers.get("stripe-signature"); - const payload = await request.text(); - - try { - const event = stripe.webhooks.constructEvent( - payload, - sig!, - webhookSecret - ); - - switch (event.type) { - case "checkout.session.completed": { - const session = event.data.object; - const userId = session.metadata?.userId; - - if (userId) { - await updateUserToPremiumUseCase(parseInt(userId)); - console.log(`Updated user ${userId} to premium status`); - } - - console.log("Payment successful:", session.id); - break; - } - } - - return new Response(JSON.stringify({ received: true }), { - headers: { "Content-Type": "application/json" }, - }); - } catch (err) { - console.error("Webhook Error:", err); - return new Response(JSON.stringify({ error: "Webhook handler failed" }), { - status: 400, - headers: { "Content-Type": "application/json" }, - }); - } - }, -}); diff --git a/app/ssr.tsx b/app/ssr.tsx deleted file mode 100644 index ee5ea60..0000000 --- a/app/ssr.tsx +++ /dev/null @@ -1,12 +0,0 @@ -/// -import { - createStartHandler, - defaultStreamHandler, -} from "@tanstack/react-start/server"; -import { getRouterManifest } from "@tanstack/react-start/router-manifest"; - -import { createRouter } from "./router"; - -export default createStartHandler({ createRouter, getRouterManifest })( - defaultStreamHandler -); diff --git a/app/styles/app.css b/app/styles/app.css deleted file mode 100644 index cf0a61e..0000000 --- a/app/styles/app.css +++ /dev/null @@ -1,66 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap'); - -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 222.2 47.4% 11.2%; - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - --popover: 0 0% 100%; - --popover-foreground: 222.2 47.4% 11.2%; - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; - --card: 0 0% 100%; - --card-foreground: 222.2 47.4% 11.2%; - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - --destructive: 0 100% 50%; - --destructive-foreground: 210 40% 98%; - --ring: 215 20.2% 65.1%; - --radius: 0.5rem; - } - - .dark { - --background: 224 71% 4%; - --foreground: 213 31% 91%; - --muted: 223 47% 11%; - --muted-foreground: 215.4 16.3% 56.9%; - --accent: 216 34% 17%; - --accent-foreground: 210 40% 98%; - --popover: 224 71% 4%; - --popover-foreground: 215 20.2% 65.1%; - --border: 216 34% 17%; - --input: 216 34% 17%; - --card: 224 71% 4%; - --card-foreground: 213 31% 91%; - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 1.2%; - --secondary: 222.2 47.4% 11.2%; - --secondary-foreground: 210 40% 98%; - --destructive: 0 63% 31%; - --destructive-foreground: 210 40% 98%; - --ring: 216 34% 17%; - } -} - -@layer base { - * { - @apply border-border; - } - - body { - @apply font-sans antialiased bg-background text-foreground; - } - - html { - font-family: 'Inter', sans-serif; - } -} diff --git a/components.json b/components.json index 61fcdd9..f0a4146 100644 --- a/components.json +++ b/components.json @@ -4,8 +4,8 @@ "rsc": false, "tsx": true, "tailwind": { - "config": "tailwind.config.js", - "css": "src/index.css", + "config": "", + "css": "src/styles/app.css", "baseColor": "zinc", "cssVariables": true, "prefix": "" diff --git a/drizzle.config.ts b/drizzle.config.ts index f3983d2..6d4d9af 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from "drizzle-kit"; import { env } from "~/utils/env"; export default defineConfig({ - schema: "./app/db/schema.ts", + schema: "./src/db/schema.ts", dialect: "postgresql", out: "./drizzle", dbCredentials: { diff --git a/package.json b/package.json index d3725f4..03e4830 100644 --- a/package.json +++ b/package.json @@ -4,85 +4,85 @@ "sideEffects": false, "type": "module", "scripts": { - "dev": "vinxi dev", - "build": "vinxi build", - "start": "npm run db:migrate && vinxi start", + "dev": "vite dev", + "build": "vite build", + "start": "npm run db:migrate && node .output/server/index.mjs", "db:push": "drizzle-kit push --config=drizzle.config.ts", - "db:migrate": "tsx ./app/db/migrate.ts", + "db:migrate": "tsx ./src/db/migrate.ts", "db:generate": "drizzle-kit generate --config=drizzle.config.ts", "db:studio": "drizzle-kit studio", - "db:clear": "tsx ./app/db/clear.ts", - "db:seed": "tsx ./app/db/seed.ts", + "db:clear": "tsx ./src/db/clear.ts", + "db:seed": "tsx ./src/db/seed.ts", "db:reset": "npm run db:clear && npm run db:migrate && npm run db:seed", "stripe:webhook": "stripe listen --forward-to http://localhost:3000/api/stripe/webhook" }, "dependencies": { "@hello-pangea/dnd": "^18.0.1", - "@hookform/resolvers": "^3.10.0", - "@radix-ui/react-alert-dialog": "^1.1.6", - "@radix-ui/react-checkbox": "^1.1.4", - "@radix-ui/react-dialog": "^1.1.6", - "@radix-ui/react-dropdown-menu": "^2.1.6", - "@radix-ui/react-label": "^2.1.2", - "@radix-ui/react-popover": "^1.1.6", - "@radix-ui/react-progress": "^1.1.2", - "@radix-ui/react-separator": "^1.1.2", - "@radix-ui/react-slot": "^1.1.2", - "@radix-ui/react-switch": "^1.1.3", - "@radix-ui/react-toast": "^1.2.6", - "@radix-ui/react-tooltip": "^1.1.8", - "@react-three/drei": "^10.0.5", - "@react-three/fiber": "^9.1.0", - "@stripe/stripe-js": "^6.1.0", - "@tanstack/react-query": "^5.71.0", - "@tanstack/react-query-devtools": "^5.71.0", - "@tanstack/react-router": "^1.114.29", - "@tanstack/react-router-with-query": "^1.114.29", - "@tanstack/react-start": "^1.114.30", - "@types/js-cookie": "^3.0.6", - "@types/nprogress": "^0.2.3", - "@types/three": "^0.175.0", - "arctic": "^3.6.0", + "@hookform/resolvers": "^5.1.1", + "@radix-ui/react-alert-dialog": "^1.1.14", + "@radix-ui/react-checkbox": "^1.3.2", + "@radix-ui/react-dialog": "^1.1.14", + "@radix-ui/react-dropdown-menu": "^2.1.15", + "@radix-ui/react-label": "^2.1.7", + "@radix-ui/react-popover": "^1.1.14", + "@radix-ui/react-progress": "^1.1.7", + "@radix-ui/react-separator": "^1.1.7", + "@radix-ui/react-slot": "^1.2.3", + "@radix-ui/react-switch": "^1.2.5", + "@radix-ui/react-toast": "^1.2.14", + "@radix-ui/react-tooltip": "^1.2.7", + "@react-three/drei": "^10.3.0", + "@react-three/fiber": "^9.1.4", + "@stripe/stripe-js": "^7.4.0", + "@tailwindcss/vite": "^4.1.11", + "@tanstack/react-query": "^5.81.5", + "@tanstack/react-query-devtools": "^5.81.5", + "@tanstack/react-router": "^1.122.0", + "@tanstack/react-router-with-query": "^1.122.0", + "@tanstack/react-start": "^1.122.1", + "arctic": "^3.7.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", - "drizzle-orm": "^0.41.0", - "framer-motion": "^12.6.2", + "drizzle-orm": "^0.44.2", + "entities": "^6.0.1", + "framer-motion": "^12.19.2", "js-cookie": "^3.0.5", - "lucide-react": "^0.485.0", + "lucide-react": "^0.525.0", "nprogress": "^0.2.0", - "pg": "^8.14.1", + "pg": "^8.16.3", "react": "^19.1.0", "react-confetti": "^6.4.0", "react-dom": "^19.1.0", "react-dropzone": "^14.3.8", "react-google-recaptcha": "^3.1.0", - "react-hook-form": "^7.55.0", - "react-markdown": "^9.0.3", + "react-hook-form": "^7.59.0", + "react-markdown": "^10.1.0", "react-use": "^17.6.0", "redaxios": "^0.5.1", - "sonner": "^1.7.4", - "stripe": "^17.7.0", - "tailwind-merge": "^2.6.0", - "tailwindcss-animate": "^1.0.7", - "three": "^0.174.0", + "sonner": "^2.0.5", + "stripe": "^18.2.1", + "tailwind-merge": "^3.3.1", + "three": "^0.177.0", + "tw-animate-css": "^1.3.4", "uuid": "^11.1.0", - "vinxi": "0.5.3", - "zod": "^3.24.2" + "vite": "^7.0.0", + "zod": "^3.25.67" }, "devDependencies": { "@tailwindcss/typography": "^0.5.16", - "@tanstack/react-router-devtools": "^1.114.29", - "@types/node": "^22.13.14", - "@types/pg": "^8.11.11", - "@types/react": "^19.0.12", - "@types/react-dom": "^19.0.4", + "@tanstack/react-router-devtools": "^1.122.0", + "@types/js-cookie": "^3.0.6", + "@types/node": "^24.0.7", + "@types/nprogress": "^0.2.3", + "@types/pg": "^8.15.4", + "@types/react": "^19.1.8", + "@types/react-dom": "^19.1.6", "@types/react-google-recaptcha": "^2.1.9", - "autoprefixer": "^10.4.21", - "drizzle-kit": "^0.30.6", - "postcss": "^8.5.3", - "tailwindcss": "^3.4.17", - "typescript": "^5.8.2", + "@types/three": "^0.177.0", + "drizzle-kit": "^0.31.4", + "tailwindcss": "^4.1.11", + "typescript": "^5.8.3", "vite-tsconfig-paths": "^5.1.4" } } diff --git a/postcss.config.mjs b/postcss.config.mjs deleted file mode 100644 index 2e7af2b..0000000 --- a/postcss.config.mjs +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/app/client.tsx b/src/client.tsx similarity index 56% rename from app/client.tsx rename to src/client.tsx index 6a1e1dd..b8b722f 100644 --- a/app/client.tsx +++ b/src/client.tsx @@ -1,7 +1,13 @@ -/// -import { hydrateRoot } from "react-dom/client"; import { StartClient } from "@tanstack/react-start"; +import { StrictMode } from "react"; +import { hydrateRoot } from "react-dom/client"; import { createRouter } from "./router"; const router = createRouter(); -hydrateRoot(document!, ); + +hydrateRoot( + document, + + + +); diff --git a/app/components/AppSidebar.tsx b/src/components/AppSidebar.tsx similarity index 100% rename from app/components/AppSidebar.tsx rename to src/components/AppSidebar.tsx diff --git a/app/components/DefaultCatchBoundary.tsx b/src/components/DefaultCatchBoundary.tsx similarity index 100% rename from app/components/DefaultCatchBoundary.tsx rename to src/components/DefaultCatchBoundary.tsx diff --git a/app/components/ModeToggle.tsx b/src/components/ModeToggle.tsx similarity index 100% rename from app/components/ModeToggle.tsx rename to src/components/ModeToggle.tsx diff --git a/app/components/NotFound.tsx b/src/components/NotFound.tsx similarity index 100% rename from app/components/NotFound.tsx rename to src/components/NotFound.tsx diff --git a/app/components/ThemeProvider.tsx b/src/components/ThemeProvider.tsx similarity index 94% rename from app/components/ThemeProvider.tsx rename to src/components/ThemeProvider.tsx index cc760d9..af01401 100644 --- a/app/components/ThemeProvider.tsx +++ b/src/components/ThemeProvider.tsx @@ -1,8 +1,8 @@ import { useSuspenseQuery } from "@tanstack/react-query"; import { createServerFn } from "@tanstack/react-start"; import { createContext, useContext, useEffect, useState } from "react"; -import { z } from "vinxi"; -import { getCookie, setCookie } from "vinxi/http"; +import { z } from "zod"; +import { getCookie, setCookie } from "@tanstack/react-start/server"; type Theme = "dark" | "light" | "system"; @@ -44,7 +44,7 @@ export function ThemeProvider({ children, ...props }: ThemeProviderProps) { useEffect(() => { window .matchMedia("(prefers-color-scheme: dark)") - .addEventListener("change", (event) => { + .addEventListener("change", event => { if (themeQuery.data === "system") { const newColorScheme = event.matches ? "dark" : "light"; const root = window.document.documentElement; diff --git a/app/components/course-bookmark-button.tsx b/src/components/course-bookmark-button.tsx similarity index 100% rename from app/components/course-bookmark-button.tsx rename to src/components/course-bookmark-button.tsx diff --git a/app/components/graph-visualization.tsx b/src/components/graph-visualization.tsx similarity index 100% rename from app/components/graph-visualization.tsx rename to src/components/graph-visualization.tsx diff --git a/app/components/title.tsx b/src/components/title.tsx similarity index 100% rename from app/components/title.tsx rename to src/components/title.tsx diff --git a/app/components/ui/alert-dialog.tsx b/src/components/ui/alert-dialog.tsx similarity index 100% rename from app/components/ui/alert-dialog.tsx rename to src/components/ui/alert-dialog.tsx diff --git a/app/components/ui/autocomplete.tsx b/src/components/ui/autocomplete.tsx similarity index 100% rename from app/components/ui/autocomplete.tsx rename to src/components/ui/autocomplete.tsx diff --git a/app/components/ui/badge.tsx b/src/components/ui/badge.tsx similarity index 100% rename from app/components/ui/badge.tsx rename to src/components/ui/badge.tsx diff --git a/app/components/ui/button.tsx b/src/components/ui/button.tsx similarity index 100% rename from app/components/ui/button.tsx rename to src/components/ui/button.tsx diff --git a/app/components/ui/card.tsx b/src/components/ui/card.tsx similarity index 100% rename from app/components/ui/card.tsx rename to src/components/ui/card.tsx diff --git a/app/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx similarity index 100% rename from app/components/ui/checkbox.tsx rename to src/components/ui/checkbox.tsx diff --git a/app/components/ui/combobox.tsx b/src/components/ui/combobox.tsx similarity index 100% rename from app/components/ui/combobox.tsx rename to src/components/ui/combobox.tsx diff --git a/app/components/ui/command.tsx b/src/components/ui/command.tsx similarity index 100% rename from app/components/ui/command.tsx rename to src/components/ui/command.tsx diff --git a/app/components/ui/dialog.tsx b/src/components/ui/dialog.tsx similarity index 100% rename from app/components/ui/dialog.tsx rename to src/components/ui/dialog.tsx diff --git a/app/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx similarity index 100% rename from app/components/ui/dropdown-menu.tsx rename to src/components/ui/dropdown-menu.tsx diff --git a/app/components/ui/form.tsx b/src/components/ui/form.tsx similarity index 100% rename from app/components/ui/form.tsx rename to src/components/ui/form.tsx diff --git a/app/components/ui/input.tsx b/src/components/ui/input.tsx similarity index 100% rename from app/components/ui/input.tsx rename to src/components/ui/input.tsx diff --git a/app/components/ui/label.tsx b/src/components/ui/label.tsx similarity index 100% rename from app/components/ui/label.tsx rename to src/components/ui/label.tsx diff --git a/app/components/ui/popover.tsx b/src/components/ui/popover.tsx similarity index 100% rename from app/components/ui/popover.tsx rename to src/components/ui/popover.tsx diff --git a/app/components/ui/progress.tsx b/src/components/ui/progress.tsx similarity index 100% rename from app/components/ui/progress.tsx rename to src/components/ui/progress.tsx diff --git a/app/components/ui/separator.tsx b/src/components/ui/separator.tsx similarity index 100% rename from app/components/ui/separator.tsx rename to src/components/ui/separator.tsx diff --git a/app/components/ui/sheet.tsx b/src/components/ui/sheet.tsx similarity index 100% rename from app/components/ui/sheet.tsx rename to src/components/ui/sheet.tsx diff --git a/app/components/ui/sidebar.tsx b/src/components/ui/sidebar.tsx similarity index 100% rename from app/components/ui/sidebar.tsx rename to src/components/ui/sidebar.tsx diff --git a/app/components/ui/skeleton.tsx b/src/components/ui/skeleton.tsx similarity index 100% rename from app/components/ui/skeleton.tsx rename to src/components/ui/skeleton.tsx diff --git a/app/components/ui/stat.tsx b/src/components/ui/stat.tsx similarity index 100% rename from app/components/ui/stat.tsx rename to src/components/ui/stat.tsx diff --git a/app/components/ui/switch.tsx b/src/components/ui/switch.tsx similarity index 100% rename from app/components/ui/switch.tsx rename to src/components/ui/switch.tsx diff --git a/app/components/ui/textarea.tsx b/src/components/ui/textarea.tsx similarity index 100% rename from app/components/ui/textarea.tsx rename to src/components/ui/textarea.tsx diff --git a/app/components/ui/toast.tsx b/src/components/ui/toast.tsx similarity index 100% rename from app/components/ui/toast.tsx rename to src/components/ui/toast.tsx diff --git a/app/components/ui/toaster.tsx b/src/components/ui/toaster.tsx similarity index 100% rename from app/components/ui/toaster.tsx rename to src/components/ui/toaster.tsx diff --git a/app/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx similarity index 100% rename from app/components/ui/tooltip.tsx rename to src/components/ui/tooltip.tsx diff --git a/app/data-access/accounts.ts b/src/data-access/accounts.ts similarity index 100% rename from app/data-access/accounts.ts rename to src/data-access/accounts.ts diff --git a/app/data-access/attachments.ts b/src/data-access/attachments.ts similarity index 100% rename from app/data-access/attachments.ts rename to src/data-access/attachments.ts diff --git a/app/data-access/modules.ts b/src/data-access/modules.ts similarity index 100% rename from app/data-access/modules.ts rename to src/data-access/modules.ts diff --git a/app/data-access/profiles.ts b/src/data-access/profiles.ts similarity index 100% rename from app/data-access/profiles.ts rename to src/data-access/profiles.ts diff --git a/app/data-access/progress.ts b/src/data-access/progress.ts similarity index 100% rename from app/data-access/progress.ts rename to src/data-access/progress.ts diff --git a/app/data-access/segments.ts b/src/data-access/segments.ts similarity index 100% rename from app/data-access/segments.ts rename to src/data-access/segments.ts diff --git a/app/data-access/sessions.ts b/src/data-access/sessions.ts similarity index 100% rename from app/data-access/sessions.ts rename to src/data-access/sessions.ts diff --git a/app/data-access/testimonials.ts b/src/data-access/testimonials.ts similarity index 100% rename from app/data-access/testimonials.ts rename to src/data-access/testimonials.ts diff --git a/app/data-access/users.ts b/src/data-access/users.ts similarity index 100% rename from app/data-access/users.ts rename to src/data-access/users.ts diff --git a/app/db/clear.ts b/src/db/clear.ts similarity index 100% rename from app/db/clear.ts rename to src/db/clear.ts diff --git a/app/db/index.ts b/src/db/index.ts similarity index 100% rename from app/db/index.ts rename to src/db/index.ts diff --git a/app/db/migrate.ts b/src/db/migrate.ts similarity index 100% rename from app/db/migrate.ts rename to src/db/migrate.ts diff --git a/app/db/schema.ts b/src/db/schema.ts similarity index 100% rename from app/db/schema.ts rename to src/db/schema.ts diff --git a/app/db/seed.ts b/src/db/seed.ts similarity index 100% rename from app/db/seed.ts rename to src/db/seed.ts diff --git a/app/fn/auth.ts b/src/fn/auth.ts similarity index 100% rename from app/fn/auth.ts rename to src/fn/auth.ts diff --git a/app/fn/modules.ts b/src/fn/modules.ts similarity index 100% rename from app/fn/modules.ts rename to src/fn/modules.ts diff --git a/app/fn/segments.ts b/src/fn/segments.ts similarity index 100% rename from app/fn/segments.ts rename to src/fn/segments.ts diff --git a/app/fn/storage.ts b/src/fn/storage.ts similarity index 100% rename from app/fn/storage.ts rename to src/fn/storage.ts diff --git a/app/hooks/use-auth.tsx b/src/hooks/use-auth.tsx similarity index 100% rename from app/hooks/use-auth.tsx rename to src/hooks/use-auth.tsx diff --git a/app/hooks/use-continue-slug.ts b/src/hooks/use-continue-slug.ts similarity index 100% rename from app/hooks/use-continue-slug.ts rename to src/hooks/use-continue-slug.ts diff --git a/app/hooks/use-debounce.ts b/src/hooks/use-debounce.ts similarity index 100% rename from app/hooks/use-debounce.ts rename to src/hooks/use-debounce.ts diff --git a/app/hooks/use-first-segment.ts b/src/hooks/use-first-segment.ts similarity index 100% rename from app/hooks/use-first-segment.ts rename to src/hooks/use-first-segment.ts diff --git a/app/hooks/use-mobile.tsx b/src/hooks/use-mobile.tsx similarity index 100% rename from app/hooks/use-mobile.tsx rename to src/hooks/use-mobile.tsx diff --git a/app/hooks/use-newsletter-subscription.ts b/src/hooks/use-newsletter-subscription.ts similarity index 100% rename from app/hooks/use-newsletter-subscription.ts rename to src/hooks/use-newsletter-subscription.ts diff --git a/app/hooks/use-toast.ts b/src/hooks/use-toast.ts similarity index 100% rename from app/hooks/use-toast.ts rename to src/hooks/use-toast.ts diff --git a/app/hooks/use-window-size.ts b/src/hooks/use-window-size.ts similarity index 100% rename from app/hooks/use-window-size.ts rename to src/hooks/use-window-size.ts diff --git a/app/lib/auth.ts b/src/lib/auth.ts similarity index 100% rename from app/lib/auth.ts rename to src/lib/auth.ts diff --git a/app/lib/stripe.ts b/src/lib/stripe.ts similarity index 100% rename from app/lib/stripe.ts rename to src/lib/stripe.ts diff --git a/app/lib/utils.ts b/src/lib/utils.ts similarity index 100% rename from app/lib/utils.ts rename to src/lib/utils.ts diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts new file mode 100644 index 0000000..3237e78 --- /dev/null +++ b/src/routeTree.gen.ts @@ -0,0 +1,616 @@ +/* eslint-disable */ + +// @ts-nocheck + +// noinspection JSUnusedGlobalSymbols + +// This file was automatically generated by TanStack Router. +// You should NOT make any changes in this file as it will be overwritten. +// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. + +import { createFileRoute } from '@tanstack/react-router' +import { createServerRootRoute } from '@tanstack/react-start/server' + +import { Route as rootRouteImport } from './routes/__root' +import { Route as UnauthorizedRouteImport } from './routes/unauthorized' +import { Route as UnauthenticatedRouteImport } from './routes/unauthenticated' +import { Route as TermsOfServiceRouteImport } from './routes/terms-of-service' +import { Route as SuccessRouteImport } from './routes/success' +import { Route as PurchaseRouteImport } from './routes/purchase' +import { Route as PrivacyPolicyRouteImport } from './routes/privacy-policy' +import { Route as LoginRouteImport } from './routes/login' +import { Route as CreateTestimonialRouteImport } from './routes/create-testimonial' +import { Route as CancelRouteImport } from './routes/cancel' +import { Route as AboutRouteImport } from './routes/about' +import { Route as IndexRouteImport } from './routes/index' +import { Route as LearnIndexRouteImport } from './routes/learn/index' +import { Route as LearnNotFoundRouteImport } from './routes/learn/not-found' +import { Route as LearnNoSegmentsRouteImport } from './routes/learn/no-segments' +import { Route as LearnCourseCompletedRouteImport } from './routes/learn/course-completed' +import { Route as LearnAddRouteImport } from './routes/learn/add' +import { Route as LearnSlugEditRouteImport } from './routes/learn/$slug/edit' +import { Route as LearnSlugLayoutRouteImport } from './routes/learn/$slug/_layout' +import { Route as LearnSlugLayoutIndexRouteImport } from './routes/learn/$slug/_layout.index' +import { ServerRoute as ApiLogoutServerRouteImport } from './routes/api/logout' +import { ServerRoute as ApiStripeWebhookServerRouteImport } from './routes/api/stripe/webhook' +import { ServerRoute as ApiLoginGoogleIndexServerRouteImport } from './routes/api/login/google/index' +import { ServerRoute as ApiSegmentsSegmentIdVideoServerRouteImport } from './routes/api/segments/$segmentId/video' +import { ServerRoute as ApiLoginGoogleCallbackIndexServerRouteImport } from './routes/api/login/google/callback/index' + +const LearnSlugRouteImport = createFileRoute('/learn/$slug')() +const rootServerRouteImport = createServerRootRoute() + +const UnauthorizedRoute = UnauthorizedRouteImport.update({ + id: '/unauthorized', + path: '/unauthorized', + getParentRoute: () => rootRouteImport, +} as any) +const UnauthenticatedRoute = UnauthenticatedRouteImport.update({ + id: '/unauthenticated', + path: '/unauthenticated', + getParentRoute: () => rootRouteImport, +} as any) +const TermsOfServiceRoute = TermsOfServiceRouteImport.update({ + id: '/terms-of-service', + path: '/terms-of-service', + getParentRoute: () => rootRouteImport, +} as any) +const SuccessRoute = SuccessRouteImport.update({ + id: '/success', + path: '/success', + getParentRoute: () => rootRouteImport, +} as any) +const PurchaseRoute = PurchaseRouteImport.update({ + id: '/purchase', + path: '/purchase', + getParentRoute: () => rootRouteImport, +} as any) +const PrivacyPolicyRoute = PrivacyPolicyRouteImport.update({ + id: '/privacy-policy', + path: '/privacy-policy', + getParentRoute: () => rootRouteImport, +} as any) +const LoginRoute = LoginRouteImport.update({ + id: '/login', + path: '/login', + getParentRoute: () => rootRouteImport, +} as any) +const CreateTestimonialRoute = CreateTestimonialRouteImport.update({ + id: '/create-testimonial', + path: '/create-testimonial', + getParentRoute: () => rootRouteImport, +} as any) +const CancelRoute = CancelRouteImport.update({ + id: '/cancel', + path: '/cancel', + getParentRoute: () => rootRouteImport, +} as any) +const AboutRoute = AboutRouteImport.update({ + id: '/about', + path: '/about', + getParentRoute: () => rootRouteImport, +} as any) +const IndexRoute = IndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => rootRouteImport, +} as any) +const LearnSlugRoute = LearnSlugRouteImport.update({ + id: '/learn/$slug', + path: '/learn/$slug', + getParentRoute: () => rootRouteImport, +} as any) +const LearnIndexRoute = LearnIndexRouteImport.update({ + id: '/learn/', + path: '/learn/', + getParentRoute: () => rootRouteImport, +} as any) +const LearnNotFoundRoute = LearnNotFoundRouteImport.update({ + id: '/learn/not-found', + path: '/learn/not-found', + getParentRoute: () => rootRouteImport, +} as any) +const LearnNoSegmentsRoute = LearnNoSegmentsRouteImport.update({ + id: '/learn/no-segments', + path: '/learn/no-segments', + getParentRoute: () => rootRouteImport, +} as any) +const LearnCourseCompletedRoute = LearnCourseCompletedRouteImport.update({ + id: '/learn/course-completed', + path: '/learn/course-completed', + getParentRoute: () => rootRouteImport, +} as any) +const LearnAddRoute = LearnAddRouteImport.update({ + id: '/learn/add', + path: '/learn/add', + getParentRoute: () => rootRouteImport, +} as any) +const LearnSlugEditRoute = LearnSlugEditRouteImport.update({ + id: '/edit', + path: '/edit', + getParentRoute: () => LearnSlugRoute, +} as any) +const LearnSlugLayoutRoute = LearnSlugLayoutRouteImport.update({ + id: '/_layout', + getParentRoute: () => LearnSlugRoute, +} as any) +const LearnSlugLayoutIndexRoute = LearnSlugLayoutIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => LearnSlugLayoutRoute, +} as any) +const ApiLogoutServerRoute = ApiLogoutServerRouteImport.update({ + id: '/api/logout', + path: '/api/logout', + getParentRoute: () => rootServerRouteImport, +} as any) +const ApiStripeWebhookServerRoute = ApiStripeWebhookServerRouteImport.update({ + id: '/api/stripe/webhook', + path: '/api/stripe/webhook', + getParentRoute: () => rootServerRouteImport, +} as any) +const ApiLoginGoogleIndexServerRoute = + ApiLoginGoogleIndexServerRouteImport.update({ + id: '/api/login/google/', + path: '/api/login/google/', + getParentRoute: () => rootServerRouteImport, + } as any) +const ApiSegmentsSegmentIdVideoServerRoute = + ApiSegmentsSegmentIdVideoServerRouteImport.update({ + id: '/api/segments/$segmentId/video', + path: '/api/segments/$segmentId/video', + getParentRoute: () => rootServerRouteImport, + } as any) +const ApiLoginGoogleCallbackIndexServerRoute = + ApiLoginGoogleCallbackIndexServerRouteImport.update({ + id: '/api/login/google/callback/', + path: '/api/login/google/callback/', + getParentRoute: () => rootServerRouteImport, + } as any) + +export interface FileRoutesByFullPath { + '/': typeof IndexRoute + '/about': typeof AboutRoute + '/cancel': typeof CancelRoute + '/create-testimonial': typeof CreateTestimonialRoute + '/login': typeof LoginRoute + '/privacy-policy': typeof PrivacyPolicyRoute + '/purchase': typeof PurchaseRoute + '/success': typeof SuccessRoute + '/terms-of-service': typeof TermsOfServiceRoute + '/unauthenticated': typeof UnauthenticatedRoute + '/unauthorized': typeof UnauthorizedRoute + '/learn/add': typeof LearnAddRoute + '/learn/course-completed': typeof LearnCourseCompletedRoute + '/learn/no-segments': typeof LearnNoSegmentsRoute + '/learn/not-found': typeof LearnNotFoundRoute + '/learn': typeof LearnIndexRoute + '/learn/$slug': typeof LearnSlugLayoutRouteWithChildren + '/learn/$slug/edit': typeof LearnSlugEditRoute + '/learn/$slug/': typeof LearnSlugLayoutIndexRoute +} +export interface FileRoutesByTo { + '/': typeof IndexRoute + '/about': typeof AboutRoute + '/cancel': typeof CancelRoute + '/create-testimonial': typeof CreateTestimonialRoute + '/login': typeof LoginRoute + '/privacy-policy': typeof PrivacyPolicyRoute + '/purchase': typeof PurchaseRoute + '/success': typeof SuccessRoute + '/terms-of-service': typeof TermsOfServiceRoute + '/unauthenticated': typeof UnauthenticatedRoute + '/unauthorized': typeof UnauthorizedRoute + '/learn/add': typeof LearnAddRoute + '/learn/course-completed': typeof LearnCourseCompletedRoute + '/learn/no-segments': typeof LearnNoSegmentsRoute + '/learn/not-found': typeof LearnNotFoundRoute + '/learn': typeof LearnIndexRoute + '/learn/$slug': typeof LearnSlugLayoutIndexRoute + '/learn/$slug/edit': typeof LearnSlugEditRoute +} +export interface FileRoutesById { + __root__: typeof rootRouteImport + '/': typeof IndexRoute + '/about': typeof AboutRoute + '/cancel': typeof CancelRoute + '/create-testimonial': typeof CreateTestimonialRoute + '/login': typeof LoginRoute + '/privacy-policy': typeof PrivacyPolicyRoute + '/purchase': typeof PurchaseRoute + '/success': typeof SuccessRoute + '/terms-of-service': typeof TermsOfServiceRoute + '/unauthenticated': typeof UnauthenticatedRoute + '/unauthorized': typeof UnauthorizedRoute + '/learn/add': typeof LearnAddRoute + '/learn/course-completed': typeof LearnCourseCompletedRoute + '/learn/no-segments': typeof LearnNoSegmentsRoute + '/learn/not-found': typeof LearnNotFoundRoute + '/learn/': typeof LearnIndexRoute + '/learn/$slug': typeof LearnSlugRouteWithChildren + '/learn/$slug/_layout': typeof LearnSlugLayoutRouteWithChildren + '/learn/$slug/edit': typeof LearnSlugEditRoute + '/learn/$slug/_layout/': typeof LearnSlugLayoutIndexRoute +} +export interface FileRouteTypes { + fileRoutesByFullPath: FileRoutesByFullPath + fullPaths: + | '/' + | '/about' + | '/cancel' + | '/create-testimonial' + | '/login' + | '/privacy-policy' + | '/purchase' + | '/success' + | '/terms-of-service' + | '/unauthenticated' + | '/unauthorized' + | '/learn/add' + | '/learn/course-completed' + | '/learn/no-segments' + | '/learn/not-found' + | '/learn' + | '/learn/$slug' + | '/learn/$slug/edit' + | '/learn/$slug/' + fileRoutesByTo: FileRoutesByTo + to: + | '/' + | '/about' + | '/cancel' + | '/create-testimonial' + | '/login' + | '/privacy-policy' + | '/purchase' + | '/success' + | '/terms-of-service' + | '/unauthenticated' + | '/unauthorized' + | '/learn/add' + | '/learn/course-completed' + | '/learn/no-segments' + | '/learn/not-found' + | '/learn' + | '/learn/$slug' + | '/learn/$slug/edit' + id: + | '__root__' + | '/' + | '/about' + | '/cancel' + | '/create-testimonial' + | '/login' + | '/privacy-policy' + | '/purchase' + | '/success' + | '/terms-of-service' + | '/unauthenticated' + | '/unauthorized' + | '/learn/add' + | '/learn/course-completed' + | '/learn/no-segments' + | '/learn/not-found' + | '/learn/' + | '/learn/$slug' + | '/learn/$slug/_layout' + | '/learn/$slug/edit' + | '/learn/$slug/_layout/' + fileRoutesById: FileRoutesById +} +export interface RootRouteChildren { + IndexRoute: typeof IndexRoute + AboutRoute: typeof AboutRoute + CancelRoute: typeof CancelRoute + CreateTestimonialRoute: typeof CreateTestimonialRoute + LoginRoute: typeof LoginRoute + PrivacyPolicyRoute: typeof PrivacyPolicyRoute + PurchaseRoute: typeof PurchaseRoute + SuccessRoute: typeof SuccessRoute + TermsOfServiceRoute: typeof TermsOfServiceRoute + UnauthenticatedRoute: typeof UnauthenticatedRoute + UnauthorizedRoute: typeof UnauthorizedRoute + LearnAddRoute: typeof LearnAddRoute + LearnCourseCompletedRoute: typeof LearnCourseCompletedRoute + LearnNoSegmentsRoute: typeof LearnNoSegmentsRoute + LearnNotFoundRoute: typeof LearnNotFoundRoute + LearnIndexRoute: typeof LearnIndexRoute + LearnSlugRoute: typeof LearnSlugRouteWithChildren +} +export interface FileServerRoutesByFullPath { + '/api/logout': typeof ApiLogoutServerRoute + '/api/stripe/webhook': typeof ApiStripeWebhookServerRoute + '/api/segments/$segmentId/video': typeof ApiSegmentsSegmentIdVideoServerRoute + '/api/login/google': typeof ApiLoginGoogleIndexServerRoute + '/api/login/google/callback': typeof ApiLoginGoogleCallbackIndexServerRoute +} +export interface FileServerRoutesByTo { + '/api/logout': typeof ApiLogoutServerRoute + '/api/stripe/webhook': typeof ApiStripeWebhookServerRoute + '/api/segments/$segmentId/video': typeof ApiSegmentsSegmentIdVideoServerRoute + '/api/login/google': typeof ApiLoginGoogleIndexServerRoute + '/api/login/google/callback': typeof ApiLoginGoogleCallbackIndexServerRoute +} +export interface FileServerRoutesById { + __root__: typeof rootServerRouteImport + '/api/logout': typeof ApiLogoutServerRoute + '/api/stripe/webhook': typeof ApiStripeWebhookServerRoute + '/api/segments/$segmentId/video': typeof ApiSegmentsSegmentIdVideoServerRoute + '/api/login/google/': typeof ApiLoginGoogleIndexServerRoute + '/api/login/google/callback/': typeof ApiLoginGoogleCallbackIndexServerRoute +} +export interface FileServerRouteTypes { + fileServerRoutesByFullPath: FileServerRoutesByFullPath + fullPaths: + | '/api/logout' + | '/api/stripe/webhook' + | '/api/segments/$segmentId/video' + | '/api/login/google' + | '/api/login/google/callback' + fileServerRoutesByTo: FileServerRoutesByTo + to: + | '/api/logout' + | '/api/stripe/webhook' + | '/api/segments/$segmentId/video' + | '/api/login/google' + | '/api/login/google/callback' + id: + | '__root__' + | '/api/logout' + | '/api/stripe/webhook' + | '/api/segments/$segmentId/video' + | '/api/login/google/' + | '/api/login/google/callback/' + fileServerRoutesById: FileServerRoutesById +} +export interface RootServerRouteChildren { + ApiLogoutServerRoute: typeof ApiLogoutServerRoute + ApiStripeWebhookServerRoute: typeof ApiStripeWebhookServerRoute + ApiSegmentsSegmentIdVideoServerRoute: typeof ApiSegmentsSegmentIdVideoServerRoute + ApiLoginGoogleIndexServerRoute: typeof ApiLoginGoogleIndexServerRoute + ApiLoginGoogleCallbackIndexServerRoute: typeof ApiLoginGoogleCallbackIndexServerRoute +} + +declare module '@tanstack/react-router' { + interface FileRoutesByPath { + '/unauthorized': { + id: '/unauthorized' + path: '/unauthorized' + fullPath: '/unauthorized' + preLoaderRoute: typeof UnauthorizedRouteImport + parentRoute: typeof rootRouteImport + } + '/unauthenticated': { + id: '/unauthenticated' + path: '/unauthenticated' + fullPath: '/unauthenticated' + preLoaderRoute: typeof UnauthenticatedRouteImport + parentRoute: typeof rootRouteImport + } + '/terms-of-service': { + id: '/terms-of-service' + path: '/terms-of-service' + fullPath: '/terms-of-service' + preLoaderRoute: typeof TermsOfServiceRouteImport + parentRoute: typeof rootRouteImport + } + '/success': { + id: '/success' + path: '/success' + fullPath: '/success' + preLoaderRoute: typeof SuccessRouteImport + parentRoute: typeof rootRouteImport + } + '/purchase': { + id: '/purchase' + path: '/purchase' + fullPath: '/purchase' + preLoaderRoute: typeof PurchaseRouteImport + parentRoute: typeof rootRouteImport + } + '/privacy-policy': { + id: '/privacy-policy' + path: '/privacy-policy' + fullPath: '/privacy-policy' + preLoaderRoute: typeof PrivacyPolicyRouteImport + parentRoute: typeof rootRouteImport + } + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } + '/create-testimonial': { + id: '/create-testimonial' + path: '/create-testimonial' + fullPath: '/create-testimonial' + preLoaderRoute: typeof CreateTestimonialRouteImport + parentRoute: typeof rootRouteImport + } + '/cancel': { + id: '/cancel' + path: '/cancel' + fullPath: '/cancel' + preLoaderRoute: typeof CancelRouteImport + parentRoute: typeof rootRouteImport + } + '/about': { + id: '/about' + path: '/about' + fullPath: '/about' + preLoaderRoute: typeof AboutRouteImport + parentRoute: typeof rootRouteImport + } + '/': { + id: '/' + path: '/' + fullPath: '/' + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + '/learn/$slug': { + id: '/learn/$slug' + path: '/learn/$slug' + fullPath: '/learn/$slug' + preLoaderRoute: typeof LearnSlugRouteImport + parentRoute: typeof rootRouteImport + } + '/learn/': { + id: '/learn/' + path: '/learn' + fullPath: '/learn' + preLoaderRoute: typeof LearnIndexRouteImport + parentRoute: typeof rootRouteImport + } + '/learn/not-found': { + id: '/learn/not-found' + path: '/learn/not-found' + fullPath: '/learn/not-found' + preLoaderRoute: typeof LearnNotFoundRouteImport + parentRoute: typeof rootRouteImport + } + '/learn/no-segments': { + id: '/learn/no-segments' + path: '/learn/no-segments' + fullPath: '/learn/no-segments' + preLoaderRoute: typeof LearnNoSegmentsRouteImport + parentRoute: typeof rootRouteImport + } + '/learn/course-completed': { + id: '/learn/course-completed' + path: '/learn/course-completed' + fullPath: '/learn/course-completed' + preLoaderRoute: typeof LearnCourseCompletedRouteImport + parentRoute: typeof rootRouteImport + } + '/learn/add': { + id: '/learn/add' + path: '/learn/add' + fullPath: '/learn/add' + preLoaderRoute: typeof LearnAddRouteImport + parentRoute: typeof rootRouteImport + } + '/learn/$slug/edit': { + id: '/learn/$slug/edit' + path: '/edit' + fullPath: '/learn/$slug/edit' + preLoaderRoute: typeof LearnSlugEditRouteImport + parentRoute: typeof LearnSlugRoute + } + '/learn/$slug/_layout': { + id: '/learn/$slug/_layout' + path: '/learn/$slug' + fullPath: '/learn/$slug' + preLoaderRoute: typeof LearnSlugLayoutRouteImport + parentRoute: typeof LearnSlugRoute + } + '/learn/$slug/_layout/': { + id: '/learn/$slug/_layout/' + path: '/' + fullPath: '/learn/$slug/' + preLoaderRoute: typeof LearnSlugLayoutIndexRouteImport + parentRoute: typeof LearnSlugLayoutRoute + } + } +} +declare module '@tanstack/react-start/server' { + interface ServerFileRoutesByPath { + '/api/logout': { + id: '/api/logout' + path: '/api/logout' + fullPath: '/api/logout' + preLoaderRoute: typeof ApiLogoutServerRouteImport + parentRoute: typeof rootServerRouteImport + } + '/api/stripe/webhook': { + id: '/api/stripe/webhook' + path: '/api/stripe/webhook' + fullPath: '/api/stripe/webhook' + preLoaderRoute: typeof ApiStripeWebhookServerRouteImport + parentRoute: typeof rootServerRouteImport + } + '/api/login/google/': { + id: '/api/login/google/' + path: '/api/login/google' + fullPath: '/api/login/google' + preLoaderRoute: typeof ApiLoginGoogleIndexServerRouteImport + parentRoute: typeof rootServerRouteImport + } + '/api/segments/$segmentId/video': { + id: '/api/segments/$segmentId/video' + path: '/api/segments/$segmentId/video' + fullPath: '/api/segments/$segmentId/video' + preLoaderRoute: typeof ApiSegmentsSegmentIdVideoServerRouteImport + parentRoute: typeof rootServerRouteImport + } + '/api/login/google/callback/': { + id: '/api/login/google/callback/' + path: '/api/login/google/callback' + fullPath: '/api/login/google/callback' + preLoaderRoute: typeof ApiLoginGoogleCallbackIndexServerRouteImport + parentRoute: typeof rootServerRouteImport + } + } +} + +interface LearnSlugLayoutRouteChildren { + LearnSlugLayoutIndexRoute: typeof LearnSlugLayoutIndexRoute +} + +const LearnSlugLayoutRouteChildren: LearnSlugLayoutRouteChildren = { + LearnSlugLayoutIndexRoute: LearnSlugLayoutIndexRoute, +} + +const LearnSlugLayoutRouteWithChildren = LearnSlugLayoutRoute._addFileChildren( + LearnSlugLayoutRouteChildren, +) + +interface LearnSlugRouteChildren { + LearnSlugLayoutRoute: typeof LearnSlugLayoutRouteWithChildren + LearnSlugEditRoute: typeof LearnSlugEditRoute +} + +const LearnSlugRouteChildren: LearnSlugRouteChildren = { + LearnSlugLayoutRoute: LearnSlugLayoutRouteWithChildren, + LearnSlugEditRoute: LearnSlugEditRoute, +} + +const LearnSlugRouteWithChildren = LearnSlugRoute._addFileChildren( + LearnSlugRouteChildren, +) + +const rootRouteChildren: RootRouteChildren = { + IndexRoute: IndexRoute, + AboutRoute: AboutRoute, + CancelRoute: CancelRoute, + CreateTestimonialRoute: CreateTestimonialRoute, + LoginRoute: LoginRoute, + PrivacyPolicyRoute: PrivacyPolicyRoute, + PurchaseRoute: PurchaseRoute, + SuccessRoute: SuccessRoute, + TermsOfServiceRoute: TermsOfServiceRoute, + UnauthenticatedRoute: UnauthenticatedRoute, + UnauthorizedRoute: UnauthorizedRoute, + LearnAddRoute: LearnAddRoute, + LearnCourseCompletedRoute: LearnCourseCompletedRoute, + LearnNoSegmentsRoute: LearnNoSegmentsRoute, + LearnNotFoundRoute: LearnNotFoundRoute, + LearnIndexRoute: LearnIndexRoute, + LearnSlugRoute: LearnSlugRouteWithChildren, +} +export const routeTree = rootRouteImport + ._addFileChildren(rootRouteChildren) + ._addFileTypes() +const rootServerRouteChildren: RootServerRouteChildren = { + ApiLogoutServerRoute: ApiLogoutServerRoute, + ApiStripeWebhookServerRoute: ApiStripeWebhookServerRoute, + ApiSegmentsSegmentIdVideoServerRoute: ApiSegmentsSegmentIdVideoServerRoute, + ApiLoginGoogleIndexServerRoute: ApiLoginGoogleIndexServerRoute, + ApiLoginGoogleCallbackIndexServerRoute: + ApiLoginGoogleCallbackIndexServerRoute, +} +export const serverRouteTree = rootServerRouteImport + ._addFileChildren(rootServerRouteChildren) + ._addFileTypes() diff --git a/app/router.tsx b/src/router.tsx similarity index 100% rename from app/router.tsx rename to src/router.tsx diff --git a/app/routes/-components/code-preview.tsx b/src/routes/-components/code-preview.tsx similarity index 100% rename from app/routes/-components/code-preview.tsx rename to src/routes/-components/code-preview.tsx diff --git a/app/routes/-components/faq.tsx b/src/routes/-components/faq.tsx similarity index 100% rename from app/routes/-components/faq.tsx rename to src/routes/-components/faq.tsx diff --git a/app/routes/-components/footer.tsx b/src/routes/-components/footer.tsx similarity index 100% rename from app/routes/-components/footer.tsx rename to src/routes/-components/footer.tsx diff --git a/app/routes/-components/header.tsx b/src/routes/-components/header.tsx similarity index 100% rename from app/routes/-components/header.tsx rename to src/routes/-components/header.tsx diff --git a/app/routes/-components/hero.tsx b/src/routes/-components/hero.tsx similarity index 100% rename from app/routes/-components/hero.tsx rename to src/routes/-components/hero.tsx diff --git a/app/routes/-components/modules.tsx b/src/routes/-components/modules.tsx similarity index 100% rename from app/routes/-components/modules.tsx rename to src/routes/-components/modules.tsx diff --git a/app/routes/-components/newsletter.tsx b/src/routes/-components/newsletter.tsx similarity index 100% rename from app/routes/-components/newsletter.tsx rename to src/routes/-components/newsletter.tsx diff --git a/app/routes/-components/pricing.tsx b/src/routes/-components/pricing.tsx similarity index 100% rename from app/routes/-components/pricing.tsx rename to src/routes/-components/pricing.tsx diff --git a/app/routes/-components/testimonials.tsx b/src/routes/-components/testimonials.tsx similarity index 100% rename from app/routes/-components/testimonials.tsx rename to src/routes/-components/testimonials.tsx diff --git a/app/routes/__root.tsx b/src/routes/__root.tsx similarity index 96% rename from app/routes/__root.tsx rename to src/routes/__root.tsx index ed17fe6..16c955c 100644 --- a/app/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -1,3 +1,4 @@ +/// import { Outlet, createRootRouteWithContext, @@ -60,7 +61,7 @@ export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()( }, ], }), - errorComponent: (props) => { + errorComponent: props => { return ( @@ -101,7 +102,7 @@ function RootDocument({ children }: { children: React.ReactNode }) { }, [routerState.status, routerState.location.pathname]); return ( - +