New features: - HLS video encoding/streaming (hls routes, hls-encoder) and a media transcripts pipeline (transcripts route + media-transcript queries) - AI assistant chat vs. run model: agent-course-generation worker/queue, run-monitor pane, chat-changes card, content ask-ai bar - Per-theme course-page previews across org landing-page themes (bold, classic, corporate, editorial, etc.) with a shared course token/component set - View-as-student mode and login-link / link-invite invite flows Refactor: - Extract packages/core consolidating config (env, storage, dashboard-url), services and utils previously duplicated under apps/api/src/config - Remove legacy agent service modules (chat-tools, chat-context, context-window, document, fetch-url, lesson-content) - Relax Cross-Origin-Resource-Policy to allow cross-origin media embedding - Add format script to tenant-router so turbo run format covers it
151 lines
3.3 KiB
TypeScript
151 lines
3.3 KiB
TypeScript
import * as React from 'react';
|
|
|
|
import type { LinksFunction, MetaFunction } from 'react-router';
|
|
import {
|
|
isRouteErrorResponse,
|
|
Links,
|
|
Meta,
|
|
Outlet,
|
|
Scripts,
|
|
ScrollRestoration,
|
|
useRouteError
|
|
} from 'react-router';
|
|
import { RootProvider } from 'fumadocs-ui/provider/react-router';
|
|
|
|
import { NotFound } from '@/components/not-found';
|
|
import './app.css';
|
|
|
|
const DEFAULT_META_TITLE =
|
|
'ClassroomIO Docs | Customer, Partner, and Employee Education';
|
|
const DEFAULT_META_DESCRIPTION =
|
|
'Learn how to create customer academies, partner certification programs, and employee training workflows in ClassroomIO.';
|
|
const DEFAULT_OG_IMAGE_URL = 'https://brand.cdn.clsrio.com/og/classroomio-opengraph.png';
|
|
const DEFAULT_OG_IMAGE_ALT = 'ClassroomIO documentation for customer, partner, and employee education';
|
|
|
|
export const links: LinksFunction = () => [
|
|
{ rel: 'icon', href: '/docs/favicon.ico' }
|
|
];
|
|
|
|
export const meta: MetaFunction = () => [
|
|
{
|
|
title: DEFAULT_META_TITLE
|
|
},
|
|
{
|
|
name: 'description',
|
|
content: DEFAULT_META_DESCRIPTION
|
|
},
|
|
{
|
|
property: 'og:url',
|
|
content: 'https://classroomio.com/docs'
|
|
},
|
|
{
|
|
property: 'og:type',
|
|
content: 'website'
|
|
},
|
|
{
|
|
property: 'og:title',
|
|
content: DEFAULT_META_TITLE
|
|
},
|
|
{
|
|
property: 'og:description',
|
|
content: DEFAULT_META_DESCRIPTION
|
|
},
|
|
{
|
|
property: 'og:image',
|
|
content: DEFAULT_OG_IMAGE_URL
|
|
},
|
|
{
|
|
property: 'og:image:alt',
|
|
content: DEFAULT_OG_IMAGE_ALT
|
|
},
|
|
{
|
|
property: 'og:image:type',
|
|
content: 'image/png'
|
|
},
|
|
{
|
|
property: 'og:image:width',
|
|
content: '1920'
|
|
},
|
|
{
|
|
property: 'og:image:height',
|
|
content: '1080'
|
|
},
|
|
{
|
|
property: 'og:image:secure_url',
|
|
content: DEFAULT_OG_IMAGE_URL
|
|
},
|
|
{
|
|
name: 'twitter:card',
|
|
content: 'summary_large_image'
|
|
},
|
|
{
|
|
property: 'twitter:domain',
|
|
content: 'classroomio.com'
|
|
},
|
|
{
|
|
property: 'twitter:url',
|
|
content: 'https://classroomio.com/docs'
|
|
},
|
|
{
|
|
name: 'twitter:title',
|
|
content: DEFAULT_META_TITLE
|
|
},
|
|
{
|
|
name: 'twitter:description',
|
|
content: DEFAULT_META_DESCRIPTION
|
|
},
|
|
{
|
|
name: 'twitter:creator',
|
|
content: '@classroomio'
|
|
},
|
|
{
|
|
name: 'twitter:image',
|
|
content: DEFAULT_OG_IMAGE_URL
|
|
},
|
|
{
|
|
name: 'twitter:image:alt',
|
|
content: DEFAULT_OG_IMAGE_ALT
|
|
}
|
|
];
|
|
|
|
export function Layout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head>
|
|
<meta charSet="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<Meta />
|
|
<Links />
|
|
</head>
|
|
<body className="flex min-h-screen flex-col">
|
|
<RootProvider>{children}</RootProvider>
|
|
<ScrollRestoration />
|
|
<Scripts />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|
|
|
|
export default function App() {
|
|
return <Outlet />;
|
|
}
|
|
|
|
export function ErrorBoundary() {
|
|
const error = useRouteError();
|
|
|
|
if (isRouteErrorResponse(error) && error.status === 404) {
|
|
return <NotFound />;
|
|
}
|
|
|
|
return (
|
|
<Layout>
|
|
<main className="mx-auto flex min-h-screen w-full max-w-3xl flex-col justify-center gap-4 px-6 py-24">
|
|
<h1 className="text-3xl font-semibold">Docs Error</h1>
|
|
<p className="text-fd-muted-foreground">
|
|
The docs app hit an unexpected error while rendering this page.
|
|
</p>
|
|
</main>
|
|
</Layout>
|
|
);
|
|
}
|