feat: HLS streaming, transcripts, agent course generation & landing-page course previews (#663)
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
This commit is contained in:
@@ -4,15 +4,19 @@ import { initUmami } from '$lib/utils/services/umami';
|
||||
import { initUserJot } from '$lib/utils/services/userjot';
|
||||
import { licenseApi } from '$features/license/api/license.svelte';
|
||||
|
||||
let isInitialized = false;
|
||||
let isTrackingInitialized = false;
|
||||
|
||||
export function setupAnalytics(user?: PosthogBootstrapUser) {
|
||||
if (isInitialized) return;
|
||||
isInitialized = true;
|
||||
function setupTracking(user?: PosthogBootstrapUser) {
|
||||
if (isTrackingInitialized) return;
|
||||
isTrackingInitialized = true;
|
||||
|
||||
initPosthog(user);
|
||||
initUmami();
|
||||
}
|
||||
|
||||
export function setupAnalytics(user?: PosthogBootstrapUser) {
|
||||
initUserJot();
|
||||
setupTracking(user);
|
||||
}
|
||||
|
||||
/** Checks if this is cloud deployment and initializes analytics */
|
||||
@@ -23,9 +27,11 @@ export function setupCloudAnalytics(user?: PosthogBootstrapUser) {
|
||||
}
|
||||
|
||||
export function setupAnalyticsBasedOnLicense(user?: PosthogBootstrapUser) {
|
||||
initUserJot();
|
||||
|
||||
if (licenseApi.hasAccess('no-tracking')) {
|
||||
return;
|
||||
}
|
||||
|
||||
setupAnalytics(user);
|
||||
setupTracking(user);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { appInitApi } from '$features/app/init.svelte';
|
||||
import { authClient } from '$lib/utils/services/auth/client';
|
||||
import { capturePosthogEvent } from '$lib/utils/services/posthog';
|
||||
import { clearSentryUser } from '$lib/utils/services/sentry';
|
||||
import { clearUserJotUser } from '$lib/utils/services/userjot';
|
||||
import { goto } from '$app/navigation';
|
||||
import posthog from 'posthog-js';
|
||||
import { resolve } from '$app/paths';
|
||||
@@ -18,6 +19,7 @@ export async function logout(redirect = true) {
|
||||
capturePosthogEvent('user_logged_out');
|
||||
posthog.reset();
|
||||
clearSentryUser();
|
||||
clearUserJotUser();
|
||||
|
||||
if (redirect) {
|
||||
goto(resolve('/login', {}));
|
||||
|
||||
@@ -5,10 +5,10 @@ import { env } from '$env/dynamic/public';
|
||||
|
||||
const isSelfHosted = PUBLIC_IS_SELFHOSTED === 'true';
|
||||
|
||||
const DEFAULT_TITLE = 'ClassroomIO | The Open Source Learning Management System for Companies';
|
||||
const DEFAULT_TITLE = 'ClassroomIO | The Most Customizable Platform for Customer, Partner, and Employee Education';
|
||||
const DEFAULT_DESCRIPTION =
|
||||
'A flexible, user-friendly platform for creating, managing, and delivering courses for companies and training organisations';
|
||||
const CLOUD_OG_IMAGE = 'https://brand.cdn.clsrio.com/og/classroomio-og.png';
|
||||
'One platform for customer academies, partner certification, and employee training. Build courses with AI, publish under your domain, and track completions.';
|
||||
const CLOUD_OG_IMAGE = 'https://brand.cdn.clsrio.com/og/classroomio-opengraph.png';
|
||||
|
||||
function resolveOgImageUrl(url: URL, orgSiteInfo: OrgSiteInfo): string {
|
||||
const envUrl = env.PUBLIC_OG_IMAGE_URL?.trim();
|
||||
@@ -64,7 +64,7 @@ export function getBaseMetaTags(url: URL, orgSiteInfo: OrgSiteInfo): MetaTagsPro
|
||||
images: [
|
||||
{
|
||||
url: ogImageUrl,
|
||||
alt: `${siteName} OG Image`,
|
||||
alt: `${siteName} platform for customer, partner, and employee education`,
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
secureUrl: ogImageUrl,
|
||||
@@ -79,7 +79,7 @@ export function getBaseMetaTags(url: URL, orgSiteInfo: OrgSiteInfo): MetaTagsPro
|
||||
title,
|
||||
description,
|
||||
image: ogImageUrl,
|
||||
imageAlt: `${siteName} OG Image`
|
||||
imageAlt: `${siteName} platform for customer, partner, and employee education`
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user