Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
feat: create app skeleton for university app
Brad Barbin096acc1aee5e
diff --git a/README.md b/README.mdindex a40f45bf36..4be1c85789 100644--- a/README.md+++ b/README.md@@ -197,7 +197,8 @@ After installation you should be able run the apps locally.| --------------- | ------------------------------------------------------------------------------------------------------------------ || ERP | [http://localhost:3000](http://localhost:3000) || MES | [http://localhost:3001](http://localhost:3001) |-| Starter | [http://localhost:3002](http://localhost:3002) |+| University | [http://localhost:3003](http://localhost:3003) |+| Starter | [http://localhost:4000](http://localhost:4000) || Postgres | [postgresql://postgres:postgres@localhost:54322/postgres](postgresql://postgres:postgres@localhost:54322/postgres) || Supabase Studio | [http://localhost:54323/project/default](http://localhost:54323/project/default) || Inbucket | [http://localhost:54324/monitor](http://localhost:54324/monitor) |diff --git a/apps/starter/vite.config.ts b/apps/starter/vite.config.tsindex 5421b2e974..2249021af4 100644--- a/apps/starter/vite.config.ts+++ b/apps/starter/vite.config.ts@@ -31,7 +31,7 @@ export default defineConfig({],},server: {- port: 3002,+ port: 4000,},plugins: [remix({diff --git a/apps/university/.eslintrc.mjs b/apps/university/.eslintrc.mjsnew file mode 100644index 0000000000..d6be4cb1c8--- /dev/null+++ b/apps/university/.eslintrc.mjs@@ -0,0 +1,3 @@+module.exports = {+ extends: ["carbon"],+};diff --git a/apps/university/.gitignore b/apps/university/.gitignorenew file mode 100644index 0000000000..4a02fe5c58--- /dev/null+++ b/apps/university/.gitignore@@ -0,0 +1,10 @@+node_modules++.cache+.vercel+.output++build+public/build+api/index.js*+api/_assets*diff --git a/apps/university/app/components/Avatar.tsx b/apps/university/app/components/Avatar.tsxnew file mode 100644index 0000000000..2ebc4a9b7b--- /dev/null+++ b/apps/university/app/components/Avatar.tsx@@ -0,0 +1,20 @@+import type { AvatarProps as AvatarBaseProps } from "@carbon/react";+import { Avatar as AvatarBase } from "@carbon/react";+import { forwardRef } from "react";+import { getStoragePath } from "~/utils/path";++type AvatarProps = AvatarBaseProps & {+ path?: string | null;+ bucket?: string;+};++const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(+ ({ name, path, bucket = "avatars", ...props }, ref) => {+ const imagePath = path ? getStoragePath(bucket, path) : undefined;++ return <AvatarBase src={imagePath} name={name} ref={ref} {...props} />;+ }+);+Avatar.displayName = "Avatar";++export default Avatar;diff --git a/apps/university/app/components/AvatarMenu.tsx b/apps/university/app/components/AvatarMenu.tsxnew file mode 100644index 0000000000..3a5236dc08--- /dev/null+++ b/apps/university/app/components/AvatarMenu.tsx@@ -0,0 +1,95 @@+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuIcon,+ DropdownMenuItem,+ DropdownMenuLabel,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+ Switch,+} from "@carbon/react";+import { Form, Link, useFetcher } from "@remix-run/react";+import { useRef, useState } from "react";+import { LuHouse, LuLogOut, LuMoon, LuSun, LuUser } from "react-icons/lu";+import { Avatar } from "~/components";+import { useUser } from "~/hooks";+import { useMode } from "~/hooks/useMode";+import type { action } from "~/root";+import { path } from "~/utils/path";++const AvatarMenu = () => {+ const user = useUser();+ const name = `${user.firstName} ${user.lastName}`;++ const mode = useMode();++ const nextMode = mode === "dark" ? "light" : "dark";+ const modeSubmitRef = useRef<HTMLButtonElement>(null);++ const fetcher = useFetcher<typeof action>();+ const [isOpen, setIsOpen] = useState(false);++ return (+ <DropdownMenu open={isOpen} onOpenChange={setIsOpen}>+ <DropdownMenuTrigger className="outline-none focus-visible:outline-none">+ <Avatar path={user.avatarUrl} name={name} />+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end" className="w-56">+ <DropdownMenuLabel>Signed in as {name}</DropdownMenuLabel>+ <DropdownMenuSeparator />+ <DropdownMenuItem asChild>+ <Link to={path.to.dashboard}>+ <DropdownMenuIcon icon={<LuHouse />} />+ Dashboard+ </Link>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem asChild>+ <Link to={path.to.accountSettings}>+ <DropdownMenuIcon icon={<LuUser />} />+ Account Settings+ </Link>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem onSelect={(e) => e.preventDefault()}>+ <div className="flex items-center justify-between w-full">+ <div className="flex items-center justify-start">+ <DropdownMenuIcon+ icon={mode === "dark" ? <LuMoon /> : <LuSun />}+ />+ Dark Mode+ </div>+ <div>+ <Switch+ checked={mode === "dark"}+ onCheckedChange={() => modeSubmitRef.current?.click()}+ />+ <fetcher.Form+ action={path.to.root}+ method="post"+ onSubmit={() => {+ document.body.removeAttribute("style");+ }}+ className="sr-only"+ >+ <input type="hidden" name="mode" value={nextMode} />+ <button ref={modeSubmitRef} className="sr-only" type="submit" />+ </fetcher.Form>+ </div>+ </div>+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem onSelect={(e) => e.preventDefault()}>+ <Form method="post" action={path.to.logout}>+ <button type="submit" className="w-full flex items-center">+ <DropdownMenuIcon icon={<LuLogOut />} />+ <span>Sign Out</span>+ </button>+ </Form>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ );+};++export default AvatarMenu;diff --git a/apps/university/app/components/Background.tsx b/apps/university/app/components/Background.tsxnew file mode 100644index 0000000000..4b422bc053--- /dev/null+++ b/apps/university/app/components/Background.tsx@@ -0,0 +1,9 @@+const Background = () => {+ return (+ <div className="background">+ <div className="gradient dark:hidden" />+ </div>+ );+};++export default Background;diff --git a/apps/university/app/components/Breadcrumbs.tsx b/apps/university/app/components/Breadcrumbs.tsxnew file mode 100644index 0000000000..7f143583b3--- /dev/null+++ b/apps/university/app/components/Breadcrumbs.tsx@@ -0,0 +1,226 @@+import {+ Avatar,+ Badge,+ Button,+ cn,+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuGroup,+ DropdownMenuItem,+ DropdownMenuLabel,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+ getValidChildren,+ HStack,+ useIsMobile,+} from "@carbon/react";+import type { LinkProps } from "@remix-run/react";+import { Form, Link, useMatches } from "@remix-run/react";+import type { ComponentProps } from "react";+import { cloneElement, forwardRef } from "react";++import type { Company } from "@carbon/auth";+import { LuChevronsUpDown } from "react-icons/lu";+import { z } from "zod";++import { useMode, useRouteData } from "~/hooks";+import { path } from "~/utils/path";++const BreadcrumbsBase = forwardRef<+ HTMLElement,+ ComponentProps<"nav"> & {+ useReactRouter?: boolean;+ }+>(({ className, children, useReactRouter = true, ...props }, ref) => {+ const validChildren = getValidChildren(children);+ const count = validChildren.length;+ const clones = validChildren.map((child, index) =>+ cloneElement(child, {+ isFirstChild: index === 0,+ isLastChild: index === count - 1,+ })+ );+ return (+ <nav+ aria-label="Breadcrumb"+ ref={ref}+ className={cn("reset flex", className)}+ {...props}+ >+ <ol className="inline-flex items-center space-x-1">{clones}</ol>+ </nav>+ );+});+BreadcrumbsBase.displayName = "BreadcrumbsBase";++const BreadcrumbItem = forwardRef<+ HTMLLIElement,+ ComponentProps<"li"> & {+ isFirstChild?: boolean;+ isLastChild?: boolean;+ }+>(({ className, children, isFirstChild, isLastChild, ...props }, ref) => (+ <li+ ref={ref}+ className={cn("inline-flex items-center", className)}+ {...props}+ >+ {!isFirstChild && <span className="text-muted-foreground">/</span>}+ {children}+ </li>+));+BreadcrumbItem.displayName = "BreadcrumbItem";++const BreadcrumbLink = forwardRef<+ HTMLAnchorElement,+ LinkProps & {+ isCurrentPage?: boolean;+ }+>(({ className, children, isCurrentPage, ...props }, ref) => {+ return (+ <Button+ variant="ghost"+ className={cn(+ "px-2 outline-none focus-visible:ring-transparent",+ className+ )}+ asChild+ >+ {isCurrentPage ? (+ <span aria-current="page" ref={ref} {...props}>+ {children}+ </span>+ ) : (+ <Link ref={ref} {...props} prefetch="intent">+ {children}+ </Link>+ )}+ </Button>+ );+});+BreadcrumbLink.displayName = "BreadcrumbLink";++export const BreadcrumbHandle = z.object({+ breadcrumb: z.any(),+ to: z.string().optional(),+});+export type BreadcrumbHandleType = z.infer<typeof BreadcrumbHandle>;++const BreadcrumbHandleMatch = z.object({+ handle: BreadcrumbHandle,+});++const Breadcrumbs = () => {+ const matches = useMatches();++ const breadcrumbs = matches+ .map((m) => {+ const result = BreadcrumbHandleMatch.safeParse(m);+ if (!result.success || !result.data.handle.breadcrumb) return null;++ return {+ breadcrumb: result.data.handle.breadcrumb,+ to: result.data.handle?.to ?? m.pathname,+ };+ })+ .filter(Boolean);++ const isMobile = useIsMobile();++ return (+ <HStack className="items-center h-full -ml-2" spacing={0}>+ <BreadcrumbsBase className="line-clamp-1">+ {!isMobile && <CompanyBreadcrumb />}+ {breadcrumbs.map((breadcrumb, i) => (+ <BreadcrumbItem key={i}>+ <BreadcrumbLink+ isCurrentPage={!breadcrumb?.to}+ to={breadcrumb?.to ?? ""}+ >+ {breadcrumb?.breadcrumb}+ </BreadcrumbLink>+ </BreadcrumbItem>+ ))}+ </BreadcrumbsBase>+ </HStack>+ );+};++function CompanyBreadcrumb() {+ const mode = useMode();+ const routeData = useRouteData<{ company: Company; companies: Company[] }>(+ path.to.authenticatedRoot+ );++ const hasMultipleCompanies = Boolean(+ routeData?.companies && routeData?.companies.length > 1+ );++ const hasCompanyMenu = hasMultipleCompanies;++ return (+ <>+ <BreadcrumbItem isFirstChild>+ <BreadcrumbLink to="/">Developers</BreadcrumbLink>+ </BreadcrumbItem>+ <BreadcrumbItem>+ {hasCompanyMenu ? (+ <>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ aria-current="page"+ variant="ghost"+ className="px-2 focus-visible:ring-transparent"+ rightIcon={<LuChevronsUpDown />}+ >+ {routeData?.company.name}+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="start" className="min-w-[240px]">+ <DropdownMenuLabel>Companies</DropdownMenuLabel>+ <DropdownMenuSeparator />+ <DropdownMenuGroup>+ {routeData?.companies.map((c) => {+ const logo =+ mode === "dark" ? c.logoDarkIcon : c.logoLightIcon;+ return (+ <Form+ key={c.companyId}+ method="post"+ action={path.to.companySwitch(c.companyId!)}+ >+ <DropdownMenuItem+ className="flex items-center justify-between w-full"+ asChild+ >+ <button type="submit">+ <HStack>+ <Avatar+ size="xs"+ name={c.name ?? undefined}+ src={logo ?? undefined}+ />+ <span>{c.name}</span>+ </HStack>+ <Badge variant="secondary" className="ml-2">+ {c.employeeType}+ </Badge>+ </button>+ </DropdownMenuItem>+ </Form>+ );+ })}+ </DropdownMenuGroup>+ </DropdownMenuContent>+ </DropdownMenu>+ </>+ ) : (+ <BreadcrumbLink to="/">{routeData?.company.name}</BreadcrumbLink>+ )}+ </BreadcrumbItem>+ </>+ );+}++export default Breadcrumbs;diff --git a/apps/university/app/components/index.ts b/apps/university/app/components/index.tsnew file mode 100644index 0000000000..164b5bab4a--- /dev/null+++ b/apps/university/app/components/index.ts@@ -0,0 +1,4 @@+import Avatar from "./Avatar";+import Background from "./Background";++export { Avatar, Background };diff --git a/apps/university/app/entry.client.tsx b/apps/university/app/entry.client.tsxnew file mode 100644index 0000000000..0c91f0eeae--- /dev/null+++ b/apps/university/app/entry.client.tsx@@ -0,0 +1,40 @@+import {+ POSTHOG_API_HOST,+ POSTHOG_PROJECT_PUBLIC_KEY,+ VERCEL_URL,+} from "@carbon/auth";+import { OperatingSystemContextProvider } from "@carbon/react";+import { I18nProvider } from "@react-aria/i18n";+import { RemixBrowser } from "@remix-run/react";+import posthog from "posthog-js";+import { startTransition, useEffect } from "react";+import { hydrateRoot } from "react-dom/client";++function PosthogInit() {+ useEffect(() => {+ if (VERCEL_URL && !VERCEL_URL?.includes("localhost")) {+ posthog.init(POSTHOG_PROJECT_PUBLIC_KEY, {+ api_host: POSTHOG_API_HOST,+ autocapture: false,+ capture_pageview: false,+ });+ }+ }, []);+ return null;+}++startTransition(() => {+ hydrateRoot(+ document,+ <OperatingSystemContextProvider+ platform={window.navigator.userAgent.includes("Mac") ? "mac" : "windows"}+ >+ <I18nProvider+ locale={navigator.language ?? navigator.languages?.[0] ?? "en-US"}+ >+ <RemixBrowser />+ </I18nProvider>+ <PosthogInit />+ </OperatingSystemContextProvider>+ );+});diff --git a/apps/university/app/entry.server.tsx b/apps/university/app/entry.server.tsxnew file mode 100644index 0000000000..0cb74d5a84--- /dev/null+++ b/apps/university/app/entry.server.tsx@@ -0,0 +1,40 @@+import type { OperatingSystemPlatform } from "@carbon/react";+import { OperatingSystemContextProvider } from "@carbon/react";+import { I18nProvider } from "@react-aria/i18n";+import { RemixServer } from "@remix-run/react";+import type { EntryContext } from "@vercel/remix";+import { handleRequest } from "@vercel/remix";++import { parseAcceptLanguage } from "intl-parse-accept-language";++export default async function (+ request: Request,+ responseStatusCode: number,+ responseHeaders: Headers,+ remixContext: EntryContext+) {+ const acceptLanguage = request.headers.get("accept-language");+ const locales = parseAcceptLanguage(acceptLanguage, {+ validate: Intl.DateTimeFormat.supportedLocalesOf,+ });++ // get whether it's a mac or pc from the headers+ const platform: OperatingSystemPlatform = request.headers+ .get("user-agent")+ ?.includes("Mac")+ ? "mac"+ : "windows";+ let remixServer = (+ <OperatingSystemContextProvider platform={platform}>+ <I18nProvider locale={locales?.[0] ?? "en-US"}>+ <RemixServer context={remixContext} url={request.url} />+ </I18nProvider>+ </OperatingSystemContextProvider>+ );+ return handleRequest(+ request,+ responseStatusCode,+ responseHeaders,+ remixServer+ );+}diff --git a/apps/university/app/hooks/index.ts b/apps/university/app/hooks/index.tsnew file mode 100644index 0000000000..408d24c5e3--- /dev/null+++ b/apps/university/app/hooks/index.ts@@ -0,0 +1,9 @@+import {+ useOptimisticLocation,+ useRouteData,+ useUrlParams,+} from "@carbon/remix";+import { useMode } from "./useMode";+import { useUser } from "./useUser";++export { useMode, useOptimisticLocation, useRouteData, useUrlParams, useUser };diff --git a/apps/university/app/hooks/useMode.tsx b/apps/university/app/hooks/useMode.tsxnew file mode 100644index 0000000000..580d9fbd9e--- /dev/null+++ b/apps/university/app/hooks/useMode.tsx@@ -0,0 +1,32 @@+import { useRouteData } from "@carbon/remix";+import { useFetchers } from "@remix-run/react";+import type { Mode } from "~/types/validators";+import { modeValidator } from "~/types/validators";+import { path } from "~/utils/path";++export function useOptimisticMode() {+ const fetchers = useFetchers();+ const modeFetcher = fetchers.find((f) => f.formAction === "/");++ if (modeFetcher && modeFetcher.formData) {+ const mode = { mode: modeFetcher.formData.get("mode") };+ const submission = modeValidator.safeParse(mode);++ if (submission.success) {+ return submission.data.mode;+ }+ }+}++export function useMode() {+ const optimisticMode = useOptimisticMode();+ const routeData = useRouteData<{ mode: Mode }>(path.to.root);++ let mode = routeData?.mode ?? "dark";++ if (optimisticMode && optimisticMode !== "system") {+ mode = optimisticMode;+ }++ return mode;+}diff --git a/apps/university/app/hooks/useUser.tsx b/apps/university/app/hooks/useUser.tsxnew file mode 100644index 0000000000..abdb30f14b--- /dev/null+++ b/apps/university/app/hooks/useUser.tsx@@ -0,0 +1,62 @@+import { useRouteData } from "@carbon/remix";+import { path } from "~/utils/path";++type PersonalData = {+ id: string;+ email: string;+ firstName: string;+ lastName: string;+ avatarUrl: string | null;+};++type Company = {+ id: string;+ name: string;+ logoLightIcon: string | null;+ logoDarkIcon: string | null;+ logoLight: string | null;+ logoDark: string | null;+};++type User = PersonalData & {+ company: Company;+};++export function useUser(): User {+ const data = useRouteData<{+ user: unknown;+ }>(path.to.authenticatedRoot);++ if (data?.user && isUser(data.user)) {+ return data.user;+ }++ // TODO: force logout -- the likely cause is development changes+ throw new Error(+ "useUser must be used within an authenticated route. If you are seeing this error, you are likely in development and have changed the session variables. Try deleting the cookies."+ );+}++function isUser(value: any): value is User {+ return (+ typeof value.id === "string" &&+ typeof value.email === "string" &&+ typeof value.firstName === "string" &&+ typeof value.lastName === "string" &&+ "avatarUrl" in value+ );+}++export function useOptionalUser() {+ const data = useRouteData<{+ user: unknown;+ }>(path.to.authenticatedRoot);++ console.log(data);++ if (data?.user && isUser(data.user)) {+ return data.user;+ }++ return null;+}diff --git a/apps/university/app/root.tsx b/apps/university/app/root.tsxnew file mode 100644index 0000000000..38c79f59cc--- /dev/null+++ b/apps/university/app/root.tsx@@ -0,0 +1,219 @@+import { error, getBrowserEnv } from "@carbon/auth";+import { getSessionFlash } from "@carbon/auth/session.server";+import { validator } from "@carbon/form";+import { Button, Heading, toast, Toaster } from "@carbon/react";+import type { Theme } from "@carbon/utils";+import { themes } from "@carbon/utils";+import {+ isRouteErrorResponse,+ Links,+ Meta,+ Outlet,+ Scripts,+ ScrollRestoration,+ useLoaderData,+ useRouteError,+} from "@remix-run/react";+import { Analytics } from "@vercel/analytics/react";+import type {+ ActionFunctionArgs,+ LoaderFunctionArgs,+ MetaFunction,+} from "@vercel/remix";+import { json } from "@vercel/remix";+import React, { useEffect } from "react";+import { getMode, setMode } from "~/services/mode.server";+import Background from "~/styles/background.css?url";+import NProgress from "~/styles/nprogress.css?url";+import Tailwind from "~/styles/tailwind.css?url";++import { useMode } from "./hooks/useMode";+import { getTheme } from "./services/theme.server";+import { modeValidator } from "./types/validators";++export const config = { runtime: "edge", regions: ["iad1"] };++export function links() {+ return [+ { rel: "stylesheet", href: Tailwind },+ { rel: "stylesheet", href: Background },+ { rel: "stylesheet", href: NProgress },+ ];+}++export const meta: MetaFunction = () => {+ return [+ {+ title: "Carbon | Starter",+ },+ ];+};++export async function loader({ request }: LoaderFunctionArgs) {+ const {+ POSTHOG_API_HOST,+ POSTHOG_PROJECT_PUBLIC_KEY,+ SUPABASE_URL,+ SUPABASE_ANON_KEY,+ } = getBrowserEnv();++ const sessionFlash = await getSessionFlash(request);++ return json(+ {+ env: {+ POSTHOG_API_HOST,+ POSTHOG_PROJECT_PUBLIC_KEY,+ SUPABASE_URL,+ SUPABASE_ANON_KEY,+ },+ mode: getMode(request),+ theme: getTheme(request),+ result: sessionFlash?.result,+ },+ {+ headers: sessionFlash?.headers,+ }+ );+}++export async function action({ request }: ActionFunctionArgs) {+ const validation = await validator(modeValidator).validate(+ await request.formData()+ );++ if (validation.error) {+ return json(error(validation.error, "Invalid mode"), {+ status: 400,+ });+ }++ return json(+ {},+ {+ headers: { "Set-Cookie": setMode(validation.data.mode) },+ }+ );+}++function Document({+ children,+ title = "Carbon",+ mode = "light",+ theme = "blue",+}: {+ children: React.ReactNode;+ title?: string;+ mode?: "light" | "dark";+ theme?: string;+}) {+ const selectedTheme = themes.find((t) => t.name === theme) as+ | Theme+ | undefined;++ // Create style objects for both light and dark modes+ const lightVars: Record<string, string> = {};+ const darkVars: Record<string, string> = {};++ if (selectedTheme) {+ // Set light mode variables+ Object.entries(selectedTheme.cssVars.light).forEach(([key, value]) => {+ const cssKey = `--${key}`;+ lightVars[cssKey] = `${value}`;+ });++ // Set dark mode variables+ Object.entries(selectedTheme.cssVars.dark).forEach(([key, value]) => {+ const cssKey = `--${key}`;+ darkVars[cssKey] = `${value}`;+ });+ }++ // Combine the styles with proper selectors+ const themeStyle = {+ ...(mode === "dark" ? darkVars : lightVars),+ "--radius": "0.5rem",+ } as React.CSSProperties;++ return (+ <html+ lang="en"+ className={`${mode} h-full overflow-x-hidden`}+ style={themeStyle}+ >+ <head>+ <meta charSet="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <Meta />+ <title>{title}</title>+ <Links />+ </head>+ <body className="h-full bg-background antialiased selection:bg-primary/10 selection:text-primary">+ {children}+ <Toaster position="bottom-right" visibleToasts={5} />+ <ScrollRestoration />+ <Scripts />+ <Analytics />+ </body>+ </html>+ );+}++export default function App() {+ const loaderData = useLoaderData<typeof loader>();+ const env = loaderData?.env ?? {};+ const result = loaderData?.result;+ const theme = loaderData?.theme ?? "zinc";++ /* Toast Messages */+ useEffect(() => {+ if (result?.success === true) {+ toast.success(result.message);+ } else if (result?.message) {+ toast.error(result.message);+ }+ }, [result]);++ /* Dark/Light Mode */+ const mode = useMode();++ return (+ <Document mode={mode} theme={theme}>+ <Outlet />+ <script+ dangerouslySetInnerHTML={{+ __html: `window.env = ${JSON.stringify(env)}`,+ }}+ />+ </Document>+ );+}++export function ErrorBoundary() {+ const error = useRouteError();++ const message = isRouteErrorResponse(error)+ ? error.data.message ?? error.data+ : error instanceof Error+ ? error.message+ : String(error);++ return (+ <Document title="Error!">+ <div className="light">+ <div className="flex flex-col w-full h-screen items-center justify-center space-y-4 ">+ <img+ src="/carbon-logo-mark.svg"+ alt="Carbon Logo"+ className="block max-w-[60px]"+ />+ <Heading size="h1">Something went wrong</Heading>+ <p className="text-muted-foreground max-w-2xl">{message}</p>+ <Button onClick={() => (window.location.href = "/")}>+ Back Home+ </Button>+ </div>+ </div>+ </Document>+ );+}diff --git a/apps/university/app/routes/_auth+/_layout.tsx b/apps/university/app/routes/_auth+/_layout.tsxnew file mode 100644index 0000000000..a77998ff67--- /dev/null+++ b/apps/university/app/routes/_auth+/_layout.tsx@@ -0,0 +1,16 @@+import { VStack } from "@carbon/react";+import { Outlet } from "@remix-run/react";++export default function PublicRoute() {+ return (+ <div className="flex min-h-screen min-w-screen">+ <VStack+ spacing={8}+ className="items-center justify-start pt-[20vh] mx-auto max-w-lg z-[3]"+ >+ <Outlet />+ </VStack>+ {/* <Background /> */}+ </div>+ );+}diff --git a/apps/university/app/routes/_auth+/callback.tsx b/apps/university/app/routes/_auth+/callback.tsxnew file mode 100644index 0000000000..f3411f6855--- /dev/null+++ b/apps/university/app/routes/_auth+/callback.tsx@@ -0,0 +1,169 @@+import {+ assertIsPost,+ callbackValidator,+ carbonClient,+ error,+ getCarbonServiceRole,+} from "@carbon/auth";+import { refreshAccessToken } from "@carbon/auth/auth.server";+import { setCompanyId } from "@carbon/auth/company.server";+import {+ destroyAuthSession,+ flash,+ getAuthSession,+ setAuthSession,+} from "@carbon/auth/session.server";+import { getUserByEmail } from "@carbon/auth/users.server";+import { validator } from "@carbon/form";++import { Link, useFetcher, useLocation } from "@remix-run/react";+import type { ActionFunctionArgs, LoaderFunctionArgs } from "@vercel/remix";+import { json, redirect } from "@vercel/remix";+import { useEffect, useRef, useState } from "react";++import {+ Alert,+ AlertDescription,+ AlertTitle,+ Button,+ VStack,+} from "@carbon/react";+import { LuTriangleAlert } from "react-icons/lu";+import { path } from "~/utils/path";++export async function loader({ request }: LoaderFunctionArgs) {+ const authSession = await getAuthSession(request);++ if (authSession) await destroyAuthSession(request);++ return json({});+}++export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);++ const validation = await validator(callbackValidator).validate(+ await request.formData()+ );++ if (validation.error) {+ return json(error(validation.error, "Invalid callback form"), {+ status: 400,+ });+ }++ const { refreshToken, userId } = validation.data;+ const serviceRole = getCarbonServiceRole();+ const companies = await serviceRole+ .from("userToCompany")+ .select("companyId")+ .eq("userId", userId);++ const authSession = await refreshAccessToken(+ refreshToken,+ companies.data?.[0]?.companyId+ );++ if (!authSession) {+ return redirect(+ path.to.root,+ await flash(request, error(authSession, "Invalid refresh token"))+ );+ }++ const user = await getUserByEmail(authSession.email);++ if (user?.data) {+ const sessionCookie = await setAuthSession(request, {+ authSession,+ });+ const companyIdCookie = setCompanyId(authSession.companyId);+ return redirect(path.to.authenticatedRoot, {+ headers: [+ ["Set-Cookie", sessionCookie],+ ["Set-Cookie", companyIdCookie],+ ],+ });+ } else {+ return redirect(+ path.to.root,+ await flash(request, error(user.error, "User not found"))+ );+ }+}++export default function AuthCallback() {+ const fetcher = useFetcher<{}>();+ const isAuthenticating = useRef(false);+ const [error, setError] = useState<string | null>(null);++ const { hash } = useLocation();++ useEffect(() => {+ const hashParams = new URLSearchParams(hash.slice(1));+ const errorDescription = hashParams.get("error_description");+ if (errorDescription) {+ setError(decodeURIComponent(errorDescription.replace(/\+/g, " ")));+ }+ }, [hash]);++ useEffect(() => {+ const {+ data: { subscription },+ } = carbonClient.auth.onAuthStateChange((event, session) => {+ if (+ ["SIGNED_IN", "INITIAL_SESSION"].includes(event) &&+ !isAuthenticating.current+ ) {+ isAuthenticating.current = true;++ const refreshToken = session?.refresh_token;+ const userId = session?.user.id;++ if (!refreshToken || !userId) return;++ const formData = new FormData();+ formData.append("refreshToken", refreshToken);+ formData.append("userId", userId);++ fetcher.submit(formData, { method: "post" });+ }+ });++ return () => {+ subscription.unsubscribe();+ };+ }, [fetcher]);++ return (+ <div className="flex flex-col items-center justify-center">+ <div className="flex justify-center mb-4">+ <img src="/carbon-logo-mark.svg" alt="Carbon Logo" className="w-36" />+ </div>+ {error ? (+ <div className="rounded-lg md:bg-card md:border md:border-border md:shadow-lg p-8 mt-8 w-[380px]">+ <VStack spacing={4}>+ <Alert variant="destructive">+ <LuTriangleAlert className="h-4 w-4" />+ <AlertTitle>Error</AlertTitle>+ <AlertDescription>{error}</AlertDescription>+ </Alert>+ {error.includes("expired") && (+ <>+ <p className="text-sm text-muted-foreground">+ But don't worry. You can use the forgot password flow to+ request a new magic link.+ </p>+ <Button size="lg" asChild className="w-full">+ <Link to={path.to.login}>Login</Link>+ </Button>+ </>+ )}+ </VStack>+ </div>+ ) : (+ <p className="text-muted-foreground">Loading...</p>+ )}+ </div>+ );+}diff --git a/apps/university/app/routes/_auth+/healthcheck.tsx b/apps/university/app/routes/_auth+/healthcheck.tsxnew file mode 100644index 0000000000..a1f534da90--- /dev/null+++ b/apps/university/app/routes/_auth+/healthcheck.tsx@@ -0,0 +1,14 @@+import { getCarbonServiceRole } from "@carbon/auth";++export async function loader() {+ try {+ const client = getCarbonServiceRole();+ const test = await client.from("attributeDataType").select("*");+ if (test.error !== null) throw test.error;+ return new Response("OK");+ } catch (error: unknown) {+ // eslint-disable-next-line no-console+ console.log("healthcheck ❌", { error });+ return new Response("ERROR", { status: 500 });+ }+}diff --git a/apps/university/app/routes/_auth+/login.tsx b/apps/university/app/routes/_auth+/login.tsxnew file mode 100644index 0000000000..8d9830f0d4--- /dev/null+++ b/apps/university/app/routes/_auth+/login.tsx@@ -0,0 +1,233 @@+import {+ assertIsPost,+ carbonClient,+ error,+ magicLinkValidator,+} from "@carbon/auth";+import { sendMagicLink, verifyAuthSession } from "@carbon/auth/auth.server";+import { flash, getAuthSession } from "@carbon/auth/session.server";+import { getUserByEmail } from "@carbon/auth/users.server";+import { Hidden, Input, Submit, ValidatedForm, validator } from "@carbon/form";+import { redis } from "@carbon/kv";+import {+ Alert,+ AlertDescription,+ AlertTitle,+ Button,+ Separator,+ toast,+ VStack,+} from "@carbon/react";+import { useFetcher, useSearchParams } from "@remix-run/react";+import { Ratelimit } from "@upstash/ratelimit";+import type {+ ActionFunctionArgs,+ LoaderFunctionArgs,+ MetaFunction,+} from "@vercel/remix";+import { json, redirect } from "@vercel/remix";+import { LuCircleAlert, LuMailCheck } from "react-icons/lu";++import { path } from "~/utils/path";++export const meta: MetaFunction = () => {+ return [{ title: "Carbon | Login" }];+};++export async function loader({ request }: LoaderFunctionArgs) {+ const authSession = await getAuthSession(request);+ if (authSession && (await verifyAuthSession(authSession))) {+ throw redirect(path.to.authenticatedRoot);+ }++ return null;+}++const ratelimit = new Ratelimit({+ redis,+ limiter: Ratelimit.slidingWindow(5, "1 h"), // 5 submissions per hour+ analytics: true,+});++export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);+ const ip = request.headers.get("x-forwarded-for") ?? "127.0.0.1";+ const { success } = await ratelimit.limit(ip);++ if (!success) {+ return json(+ error(null, "Rate limit exceeded"),+ await flash(request, error(null, "Rate limit exceeded"))+ );+ }++ const validation = await validator(magicLinkValidator).validate(+ await request.formData()+ );++ if (validation.error) {+ return json(error(validation.error, "Invalid email address"));+ }++ const { email } = validation.data;+ const user = await getUserByEmail(email);++ if (user.data && user.data.active) {+ const magicLink = await sendMagicLink(email);++ if (!magicLink) {+ return json(+ error(magicLink, "Failed to send magic link"),+ await flash(request, error(magicLink, "Failed to send magic link"))+ );+ }+ } else {+ return json(+ error(user, "User record not found"),+ await flash(request, error(user.error, "User record not found"))+ );+ }++ return json({ success: true });+}++export default function LoginRoute() {+ const [searchParams] = useSearchParams();+ const redirectTo = searchParams.get("redirectTo") ?? undefined;++ const fetcher = useFetcher<+ { success: true } | { success: false; message: string }+ >();++ const onSignInWithGoogle = async () => {+ const { error } = await carbonClient.auth.signInWithOAuth({+ provider: "google",+ options: {+ redirectTo: `${window.location.origin}/callback${+ redirectTo ? `?redirectTo=${redirectTo}` : ""+ }`,+ },+ });++ if (error) {+ toast.error(error.message);+ }+ };++ return (+ <>+ <div className="flex justify-center mb-4">+ <img src="/carbon-logo-mark.svg" alt="Carbon Logo" className="w-36" />+ </div>+ <div className="rounded-lg md:bg-card md:border md:border-border md:shadow-lg p-8 w-[380px]">+ {fetcher.data?.success === true ? (+ <>+ <VStack spacing={4} className="items-center justify-center">+ <LuMailCheck className="size-24" />++ <h2 className="text-2xl font-semibold tracking-tight mb-2">+ Check your email+ </h2>+ <p className="text-muted-foreground text-center text-balance">+ We've sent you a magic link to sign in to your account.+ </p>+ </VStack>+ </>+ ) : (+ <ValidatedForm+ fetcher={fetcher}+ validator={magicLinkValidator}+ defaultValues={{ redirectTo }}+ method="post"+ >+ <Hidden name="redirectTo" value={redirectTo} type="hidden" />+ <VStack spacing={4}>+ {fetcher.data?.success === false && fetcher.data?.message && (+ <Alert variant="destructive">+ <LuCircleAlert className="w-4 h-4" />+ <AlertTitle>Authentication Error</AlertTitle>+ <AlertDescription>{fetcher.data?.message}</AlertDescription>+ </Alert>+ )}++ <Input name="email" label="" placeholder="Email Address" />++ <Submit+ isDisabled={fetcher.state !== "idle"}+ isLoading={fetcher.state === "submitting"}+ size="lg"+ className="w-full"+ withBlocker={false}+ >+ Continue with Email+ </Submit>+ <Separator />+ <Button+ type="button"+ size="lg"+ className="w-full"+ onClick={onSignInWithGoogle}+ isDisabled={fetcher.state !== "idle"}+ variant="secondary"+ leftIcon={<GoogleIcon />}+ >+ Continue with Google+ </Button>+ </VStack>+ </ValidatedForm>+ )}+ </div>+ <div className="text-sm text-center text-balance text-muted-foreground w-[380px] mt-4">+ <p>+ By signing in, you agree to the{" "}+ <a+ href="https://carbon.ms/terms"+ target="_blank"+ rel="noreferrer"+ className="underline"+ >+ Terms of Service+ </a>{" "}+ and{" "}+ <a+ href="https://carbon.ms/privacy"+ target="_blank"+ rel="noreferrer"+ className="underline"+ >+ Privacy Policy.+ </a>+ </p>+ </div>+ </>+ );+}++function GoogleIcon(props: React.SVGProps<SVGSVGElement>) {+ return (+ <svg+ height="16"+ strokeLinejoin="round"+ viewBox="0 0 16 16"+ width="16"+ {...props}+ >+ <path+ d="M8.15991 6.54543V9.64362H12.4654C12.2763 10.64 11.709 11.4837 10.8581 12.0509L13.4544 14.0655C14.9671 12.6692 15.8399 10.6182 15.8399 8.18188C15.8399 7.61461 15.789 7.06911 15.6944 6.54552L8.15991 6.54543Z"+ fill="#4285F4"+ ></path>+ <path+ d="M3.6764 9.52268L3.09083 9.97093L1.01807 11.5855C2.33443 14.1963 5.03241 16 8.15966 16C10.3196 16 12.1305 15.2873 13.4542 14.0655L10.8578 12.0509C10.1451 12.5309 9.23598 12.8219 8.15966 12.8219C6.07967 12.8219 4.31245 11.4182 3.67967 9.5273L3.6764 9.52268Z"+ fill="#34A853"+ ></path>+ <path+ d="M1.01803 4.41455C0.472607 5.49087 0.159912 6.70543 0.159912 7.99995C0.159912 9.29447 0.472607 10.509 1.01803 11.5854C1.01803 11.5926 3.6799 9.51991 3.6799 9.51991C3.5199 9.03991 3.42532 8.53085 3.42532 7.99987C3.42532 7.46889 3.5199 6.95983 3.6799 6.47983L1.01803 4.41455Z"+ fill="#FBBC05"+ ></path>+ <path+ d="M8.15982 3.18545C9.33802 3.18545 10.3853 3.59271 11.2216 4.37818L13.5125 2.0873C12.1234 0.792777 10.3199 0 8.15982 0C5.03257 0 2.33443 1.79636 1.01807 4.41455L3.67985 6.48001C4.31254 4.58908 6.07983 3.18545 8.15982 3.18545Z"+ fill="#EA4335"+ ></path>+ </svg>+ );+}diff --git a/apps/university/app/routes/_auth+/logout.tsx b/apps/university/app/routes/_auth+/logout.tsxnew file mode 100644index 0000000000..53cc2b12b6--- /dev/null+++ b/apps/university/app/routes/_auth+/logout.tsx@@ -0,0 +1,16 @@+import { assertIsPost } from "@carbon/auth";+import { destroyAuthSession } from "@carbon/auth/session.server";+import type { ActionFunctionArgs } from "@vercel/remix";+import { redirect } from "@vercel/remix";++import { path } from "~/utils/path";++export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);++ return destroyAuthSession(request);+}++export async function loader() {+ throw redirect(path.to.root);+}diff --git a/apps/university/app/routes/_auth+/refresh-session.tsx b/apps/university/app/routes/_auth+/refresh-session.tsxnew file mode 100644index 0000000000..d3eed92acd--- /dev/null+++ b/apps/university/app/routes/_auth+/refresh-session.tsx@@ -0,0 +1,42 @@+import { assertIsPost } from "@carbon/auth";+import { setCompanyId } from "@carbon/auth/company.server";+import {+ refreshAuthSession,+ setAuthSession,+} from "@carbon/auth/session.server";+import { useNavigate } from "@remix-run/react";+import type { ActionFunctionArgs } from "@vercel/remix";+import { json, redirect } from "@vercel/remix";++import { path } from "~/utils/path";++export async function loader() {+ throw redirect(path.to.authenticatedRoot);+}++export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);++ const authSession = await refreshAuthSession(request);++ const sessionCookie = await setAuthSession(request, {+ authSession,+ });+ const companyIdCookie = setCompanyId(authSession.companyId);++ return json(+ { success: true },+ {+ headers: [+ ["Set-Cookie", sessionCookie],+ ["Set-Cookie", companyIdCookie],+ ],+ }+ );+}++export function ErrorBoundary() {+ const navigate = useNavigate();+ navigate(path.to.authenticatedRoot);+ return null;+}diff --git a/apps/university/app/routes/_auth+/request-access.tsx b/apps/university/app/routes/_auth+/request-access.tsxnew file mode 100644index 0000000000..030c44f279--- /dev/null+++ b/apps/university/app/routes/_auth+/request-access.tsx@@ -0,0 +1,38 @@+import { getAppUrl } from "@carbon/auth";+import { Button } from "@carbon/react";+import { SUPPORT_EMAIL } from "@carbon/utils";+import type { MetaFunction } from "@vercel/remix";++export const meta: MetaFunction = () => {+ return [+ {+ title: "Carbon Developers | Request Access",+ },+ ];+};++export default function RequestAccessRoute() {+ return (+ <>+ <div className="flex flex-col items-center justify-center">+ <img+ src="/carbon-logo-mark.svg"+ alt="Carbon Logo"+ className="w-36 mb-3"+ />++ <h3 className="font-mono font-bold leading-loose uppercase text-xl">+ Developers+ </h3>+ </div>+ <div className="rounded-lg bg-card flex flex-col gap-4 border border-border shadow-lg p-8 w-[380px]">+ <p>+ Request access to the developer portal by emailing {SUPPORT_EMAIL}+ </p>+ <Button size="lg" asChild>+ <a href={getAppUrl()}>Return to App</a>+ </Button>+ </div>+ </>+ );+}diff --git a/apps/university/app/routes/_index.tsx b/apps/university/app/routes/_index.tsxnew file mode 100644index 0000000000..fb45dc88dd--- /dev/null+++ b/apps/university/app/routes/_index.tsx@@ -0,0 +1,10 @@+import { useOptionalUser } from "~/hooks/useUser";++export default function IndexRoute() {+ const user = useOptionalUser();+ return (+ <p>+ Oops. You shouldn't see this page. Eventually it will be a landing page.+ </p>+ );+}diff --git a/apps/university/app/routes/_layout.tsx b/apps/university/app/routes/_layout.tsxnew file mode 100644index 0000000000..2ecdd52a5f--- /dev/null+++ b/apps/university/app/routes/_layout.tsx@@ -0,0 +1,62 @@+import { Outlet, useLoaderData, useNavigation } from "@remix-run/react";+import type { LoaderFunctionArgs } from "@vercel/remix";+import { json } from "@vercel/remix";+import NProgress from "nprogress";+import { useEffect } from "react";++import { CarbonProvider, getCarbon } from "@carbon/auth";+import { getAuthSession } from "@carbon/auth/session.server";++export async function loader({ request }: LoaderFunctionArgs) {+ const session = await getAuthSession(request);++ let user = null;++ console.log("session", session);++ if (session) {+ const client = getCarbon(session.accessToken);++ const authUser = await client+ .from("user")+ .select("*")+ .eq("id", session.userId)+ .single();++ console.log("authUser", authUser);++ if (authUser.data) {+ user = authUser.data;+ }+ }++ return json({ session, user });+}++export default function AuthenticatedRoute() {+ const { session } = useLoaderData<typeof loader>();++ const transition = useNavigation();++ /* NProgress */+ useEffect(() => {+ if (+ (transition.state === "loading" || transition.state === "submitting") &&+ !NProgress.isStarted()+ ) {+ NProgress.start();+ } else {+ NProgress.done();+ }+ }, [transition.state]);++ if (!session) {+ return <Outlet />;+ }++ return (+ <CarbonProvider session={session}>+ <Outlet />+ </CarbonProvider>+ );+}diff --git a/apps/university/app/routes/test+/_index.tsx b/apps/university/app/routes/test+/_index.tsxnew file mode 100644index 0000000000..d56e10f963--- /dev/null+++ b/apps/university/app/routes/test+/_index.tsx@@ -0,0 +1,38 @@+import { Heading, cn } from "@carbon/react";+import { getLocalTimeZone } from "@internationalized/date";+import { useLocale } from "@react-aria/i18n";+import { useMemo, type ComponentProps } from "react";+import { useUser } from "~/hooks";++export default function AppIndexRoute() {+ const user = useUser();+ const { locale } = useLocale();+ const date = new Date();++ const formatter = useMemo(+ () =>+ new Intl.DateTimeFormat(locale, {+ dateStyle: "full",+ timeZone: getLocalTimeZone(),+ }),+ [locale]+ );++ return (+ <div className="p-8 w-full h-full bg-muted">+ <Heading size="h3">Hello, {user.firstName}</Heading>+ <Subheading>{formatter.format(date)}</Subheading>+ <Hr />+ </div>+ );+}++const Hr = () => (+ <hr className="h-px my-8 bg-black/10 border-0 dark:bg-white/10" />+);++const Subheading = ({ children, className }: ComponentProps<"p">) => (+ <p className={cn("text-muted-foreground text-base font-light", className)}>+ {children}+ </p>+);diff --git a/apps/university/app/routes/test+/_layout.tsx b/apps/university/app/routes/test+/_layout.tsxnew file mode 100644index 0000000000..5c39520226--- /dev/null+++ b/apps/university/app/routes/test+/_layout.tsx@@ -0,0 +1,20 @@+import { Outlet } from "@remix-run/react";+import type { LoaderFunctionArgs } from "@vercel/remix";+import { redirect } from "@vercel/remix";++import { getAuthSession } from "@carbon/auth/session.server";+import { path } from "~/utils/path";++export async function loader({ request }: LoaderFunctionArgs) {+ const session = await getAuthSession(request);++ if (!session) {+ throw redirect(path.to.login);+ }++ return null;+}++export default function AuthenticatedRoute() {+ return <Outlet />;+}diff --git a/apps/university/app/services/mode.server.ts b/apps/university/app/services/mode.server.tsnew file mode 100644index 0000000000..c5f8184432--- /dev/null+++ b/apps/university/app/services/mode.server.ts@@ -0,0 +1,26 @@+import { DOMAIN } from "@carbon/auth";+import * as cookie from "cookie";+import type { Mode } from "~/types/validators";++const cookieName = "mode";++export function getMode(request: Request): Mode | null {+ const cookieHeader = request.headers.get("cookie");+ const parsed = cookieHeader+ ? cookie.parse(cookieHeader)[cookieName]+ : "light";+ if (parsed === "light" || parsed === "dark") return parsed;+ return null;+}++export function setMode(mode: Mode | "system") {+ if (mode === "system") {+ return cookie.serialize(cookieName, "", { path: "/", maxAge: -1 });+ } else {+ return cookie.serialize(cookieName, mode, {+ path: "/",+ maxAge: 31536000,+ domain: DOMAIN,+ });+ }+}diff --git a/apps/university/app/services/theme.server.ts b/apps/university/app/services/theme.server.tsnew file mode 100644index 0000000000..04a5b534c9--- /dev/null+++ b/apps/university/app/services/theme.server.ts@@ -0,0 +1,26 @@+import * as cookie from "cookie";++const cookieName = "theme";+const themes = [+ "zinc",+ "neutral",+ "red",+ "rose",+ "green",+ "blue",+ "yellow",+ "orange",+ "violet",+] as const;+type Theme = (typeof themes)[number];++export function getTheme(request: Request): Theme {+ const cookieHeader = request.headers.get("cookie");+ const parsed = cookieHeader ? cookie.parse(cookieHeader)[cookieName] : "blue";+ if (themes.includes(parsed as Theme)) return parsed as Theme;+ return "blue";+}++export function setTheme(theme: string) {+ return cookie.serialize(cookieName, theme, { path: "/", maxAge: 31536000 });+}diff --git a/apps/university/app/styles/background.css b/apps/university/app/styles/background.cssnew file mode 100644index 0000000000..0d626c7625--- /dev/null+++ b/apps/university/app/styles/background.css@@ -0,0 +1,68 @@+/* Credit: https://cmdk.paco.me/ */++.background {+ width: 100vw;+ min-height: 100vh;+ position: fixed;+ display: flex;+ justify-content: center;+ padding: 120px 24px 160px 24px;+ pointer-events: none;+}++.background:before {+ background: radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%);+ position: absolute;+ content: "";+ z-index: 2;+ width: 100%;+ height: 100%;+ top: 0;+}++.dark .background:before {+ background: radial-gradient(circle, rgba(2, 0, 36, 0) 0, #161616 100%);+}++.background:after {+ content: "";+ background-image: url("/grid.svg");+ z-index: 1;+ position: absolute;+ width: 100%;+ height: 100%;+ top: 0;+ opacity: 0.4;+ filter: invert(1);+}++.gradient {+ height: fit-content;+ z-index: 3;+ width: 100%;+ max-width: 640px;+ background-image: radial-gradient(+ at 27% 37%,+ hsla(215, 98%, 61%, 1) 0px,+ transparent 0%+ ),+ radial-gradient(at 97% 21%, hsla(125, 60%, 72%, 1) 0px, transparent 55%),+ radial-gradient(at 52% 99%, hsla(354, 40%, 61%, 1) 0px, transparent 55%),+ radial-gradient(at 10% 29%, hsla(256, 50%, 67%, 1) 0px, transparent 55%),+ radial-gradient(at 97% 96%, hsla(38, 40%, 74%, 1) 0px, transparent 55%),+ radial-gradient(at 33% 50%, hsla(222, 60%, 73%, 1) 0px, transparent 55%),+ radial-gradient(at 79% 53%, hsla(343, 20%, 79%, 1) 0px, transparent 55%);+ position: absolute;+ content: "";+ width: 100%;+ height: 100%;+ filter: blur(100px) saturate(150%);+ top: 80px;+ opacity: 0.15;+}++@media screen and (max-width: 640px) {+ .content {+ display: none;+ }+}diff --git a/apps/university/app/styles/docs.css b/apps/university/app/styles/docs.cssnew file mode 100644index 0000000000..c0bda68f30--- /dev/null+++ b/apps/university/app/styles/docs.css@@ -0,0 +1,1592 @@+.Code {+ width: 100%;+}++.Code .prism-code {+ margin: 0;+ padding: 0.25rem;+ background-color: none;+ white-space: normal;+ word-break: break-word;+}++.Code .token-line {+ font-size: 0.875rem;+ line-height: 1.25rem;+}++.Code .token.function,+.Code .token.imports,+.Code .token.keyword.module,+.Code .token.property-access {+ --tw-text-opacity: 1 !important;+}++.Code .token.function,+.Code .token.keyword.module {+ font-style: normal !important;+}++.Code .token.console.class-name,+.Code .token.doc-comment.optional-parameter,+.Code .token.doc-comment.optional-parameter.punctuation,+.Code .token.doc-comment.parameter,+.Code .token.doc-comment.parameter.punctuation,+.Code .token.operator,+.Code .token.parameter,+.Code .token.plain,+.Code .token.punctuation {+ font-style: normal !important;+ --tw-text-opacity: 1 !important;+}++.Code .token.doc-comment.keyword,+.Code .token.keyword {+ font-style: normal !important;+}++.Code .token.string {+ font-style: normal !important;+ --tw-text-opacity: 1 !important;+}++.Code .token.constant {+ font-style: normal !important;+}++.Code .token.comment {+ font-style: normal !important;+ --tw-text-opacity: 1 !important;+}++.Code .token.number {+ --tw-text-opacity: 1 !important;+}++.Code .token.boolean,+.Code .token.doc-comment.class-name {+ --tw-text-opacity: 1;+}++.Code .codeBlock {+ margin-bottom: 0;+ overflow: hidden;+ overflow-wrap: break-word;+ white-space: pre-wrap;+}++.Code.codeBlockWrapper {+ position: relative;+}++.Code.codeBlockWrapper:hover .buttonContainer {+ visibility: visible;+ opacity: 1;+}++.Code .buttonContainer {+ right: 5px;+ top: 5px;+ opacity: 0;+ position: absolute;+ visibility: hidden;+ transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,+ bottom 0.2s ease-in-out;+}++.Code .buttonContainer button {+ border-radius: 0.25rem;+ font-size: 0.75rem;+ line-height: 1rem;+ background: #011627;+ border: 1px solid #d6deeb;+ color: #d6deeb;+ cursor: pointer;+ line-height: 12px;+ outline: none;+ padding: 4px 8px;+}++.Code.codeBlockWrapper .sbui-btn-container {+ position: absolute;+ top: 2px;+ right: 3px;+ visibility: hidden;+ opacity: 0;+}++.Code.codeBlockWrapper:hover .sbui-btn-container {+ visibility: visible;+ opacity: 1;+}++.CustomCodeBlock {+ width: 100%;+}++.CustomCodeBlock .code-with-header pre {+ border-radius: 0 0 4px 4px;+}++.CustomCodeBlock .code-with-response pre {+ border-radius: 0;+}++.CustomCodeBlock .code-header {+ color: #ccc;+ padding: 5px 15px;+ border-radius: 4px 4px 0 0;+ font-size: 0.8rem;+ font-weight: 700;+ border-bottom: 1px solid #444;+}++.FunctionBlock h4 {+ margin-top: 36px;+ margin-bottom: 12px;+}++.FunctionBlock p {+ margin-top: 0;+ margin-bottom: 24px;+}++.Docs--inner-wrapper {+ background: linear-gradient(+ 90deg,+ hsl(var(--background)) 50%,+ hsl(var(--muted)) 50%+ );+ width: 100%;+}++.dark .Docs--inner-wrapper {+ background: linear-gradient(+ 90deg,+ hsl(var(--background)) 50%,+ hsl(var(--card)) 50%+ );+}++.Docs .doc-heading {+ font-weight: bold;+ margin-top: 1rem;+ width: 50%;+ padding-left: 1.5rem;+ padding-right: 1.5rem;+ text-transform: capitalize;+ --tw-text-opacity: 1;++ -webkit-hyphens: auto;+ hyphens: auto;+ max-width: 50%;+}++.Docs .doc-section {+ display: flex;+ border-bottom-width: 1px;+ --tw-border-opacity: 1;+ border-color: hsl(var(--border) / var(--tw-border-opacity));+}++.Docs.Docs--table-editor .doc-section--introduction .text {+ width: 85%;+}++.Docs.Docs--table-editor .doc-section--client-libraries {+ flex-direction: column;+ margin-bottom: 40px;+}++.Docs.Docs--table-editor .doc-section--client-libraries .code,+.Docs.Docs--table-editor .doc-section--client-libraries .text {+ width: 100%;+ max-width: none;+}++.Docs.Docs--table-editor .doc-section--client-libraries .code {+ margin-bottom: 20px;+}++.Docs .doc-section article:first-child {+ color: var(--tw-prose-body);+ max-width: 65ch;+}++.Docs+ .doc-section+ article:first-child+ :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.25em;+ margin-bottom: 1.25em;+ font-weight: 400;+}++.Docs+ .doc-section+ article:first-child+ :where([class~="lead"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: var(--tw-prose-lead);+ font-size: 1.25em;+ line-height: 1.6;+ margin-top: 1.2em;+ margin-bottom: 1.2em;+}++.Docs+ .doc-section+ article:first-child+ :where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ text-decoration: underline;+ font-weight: 400;+ position: relative;+ transition: all 0.18s ease;+ padding-bottom: 2px;+ opacity: 1;+ text-decoration-line: underline;+ text-decoration-color: hsl(var(--muted-foreground));+ text-decoration-thickness: 1px;+ text-underline-offset: 2px;+}++.Docs+ .doc-section+ article:first-child+ :where(strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-bold);+ font-weight: 600;+}++.Docs+ .doc-section+ article:first-child+ :where(a strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote strong):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th strong):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(ol):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ list-style-type: none;+ margin-top: 1.25em;+ margin-bottom: 3rem;+ padding-left: 1rem;+ counter-reset: item;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="A"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: upper-alpha;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="a"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: lower-alpha;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="A s"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: upper-alpha;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="a s"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: lower-alpha;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="I"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: upper-roman;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="i"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: lower-roman;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="I s"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: upper-roman;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="i s"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: lower-roman;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="1"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: decimal;+}++.Docs+ .doc-section+ article:first-child+ :where(ul):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ list-style-type: none;+ margin-top: 1.25em;+ margin-bottom: 1.25em;+ padding-left: 1rem;+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ )::marker {+ font-weight: 400;+ color: var(--tw-prose-counters);+}++.Docs+ .doc-section+ article:first-child+ :where(ul > li):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ )::marker {+ color: var(--tw-prose-bullets);+}++.Docs+ .doc-section+ article:first-child+ :where(dt):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 600;+ margin-top: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-color: var(--tw-prose-hr);+ border-top-width: 1px;+ margin-top: 3em;+ margin-bottom: 3em;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 500;+ font-style: italic;+ color: var(--tw-prose-quotes);+ border-left-width: 0.25rem;+ border-left-color: var(--tw-prose-quote-borders);+ quotes: "\201C""\201D""\2018""\2019";+ margin-top: 1.6em;+ margin-bottom: 1.6em;+ padding-left: 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote p:first-of-type):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ content: open-quote;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote p:last-of-type):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):after {+ content: close-quote;+}++.Docs+ .doc-section+ article:first-child+ :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 800;+ font-size: 2.25em;+ margin-bottom: 0.8888889em;+ line-height: 1.1111111;+}++.Docs+ .doc-section+ article:first-child+ :where(h1 strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 900;+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 700;+ font-size: 1.5em;+ margin-top: 2em;+ margin-bottom: 1em;+ line-height: 1.3333333;+}++.Docs+ .doc-section+ article:first-child+ :where(h2 strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 800;+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 600;+ font-size: 1.25em;+ margin-top: 1.6em;+ margin-bottom: 0.6em;+ line-height: 1.6;+}++.Docs+ .doc-section+ article:first-child+ :where(h3 strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 700;+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 600;+ margin-top: 1.5em;+ margin-bottom: 0.5em;+ line-height: 1.5;+ font-size: 1.15em;+}++.Docs+ .doc-section+ article:first-child+ :where(h4 strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 700;+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 2em;+ margin-bottom: 2em;+}++.Docs+ .doc-section+ article:first-child+ :where(picture):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ display: block;+ margin-top: 2em;+ margin-bottom: 2em;+}++.Docs+ .doc-section+ article:first-child+ :where(kbd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 500;+ font-family: inherit;+ color: var(--tw-prose-kbd);+ box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),+ 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);+ font-size: 0.875em;+ padding: 0.1875em 0.375em;+}++.Docs+ .doc-section+ article:first-child+ :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-code);+ font-weight: 400;+ font-size: 0.875em;+ padding: 0.2rem 0.4rem;+ background-color: hsl(var(--muted));+ border: 1px solid hsl(var(--muted));+ border-radius: 0.5rem;+}++.Docs+ .doc-section+ article:first-child+ :where(code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ content: "";+}++.Docs+ .doc-section+ article:first-child+ :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)):after {+ content: "";+}++.Docs+ .doc-section+ article:first-child+ :where(a code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h1 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h2 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+ font-size: 0.875em;+}++.Docs+ .doc-section+ article:first-child+ :where(h3 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+ font-size: 0.9em;+}++.Docs+ .doc-section+ article:first-child+ :where(h4 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-pre-code);+ background-color: var(--tw-prose-pre-bg);+ overflow-x: auto;+ font-weight: 400;+ font-size: 0.875em;+ line-height: 1.7142857;+ margin-top: 1.7142857em;+ margin-bottom: 32px;+ border-radius: 0.375rem;+ background: none;+ padding: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(pre code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ background-color: transparent;+ border-width: 0;+ border-radius: 0;+ padding: 0;+ font-weight: inherit;+ color: inherit;+ font-size: inherit;+ font-family: inherit;+ line-height: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(pre code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ content: none;+}++.Docs+ .doc-section+ article:first-child+ :where(pre code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):after {+ content: none;+}++.Docs+ .doc-section+ article:first-child+ :where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ width: 100%;+ table-layout: auto;+ text-align: left;+ margin-top: 2em;+ margin-bottom: 2em;+ font-size: 0.875em;+ line-height: 1.7142857;+}++.Docs+ .doc-section+ article:first-child+ :where(thead):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-bottom-width: 1px;+ border-bottom-color: var(--tw-prose-th-borders);+}++.Docs+ .doc-section+ article:first-child+ :where(thead th):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 600;+ vertical-align: bottom;+ padding-right: 0.5714286em;+ padding-bottom: 0.5714286em;+ padding-left: 0.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody tr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-bottom-width: 1px;+ border-bottom-color: var(--tw-prose-td-borders);+}++.Docs+ .doc-section+ article:first-child+ :where(tbody tr:last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ border-bottom-width: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ vertical-align: baseline;+}++.Docs+ .doc-section+ article:first-child+ :where(tfoot):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-top-width: 1px;+ border-top-color: var(--tw-prose-th-borders);+}++.Docs+ .doc-section+ article:first-child+ :where(tfoot td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ vertical-align: top;+}++.Docs+ .doc-section+ article:first-child+ :where(figcaption):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: hsl(var(--muted-foreground));+ font-size: 0.875em;+ line-height: 1.4285714;+ margin-top: 0.8571429em;+ font-family: Office Code Pro, monospace;+}++.Docs .doc-section article:first-child {+ --tw-prose-links: hsl(var(--foreground));+ --tw-prose-kbd: #111827;+ --tw-prose-kbd-shadows: 17 24 39;+ --tw-prose-invert-kbd: #fff;+ --tw-prose-invert-kbd-shadows: 255 255 255;+ --tw-prose-invert-code: #fff;+ --tw-prose-invert-pre-code: #d1d5db;+ --tw-prose-invert-pre-bg: rgba(0, 0, 0, 0.5);+ --tw-prose-invert-th-borders: #4b5563;+ --tw-prose-invert-td-borders: #374151;+ font-size: 1rem;+ line-height: 1.75;+}++.Docs+ .doc-section+ article:first-child+ :where(video):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 2em;+ margin-bottom: 2em;+}++.Docs+ .doc-section+ article:first-child+ :where(li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0.5em;+ margin-bottom: 0.5em;+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-left: 0.375em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-left: 0.375em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li p):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0.75em;+ margin-bottom: 0.75em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ol > li > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ol > li > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul ul, ul ol, ol ul, ol ol):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0.75em;+ margin-bottom: 0.75em;+}++.Docs+ .doc-section+ article:first-child+ :where(dl):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.25em;+ margin-bottom: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(dd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0.5em;+ padding-left: 1.625em;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td, tfoot td):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding: 0.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(figure):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin: 3rem 0;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(h5):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--colors-scale12);+}++.Docs+ .doc-section+ article:first-child+ :where(h1, h2, h3, h4, h5, h6):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ font-weight: 400;+}++.Docs+ .doc-section+ article:first-child+ :where(article h2, article h3, article h4, article h5, article h6):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 2em;+ margin-bottom: 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ position: relative;+}++.Docs+ .doc-section+ article:first-child+ :where(ul li):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ position: absolute;+ top: 0.75rem;+ left: -1rem;+ height: 0.125rem;+ width: 0.5rem;+ border-radius: 0.25rem;+ background-color: hsl(var(--border));+ content: "";+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ display: block;+ position: relative;+ padding-left: 1rem;+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ position: absolute;+ top: 0.25rem;+ left: -1rem;+ height: 1.2rem;+ width: 1.2rem;+ border-radius: 0.25rem;+ background-color: hsl(var(--background));+ border: 1px solid hsl(var(--border));+ content: counter(item) " ";+ counter-increment: item;+ font-size: 12px;+ color: hsl(var(--muted-foreground));+ display: flex;+ align-items: center;+ justify-content: center;+}++.Docs+ .doc-section+ article:first-child+ :where(p img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border: 1px solid hsl(var(--border));+ border-radius: 4px;+ overflow: hidden;+}++.Docs+ .doc-section+ article:first-child+ :where(iframe):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border: 1px solid hsl(var(--border) / 0.9);+ border-radius: 0.5rem;+}++.Docs+ .doc-section+ article:first-child+ :where(td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-bottom: 1px solid hsl(var(--muted));+}++.Docs+ .doc-section+ article:first-child+ :where(a:hover):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+}++.Docs+ .doc-section+ article:first-child+ :where(figure.quote-figure p:first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(figure.quote-figure p:last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(figure img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin: 0;+}++.Docs .doc-section article:first-child {+ font-size: 0.875rem;+ line-height: 1.7142857;+}++.Docs+ .doc-section+ article:first-child+ :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+ margin-bottom: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where([class~="lead"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ font-size: 1.2857143em;+ line-height: 1.5555556;+ margin-top: 0.8888889em;+ margin-bottom: 0.8888889em;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.3333333em;+ margin-bottom: 1.3333333em;+ padding-left: 1.1111111em;+}++.Docs+ .doc-section+ article:first-child+ :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 2.1428571em;+ margin-top: 0;+ margin-bottom: 0.8em;+ line-height: 1.2;+}++.Docs+ .doc-section+ article:first-child+ :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 1.4285714em;+ margin-top: 1.6em;+ margin-bottom: 0.8em;+ line-height: 1.4;+}++.Docs+ .doc-section+ article:first-child+ :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 1.2857143em;+ margin-top: 1.5555556em;+ margin-bottom: 0.4444444em;+ line-height: 1.5555556;+}++.Docs+ .doc-section+ article:first-child+ :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.4285714em;+ margin-bottom: 0.5714286em;+ line-height: 1.4285714;+}++.Docs+ .doc-section+ article:first-child+ :where(img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.7142857em;+ margin-bottom: 1.7142857em;+}++.Docs+ .doc-section+ article:first-child+ :where(picture):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.7142857em;+ margin-bottom: 1.7142857em;+}++.Docs+ .doc-section+ article:first-child+ :where(picture > img):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0;+ margin-bottom: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(video):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.7142857em;+ margin-bottom: 1.7142857em;+}++.Docs+ .doc-section+ article:first-child+ :where(kbd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+ border-radius: 0.3125rem;+ padding: 0.1428571em 0.3571429em;+}++.Docs+ .doc-section+ article:first-child+ :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+}++.Docs+ .doc-section+ article:first-child+ :where(h2 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.9em;+}++.Docs+ .doc-section+ article:first-child+ :where(h3 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8888889em;+}++.Docs+ .doc-section+ article:first-child+ :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+ line-height: 1.6666667;+ margin-top: 1.6666667em;+ margin-bottom: 1.6666667em;+ border-radius: 0.25rem;+ padding: 0.6666667em 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(ol):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+ margin-bottom: 1.1428571em;+ padding-left: 1.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+ margin-bottom: 1.1428571em;+ padding-left: 1.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0.2857143em;+ margin-bottom: 0.2857143em;+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-left: 0.4285714em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-left: 0.4285714em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li p):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0.5714286em;+ margin-bottom: 0.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ol > li > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ol > li > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul ul, ul ol, ol ul, ol ol):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0.5714286em;+ margin-bottom: 0.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(dl):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+ margin-bottom: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(dt):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(dd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0.2857143em;+ padding-left: 1.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 2.8571429em;+ margin-bottom: 2.8571429em;+}++.Docs+ .doc-section+ article:first-child+ :where(hr + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(h2 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(h3 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(h4 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+ line-height: 1.5;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-right: 1em;+ padding-bottom: 0.6666667em;+ padding-left: 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th:first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding-left: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th:last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding-right: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td, tfoot td):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding: 0.6666667em 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td:first-child, tfoot td:first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding-left: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td:last-child, tfoot td:last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding-right: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(figure):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.7142857em;+ margin-bottom: 1.7142857em;+}++.Docs+ .doc-section+ article:first-child+ :where(figure > *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+ margin-bottom: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(figcaption):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+ line-height: 1.3333333;+ margin-top: 0.6666667em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 0;+}++.Docs .doc-section article:first-child {+ --tw-prose-body: hsl(var(--foreground));+ --tw-prose-headings: hsl(var(--foreground));+ --tw-prose-lead: hsl(var(--foreground));+ --tw-prose-links: hsl(var(--primary));+ --tw-prose-bold: hsl(var(--foreground));+ --tw-prose-counters: hsl(var(--foreground));+ --tw-prose-bullets: hsl(var(--muted-foreground));+ --tw-prose-hr: hsl(var(--muted));+ --tw-prose-quotes: hsl(var(--foreground));+ --tw-prose-quote-borders: hsl(var(--muted));+ --tw-prose-captions: hsl(var(--border));+ --tw-prose-code: hsl(var(--foreground));+ --tw-prose-pre-code: hsl(var(--muted-foreground));+ --tw-prose-pre-bg: hsl(var(--muted));+ --tw-prose-th-borders: hsl(var(--muted));+ --tw-prose-td-borders: hsl(var(--background-default));+ --tw-prose-invert-body: hsl(var(--background-default));+ --tw-prose-invert-headings: #fff;+ --tw-prose-invert-lead: hsl(var(--muted));+ --tw-prose-invert-links: #fff;+ --tw-prose-invert-bold: #fff;+ --tw-prose-invert-counters: hsl(var(--muted));+ --tw-prose-invert-bullets: hsl(var(--primary));+ --tw-prose-invert-hr: hsl(var(--border));+ --tw-prose-invert-quotes: hsl(var(--background-alternative-default));+ --tw-prose-invert-quote-borders: hsl(var(--border));+ --tw-prose-invert-captions: hsl(var(--muted));+}++.Docs+ .doc-section+ article:first-child+ :where(h1, h2, h3, h4, h5):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ font-weight: 400;+}++.Docs .doc-section article:first-child {+ max-width: none;+}++.Docs.Docs--table-editor .doc-section__table-name {+ margin-top: 1rem;+}++.Docs .code-column {+ width: 50%;+ padding: 1rem 1.5rem;+ max-width: 50%;+}++.Docs .code-column a {+ transition-property: color, background-color, border-color,+ text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,+ -webkit-backdrop-filter;+ transition-property: color, background-color, border-color,+ text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,+ backdrop-filter;+ transition-property: color, background-color, border-color,+ text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,+ backdrop-filter, -webkit-backdrop-filter;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 0.15s;+}++.Docs .code-column a:hover {+ --tw-text-opacity: 1;+ color: hsl(var(--brand-600) / var(--tw-text-opacity));+}++.Docs .code-column p:last-child {+ padding-bottom: 0;+}++.Docs .code {+ width: 50%;+ flex: 1 1 0%;+ padding: 0.5rem 1.5rem 1rem;+ max-width: 50%;+}++.Docs .code h4 {+ margin: 0.25rem;+ padding: 0;+ font-size: 0.875rem;+ line-height: 1.25rem;+ font-weight: 400;+ text-transform: uppercase;+ --tw-text-opacity: 1;+}++.Docs .code h4:not(:first-child) {+ margin-top: 1.5rem;+}++.Docs .code code {+ margin: 0.25rem;+ padding: 0;+ background-color: none;+}++.Docs .code .is-highlighted {+ --tw-text-opacity: 1;+ color: hsl(var(--primary) / var(--tw-text-opacity));+}++.Docs .codeblock-container + .codeblock-container {+ margin-top: 3rem;+}diff --git a/apps/university/app/styles/nprogress.css b/apps/university/app/styles/nprogress.cssnew file mode 100644index 0000000000..7f31ea3f18--- /dev/null+++ b/apps/university/app/styles/nprogress.css@@ -0,0 +1,16 @@+/* Make clicks pass-through */+#nprogress {+ pointer-events: none;+}++#nprogress .bar {+ background: #002aff99;++ position: fixed;+ z-index: 1031;+ top: 0;+ left: 0;++ width: 100%;+ height: 2px;+}diff --git a/apps/university/app/styles/tailwind.css b/apps/university/app/styles/tailwind.cssnew file mode 100644index 0000000000..2cbbecb4f4--- /dev/null+++ b/apps/university/app/styles/tailwind.css@@ -0,0 +1,109 @@+@import url("non.geist");+@import url("non.geist/mono");++@tailwind base;+@tailwind components;+@tailwind utilities;++@layer base {+ :root {+ --background: 0 0% 100%;+ --foreground: 240 10% 3.9%;+ --card: 0 0% 100%;+ --card-foreground: 240 10% 3.9%;+ --popover: 0 0% 100%;+ --popover-foreground: 240 10% 3.9%;+ --active: 240 5.9% 10%;+ --active-foreground: 0 0% 98%;+ --primary: 240 5.9% 10%;+ --primary-foreground: 0 0% 98%;+ --secondary: 240 4.8% 95.9%;+ --secondary-foreground: 240 5.9% 10%;+ --muted: 240 4.8% 95.9%;+ --muted-foreground: 240 3.8% 46.1%;+ --accent: 240 4.8% 89.9%;+ --accent-foreground: 240 5.9% 10%;+ --destructive: 0 72.22% 50.59%;+ --destructive-foreground: 0 0% 98%;+ --border: 240 5.9% 90%;+ --input: 240 5.9% 90%;+ --ring: 240 5% 64.9%;+ --radius: 0.5rem;+ --sidebar-background: 0 0% 98%;+ --sidebar-foreground: 240 5.3% 26.1%;+ --sidebar-primary: 240 5.9% 10%;+ --sidebar-primary-foreground: 0 0% 98%;+ --sidebar-accent: 240 4.8% 95.9%;+ --sidebar-accent-foreground: 240 5.9% 10%;+ --sidebar-border: 220 13% 91%;+ --sidebar-ring: 217.2 91.2% 59.8%;+ }++ .dark {+ --background: 240 10% 3.9%;+ --foreground: 0 0% 98%;+ --card: 240 10% 3.9%;+ --card-foreground: 0 0% 98%;+ --popover: 240 10% 3.9%;+ --popover-foreground: 0 0% 98%;+ --primary: 0 0% 98%;+ --primary-foreground: 240 5.9% 10%;+ --active: 0 0% 98%;+ --active-foreground: 240 5.9% 10%;+ --secondary: 240 3.7% 15.9%;+ --secondary-foreground: 0 0% 98%;+ --muted: 240 3.7% 15.9%;+ --muted-foreground: 240 5% 64.9%;+ --accent: 240 3.7% 15.9%;+ --accent-foreground: 0 0% 98%;+ --destructive: 0 62.8% 30.6%;+ --destructive-foreground: 0 85.7% 97.3%;+ --border: 240 3.7% 15.9%;+ --input: 240 3.7% 15.9%;+ --ring: 240 4.9% 83.9%;+ --sidebar-background: 240 5.9% 10%;+ --sidebar-foreground: 240 4.8% 95.9%;+ --sidebar-primary: 224.3 76.3% 48%;+ --sidebar-primary-foreground: 0 0% 100%;+ --sidebar-accent: 240 3.7% 15.9%;+ --sidebar-accent-foreground: 240 4.8% 95.9%;+ --sidebar-border: 240 3.7% 15.9%;+ --sidebar-ring: 217.2 91.2% 59.8%;+ }+}++@layer base {+ * {+ @apply border-border;+ }+ body {+ @apply bg-background text-foreground;+ font-feature-settings: "rlig" 1, "calt" 1;+ font-synthesis-weight: none;+ text-rendering: optimizeLegibility;+ }+}++.forge-viewer {+ position: relative;+ width: 100%;+ height: 100%;+ min-height: 400px;+}++.forge-viewer > div {+ border-radius: var(--radius);+}++p.is-editor-empty:first-child:before {+ color: var(--muted-foreground);+ content: attr(data-placeholder);+ float: left;+ height: 0;+ pointer-events: none;+}++.tiptap.ProseMirror-focused div[data-video-embed],+.tiptap.ProseMirror-selectedNode div[data-video-embed] {+ @apply ring-2 ring-primary cursor-move p-2 rounded-lg;+}diff --git a/apps/university/app/types/validators.ts b/apps/university/app/types/validators.tsnew file mode 100644index 0000000000..3c09f14aaf--- /dev/null+++ b/apps/university/app/types/validators.ts@@ -0,0 +1,14 @@+import type { Validator } from "@carbon/form";+import { z } from "zod";++export type TypeOfValidator<U extends Validator<any>> = U extends Validator<+ infer T+>+ ? T+ : unknown;++export type Mode = "light" | "dark";++export const modeValidator = z.object({+ mode: z.enum(["light", "dark", "system"]),+});diff --git a/apps/university/app/utils/dom.ts b/apps/university/app/utils/dom.tsnew file mode 100644index 0000000000..d5aa965c86--- /dev/null+++ b/apps/university/app/utils/dom.ts@@ -0,0 +1,6 @@+export function scrollIntoView(element: HTMLElement | undefined | null) {+ element?.scrollIntoView({+ inline: "nearest",+ block: "nearest",+ });+}diff --git a/apps/university/app/utils/handle.ts b/apps/university/app/utils/handle.tsnew file mode 100644index 0000000000..cdf10e457b--- /dev/null+++ b/apps/university/app/utils/handle.ts@@ -0,0 +1,5 @@+export type Handle = {+ breadcrumb?: any;+ to?: string;+ module?: string;+};diff --git a/apps/university/app/utils/path.ts b/apps/university/app/utils/path.tsnew file mode 100644index 0000000000..b885c097e7--- /dev/null+++ b/apps/university/app/utils/path.ts@@ -0,0 +1,42 @@+import { getAppUrl, SUPABASE_URL } from "@carbon/auth";++const x = "/x"; // from ~/routes/x+ folder++const ERP_URL = getAppUrl();++export const path = {+ to: {+ authenticatedRoot: x,+ accountSettings: `${ERP_URL}/x/account`,+ callback: "/callback",+ dashboard: `${ERP_URL}/x`,+ healthcheck: "/healthcheck",+ login: "/login",+ logout: "/logout",+ refreshSession: "/refresh-session",+ root: "/",+ },+} as const;++export const removeSubdomain = (url?: string): string => {+ if (!url) return "localhost:3000";+ const parts = url.split("/")[0].split(".");++ const domain = parts.slice(-2).join(".");++ return domain;+};++export const getStoragePath = (bucket: string, path: string) => {+ return `${SUPABASE_URL}/storage/v1/object/public/${bucket}/${path}`;+};++export const requestReferrer = (request: Request) => {+ return request.headers.get("referer");+};++export const getParams = (request: Request) => {+ const url = new URL(requestReferrer(request) ?? "");+ const searchParams = new URLSearchParams(url.search);+ return searchParams.toString();+};diff --git a/apps/university/app/utils/supabase.ts b/apps/university/app/utils/supabase.tsnew file mode 100644index 0000000000..4631ac61cb--- /dev/null+++ b/apps/university/app/utils/supabase.ts@@ -0,0 +1,7 @@+export const sanitize = (input: Record<string, any>) => {+ const output = { ...input };+ Object.keys(output).forEach((key) => {+ if (output[key] === undefined && key !== "id") output[key] = null;+ });+ return output;+};diff --git a/apps/university/env.d.ts b/apps/university/env.d.tsnew file mode 100644index 0000000000..4a1bdb51fe--- /dev/null+++ b/apps/university/env.d.ts@@ -0,0 +1,3 @@+/// <reference types="vite/client" />+/// <reference types="@vercel/remix/globals" />+/// <reference types="@vercel/remix" />diff --git a/apps/university/package.json b/apps/university/package.jsonnew file mode 100644index 0000000000..2f47494b2d--- /dev/null+++ b/apps/university/package.json@@ -0,0 +1,68 @@+{+ "name": "university",+ "type": "module",+ "dependencies": {+ "@carbon/auth": "*",+ "@carbon/database": "*",+ "@carbon/documents": "*",+ "@carbon/logger": "*",+ "@carbon/react": "*",+ "@carbon/kv": "*",+ "@carbon/form": "*",+ "@carbon/utils": "*",+ "@react-aria/i18n": "^3.11.0",+ "@remix-run/dev": "~2.11.2",+ "@remix-run/eslint-config": "~2.11.2",+ "@remix-run/react": "~2.11.2",+ "@remix-run/serve": "~2.11.2",+ "@supabase/functions-js": "2.1.5",+ "@supabase/supabase-js": "^2.40.0",+ "@tailwindcss/container-queries": "^0.1.1",+ "@tailwindcss/forms": "^0.5.7",+ "@tailwindcss/line-clamp": "^0.4.4",+ "@tailwindcss/typography": "^0.5.10",+ "@upstash/ratelimit": "^2.0.5",+ "@vercel/analytics": "^1.2.2",+ "@vercel/remix": "2.11.2",+ "framer-motion": "^11.1.7",+ "isbot": "3.6.13",+ "non.geist": "~1.0.3",+ "react": "^18.3.1",+ "react-dom": "^18.3.1",+ "react-dropzone": "^14.2.3",+ "react-hotkeys-hook": "~4.5.0",+ "react-icons": "^5.4.0",+ "tailwind-merge": "^2.2.1",+ "tailwindcss-animate": "^1.0.7",+ "zod": "^3.24.1",+ "zod-form-data": "*"+ },+ "devDependencies": {+ "@carbon/tailwind": "*",+ "@carbon/tsconfig": "*",+ "@types/react": "^18.2.74",+ "@types/react-dom": "^18.2.24",+ "autoprefixer": "10.4.14",+ "cross-env": "7.0.3",+ "nodemon": "^3.0.1",+ "npm-run-all": "^4.1.5",+ "postcss": "^8.4.33",+ "tailwindcss": "3.4.6",+ "tailwind-scrollbar": "^2.0.1",+ "tailwind-scrollbar-hide": "^1.1.7",+ "typescript": "^5.2.2",+ "vite": "^5.3.3",+ "vite-tsconfig-paths": "^4.3.2",+ "wait-on": "7.2.0"+ },+ "private": true,+ "scripts": {+ "build": "remix vite:build",+ "clean": "rimraf .cache .turbo node_modules dist build",+ "dev": "remix vite:dev",+ "lint": "TIMING=1 eslint \"app/**/*.ts*\"",+ "start": "remix-serve ./build/server/index.js",+ "types": "tsc"+ },+ "sideEffects": false+}diff --git a/apps/university/postcss.config.cjs b/apps/university/postcss.config.cjsnew file mode 100644index 0000000000..4182e2b578--- /dev/null+++ b/apps/university/postcss.config.cjs@@ -0,0 +1 @@+module.exports = require("@carbon/tailwind/postcss.config");diff --git a/apps/university/public/apple-touch-icon.png b/apps/university/public/apple-touch-icon.pngnew file mode 100644index 0000000000..7d10fd7748Binary files /dev/null and b/apps/university/public/apple-touch-icon.png differdiff --git a/apps/university/public/carbon-logo-mark.svg b/apps/university/public/carbon-logo-mark.svgnew file mode 100644index 0000000000..048049e1e5--- /dev/null+++ b/apps/university/public/carbon-logo-mark.svg@@ -0,0 +1,20 @@+<svg width="362" height="349" viewBox="0 0 362 349" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M181.165 139.643V69.8213L241.346 35.0564L241.054 104.878L181.165 139.643Z" fill="#60FFD2"/>+<path d="M181.165 69.8213V139.643L120.4 104.878V35.0564L181.165 69.8213Z" fill="#36B5B4"/>+<path d="M120.4 35.0565L181.165 69.8214L241.347 35.0565L181.165 -0.000610352L120.4 35.0565Z" fill="#5FE4D2"/>+<path d="M240.818 244.172V174.35L300.999 139.585L300.707 209.407L240.818 244.172Z" fill="#71DEFF"/>+<path d="M240.818 174.35V244.172L180.052 209.407V139.585L240.818 174.35Z" fill="#3877C5"/>+<path d="M180.052 139.586L240.818 174.35L300.999 139.586L240.818 104.528L180.052 139.586Z" fill="#4EAADE"/>+<path d="M121.512 244.172V174.35L181.693 139.585L181.401 209.407L121.512 244.172Z" fill="#71DEFF"/>+<path d="M121.512 174.35V244.172L60.7466 209.407V139.585L121.512 174.35Z" fill="#3877C5"/>+<path d="M60.7466 139.586L121.512 174.35L181.694 139.586L121.512 104.528L60.7466 139.586Z" fill="#4EAADE"/>+<path d="M181.165 348.701V278.879L241.346 244.114L241.054 313.936L181.165 348.701Z" fill="#7D7FE5"/>+<path d="M181.165 278.879V348.701L120.4 313.936V244.114L181.165 278.879Z" fill="#2F31AE"/>+<path d="M120.4 244.114L181.165 278.879L241.347 244.114L181.165 209.057L120.4 244.114Z" fill="#6041D0"/>+<path d="M60.7651 348.701V278.879L120.946 244.114L120.654 313.936L60.7651 348.701Z" fill="#7D7FE5"/>+<path d="M60.7656 278.879V348.701L0 313.936V244.114L60.7656 278.879Z" fill="#2F31AE"/>+<path d="M0 244.114L60.7656 278.879L120.947 244.114L60.7656 209.057L0 244.114Z" fill="#6041D0"/>+<path d="M301.017 348.701V278.879L361.198 244.114L360.906 313.936L301.017 348.701Z" fill="#7D7FE5"/>+<path d="M301.018 278.879V348.701L240.252 313.936V244.114L301.018 278.879Z" fill="#2F31AE"/>+<path d="M240.252 244.114L301.018 278.879L361.199 244.114L301.018 209.057L240.252 244.114Z" fill="#6041D0"/>+</svg>diff --git a/apps/university/public/carbon-word-dark.png b/apps/university/public/carbon-word-dark.pngnew file mode 100644index 0000000000..3606059a75Binary files /dev/null and b/apps/university/public/carbon-word-dark.png differdiff --git a/apps/university/public/carbon-word-dark.svg b/apps/university/public/carbon-word-dark.svgnew file mode 100644index 0000000000..b555c4b360--- /dev/null+++ b/apps/university/public/carbon-word-dark.svg@@ -0,0 +1,26 @@+<svg width="1307" height="349" viewBox="0 0 1307 349" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M412.646 193.426C412.646 178.405 415.703 165.305 421.816 154.126C427.929 142.773 436.401 134.039 447.23 127.926C458.059 121.638 470.461 118.494 484.434 118.494C502.425 118.494 517.271 123.035 528.974 132.118C540.851 141.026 548.799 153.602 552.816 169.846H513.254C511.158 163.558 507.577 158.667 502.512 155.174C497.621 151.506 491.508 149.672 484.172 149.672C473.692 149.672 465.395 153.515 459.282 161.2C453.169 168.711 450.112 179.453 450.112 193.426C450.112 207.225 453.169 217.967 459.282 225.652C465.395 233.163 473.692 236.918 484.172 236.918C499.019 236.918 508.713 230.281 513.254 217.006H552.816C548.799 232.726 540.851 245.215 528.974 254.472C517.097 263.729 502.25 268.358 484.434 268.358C470.461 268.358 458.059 265.301 447.23 259.188C436.401 252.9 427.929 244.167 421.816 232.988C415.703 221.635 412.646 208.447 412.646 193.426Z" fill="white"/>+<path d="M562.395 192.902C562.395 178.23 565.277 165.217 571.041 153.864C576.98 142.511 584.927 133.777 594.883 127.664C605.014 121.551 616.28 118.494 628.681 118.494C639.511 118.494 648.943 120.677 656.977 125.044C665.187 129.411 671.737 134.913 676.627 141.55V120.852H713.569V266H676.627V244.778C671.911 251.59 665.361 257.267 656.977 261.808C648.768 266.175 639.249 268.358 628.419 268.358C616.193 268.358 605.014 265.214 594.883 258.926C584.927 252.638 576.98 243.817 571.041 232.464C565.277 220.936 562.395 207.749 562.395 192.902ZM676.627 193.426C676.627 184.518 674.881 176.92 671.387 170.632C667.894 164.169 663.178 159.279 657.239 155.96C651.301 152.467 644.925 150.72 638.113 150.72C631.301 150.72 625.013 152.379 619.249 155.698C613.485 159.017 608.769 163.907 605.101 170.37C601.608 176.658 599.861 184.169 599.861 192.902C599.861 201.635 601.608 209.321 605.101 215.958C608.769 222.421 613.485 227.399 619.249 230.892C625.188 234.385 631.476 236.132 638.113 236.132C644.925 236.132 651.301 234.473 657.239 231.154C663.178 227.661 667.894 222.77 671.387 216.482C674.881 210.019 676.627 202.334 676.627 193.426Z" fill="white"/>+<path d="M778.214 143.384C782.93 135.699 789.043 129.673 796.554 125.306C804.239 120.939 812.972 118.756 822.754 118.756V157.27H813.06C801.532 157.27 792.798 159.977 786.86 165.392C781.096 170.807 778.214 180.239 778.214 193.688V266H741.534V120.852H778.214V143.384Z" fill="white"/>+<path d="M876.28 142.074C880.996 135.087 887.458 129.411 895.668 125.044C904.052 120.677 913.571 118.494 924.226 118.494C936.627 118.494 947.806 121.551 957.762 127.664C967.892 133.777 975.84 142.511 981.604 153.864C987.542 165.043 990.512 178.055 990.512 192.902C990.512 207.749 987.542 220.936 981.604 232.464C975.84 243.817 967.892 252.638 957.762 258.926C947.806 265.214 936.627 268.358 924.226 268.358C913.396 268.358 903.877 266.262 895.668 262.07C887.633 257.703 881.17 252.114 876.28 245.302V266H839.6V72.12H876.28V142.074ZM953.046 192.902C953.046 184.169 951.212 176.658 947.544 170.37C944.05 163.907 939.334 159.017 933.396 155.698C927.632 152.379 921.344 150.72 914.532 150.72C907.894 150.72 901.606 152.467 895.668 155.96C889.904 159.279 885.188 164.169 881.52 170.632C878.026 177.095 876.28 184.693 876.28 193.426C876.28 202.159 878.026 209.757 881.52 216.22C885.188 222.683 889.904 227.661 895.668 231.154C901.606 234.473 907.894 236.132 914.532 236.132C921.344 236.132 927.632 234.385 933.396 230.892C939.334 227.399 944.05 222.421 947.544 215.958C951.212 209.495 953.046 201.81 953.046 192.902Z" fill="white"/>+<path d="M1073.76 268.358C1059.78 268.358 1047.21 265.301 1036.03 259.188C1024.85 252.9 1016.03 244.079 1009.57 232.726C1003.28 221.373 1000.14 208.273 1000.14 193.426C1000.14 178.579 1003.37 165.479 1009.83 154.126C1016.47 142.773 1025.46 134.039 1036.82 127.926C1048.17 121.638 1060.83 118.494 1074.81 118.494C1088.78 118.494 1101.44 121.638 1112.8 127.926C1124.15 134.039 1133.06 142.773 1139.52 154.126C1146.16 165.479 1149.48 178.579 1149.48 193.426C1149.48 208.273 1146.07 221.373 1139.26 232.726C1132.62 244.079 1123.54 252.9 1112.01 259.188C1100.66 265.301 1087.91 268.358 1073.76 268.358ZM1073.76 236.394C1080.4 236.394 1086.6 234.822 1092.36 231.678C1098.3 228.359 1103.01 223.469 1106.51 217.006C1110 210.543 1111.75 202.683 1111.75 193.426C1111.75 179.627 1108.08 169.06 1100.74 161.724C1093.58 154.213 1084.76 150.458 1074.28 150.458C1063.8 150.458 1054.98 154.213 1047.82 161.724C1040.83 169.06 1037.34 179.627 1037.34 193.426C1037.34 207.225 1040.75 217.879 1047.56 225.39C1054.54 232.726 1063.28 236.394 1073.76 236.394Z" fill="white"/>+<path d="M1248.96 118.756C1266.25 118.756 1280.22 124.258 1290.88 135.262C1301.53 146.091 1306.86 161.287 1306.86 180.85V266H1270.18V185.828C1270.18 174.3 1267.3 165.479 1261.53 159.366C1255.77 153.078 1247.91 149.934 1237.95 149.934C1227.82 149.934 1219.79 153.078 1213.85 159.366C1208.08 165.479 1205.2 174.3 1205.2 185.828V266H1168.52V120.852H1205.2V138.93C1210.09 132.642 1216.29 127.751 1223.8 124.258C1231.49 120.59 1239.87 118.756 1248.96 118.756Z" fill="white"/>+<path d="M181.165 139.644V69.822L241.346 35.0571L241.054 104.879L181.165 139.644Z" fill="#60FFD2"/>+<path d="M181.165 69.822V139.644L120.4 104.879V35.0571L181.165 69.822Z" fill="#36B5B4"/>+<path d="M120.4 35.0571L181.165 69.822L241.346 35.0571L181.165 0L120.4 35.0571Z" fill="#5FE4D2"/>+<path d="M240.818 244.173V174.351L300.999 139.586L300.707 209.408L240.818 244.173Z" fill="#71DEFF"/>+<path d="M240.818 174.351V244.173L180.052 209.408V139.586L240.818 174.351Z" fill="#3877C5"/>+<path d="M180.052 139.586L240.818 174.351L300.999 139.586L240.818 104.529L180.052 139.586Z" fill="#4EAADE"/>+<path d="M121.512 244.173V174.351L181.693 139.586L181.401 209.408L121.512 244.173Z" fill="#71DEFF"/>+<path d="M121.512 174.351V244.173L60.7466 209.408V139.586L121.512 174.351Z" fill="#3877C5"/>+<path d="M60.7466 139.586L121.512 174.351L181.693 139.586L121.512 104.529L60.7466 139.586Z" fill="#4EAADE"/>+<path d="M181.165 348.702V278.88L241.346 244.115L241.054 313.937L181.165 348.702Z" fill="#7D7FE5"/>+<path d="M181.165 278.88V348.702L120.4 313.937V244.115L181.165 278.88Z" fill="#2F31AE"/>+<path d="M120.4 244.115L181.165 278.88L241.346 244.115L181.165 209.057L120.4 244.115Z" fill="#6041D0"/>+<path d="M60.7652 348.702V278.88L120.947 244.115L120.654 313.937L60.7652 348.702Z" fill="#7D7FE5"/>+<path d="M60.7652 278.88V348.702L0 313.937V244.115L60.7652 278.88Z" fill="#2F31AE"/>+<path d="M0 244.115L60.7652 278.88L120.947 244.115L60.7656 209.057L0 244.115Z" fill="#6041D0"/>+<path d="M301.017 348.702V278.88L361.198 244.115L360.906 313.937L301.017 348.702Z" fill="#7D7FE5"/>+<path d="M301.017 278.88V348.702L240.252 313.937V244.115L301.017 278.88Z" fill="#2F31AE"/>+<path d="M240.252 244.115L301.017 278.88L361.198 244.115L301.018 209.057L240.252 244.115Z" fill="#6041D0"/>+</svg>diff --git a/apps/university/public/carbon-word-light.png b/apps/university/public/carbon-word-light.pngnew file mode 100644index 0000000000..becd8f13bbBinary files /dev/null and b/apps/university/public/carbon-word-light.png differdiff --git a/apps/university/public/carbon-word-light.svg b/apps/university/public/carbon-word-light.svgnew file mode 100644index 0000000000..3e899a2d1b--- /dev/null+++ b/apps/university/public/carbon-word-light.svg@@ -0,0 +1,26 @@+<svg width="1307" height="349" viewBox="0 0 1307 349" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M412.646 193.426C412.646 178.405 415.703 165.305 421.816 154.126C427.929 142.773 436.401 134.039 447.23 127.926C458.059 121.638 470.461 118.494 484.434 118.494C502.425 118.494 517.271 123.035 528.974 132.118C540.851 141.026 548.799 153.602 552.816 169.846H513.254C511.158 163.558 507.577 158.667 502.512 155.174C497.621 151.506 491.508 149.672 484.172 149.672C473.692 149.672 465.395 153.515 459.282 161.2C453.169 168.711 450.112 179.453 450.112 193.426C450.112 207.225 453.169 217.967 459.282 225.652C465.395 233.163 473.692 236.918 484.172 236.918C499.019 236.918 508.713 230.281 513.254 217.006H552.816C548.799 232.726 540.851 245.215 528.974 254.472C517.097 263.729 502.25 268.358 484.434 268.358C470.461 268.358 458.059 265.301 447.23 259.188C436.401 252.9 427.929 244.167 421.816 232.988C415.703 221.635 412.646 208.447 412.646 193.426Z" fill="#212278"/>+<path d="M562.395 192.902C562.395 178.23 565.277 165.217 571.041 153.864C576.98 142.511 584.927 133.777 594.883 127.664C605.014 121.551 616.28 118.494 628.681 118.494C639.511 118.494 648.943 120.677 656.977 125.044C665.187 129.411 671.737 134.913 676.627 141.55V120.852H713.569V266H676.627V244.778C671.911 251.59 665.361 257.267 656.977 261.808C648.768 266.175 639.249 268.358 628.419 268.358C616.193 268.358 605.014 265.214 594.883 258.926C584.927 252.638 576.98 243.817 571.041 232.464C565.277 220.936 562.395 207.749 562.395 192.902ZM676.627 193.426C676.627 184.518 674.881 176.92 671.387 170.632C667.894 164.169 663.178 159.279 657.239 155.96C651.301 152.467 644.925 150.72 638.113 150.72C631.301 150.72 625.013 152.379 619.249 155.698C613.485 159.017 608.769 163.907 605.101 170.37C601.608 176.658 599.861 184.169 599.861 192.902C599.861 201.635 601.608 209.321 605.101 215.958C608.769 222.421 613.485 227.399 619.249 230.892C625.188 234.385 631.476 236.132 638.113 236.132C644.925 236.132 651.301 234.473 657.239 231.154C663.178 227.661 667.894 222.77 671.387 216.482C674.881 210.019 676.627 202.334 676.627 193.426Z" fill="#212278"/>+<path d="M778.214 143.384C782.93 135.699 789.043 129.673 796.554 125.306C804.239 120.939 812.972 118.756 822.754 118.756V157.27H813.06C801.532 157.27 792.798 159.977 786.86 165.392C781.096 170.807 778.214 180.239 778.214 193.688V266H741.534V120.852H778.214V143.384Z" fill="#212278"/>+<path d="M876.28 142.074C880.996 135.087 887.458 129.411 895.668 125.044C904.052 120.677 913.571 118.494 924.226 118.494C936.627 118.494 947.806 121.551 957.762 127.664C967.892 133.777 975.84 142.511 981.604 153.864C987.542 165.043 990.512 178.055 990.512 192.902C990.512 207.749 987.542 220.936 981.604 232.464C975.84 243.817 967.892 252.638 957.762 258.926C947.806 265.214 936.627 268.358 924.226 268.358C913.396 268.358 903.877 266.262 895.668 262.07C887.633 257.703 881.17 252.114 876.28 245.302V266H839.6V72.12H876.28V142.074ZM953.046 192.902C953.046 184.169 951.212 176.658 947.544 170.37C944.05 163.907 939.334 159.017 933.396 155.698C927.632 152.379 921.344 150.72 914.532 150.72C907.894 150.72 901.606 152.467 895.668 155.96C889.904 159.279 885.188 164.169 881.52 170.632C878.026 177.095 876.28 184.693 876.28 193.426C876.28 202.159 878.026 209.757 881.52 216.22C885.188 222.683 889.904 227.661 895.668 231.154C901.606 234.473 907.894 236.132 914.532 236.132C921.344 236.132 927.632 234.385 933.396 230.892C939.334 227.399 944.05 222.421 947.544 215.958C951.212 209.495 953.046 201.81 953.046 192.902Z" fill="#212278"/>+<path d="M1073.76 268.358C1059.78 268.358 1047.21 265.301 1036.03 259.188C1024.85 252.9 1016.03 244.079 1009.57 232.726C1003.28 221.373 1000.14 208.273 1000.14 193.426C1000.14 178.579 1003.37 165.479 1009.83 154.126C1016.47 142.773 1025.46 134.039 1036.82 127.926C1048.17 121.638 1060.83 118.494 1074.81 118.494C1088.78 118.494 1101.44 121.638 1112.8 127.926C1124.15 134.039 1133.06 142.773 1139.52 154.126C1146.16 165.479 1149.48 178.579 1149.48 193.426C1149.48 208.273 1146.07 221.373 1139.26 232.726C1132.62 244.079 1123.54 252.9 1112.01 259.188C1100.66 265.301 1087.91 268.358 1073.76 268.358ZM1073.76 236.394C1080.4 236.394 1086.6 234.822 1092.36 231.678C1098.3 228.359 1103.01 223.469 1106.51 217.006C1110 210.543 1111.75 202.683 1111.75 193.426C1111.75 179.627 1108.08 169.06 1100.74 161.724C1093.58 154.213 1084.76 150.458 1074.28 150.458C1063.8 150.458 1054.98 154.213 1047.82 161.724C1040.83 169.06 1037.34 179.627 1037.34 193.426C1037.34 207.225 1040.75 217.879 1047.56 225.39C1054.54 232.726 1063.28 236.394 1073.76 236.394Z" fill="#212278"/>+<path d="M1248.96 118.756C1266.25 118.756 1280.22 124.258 1290.88 135.262C1301.53 146.091 1306.86 161.287 1306.86 180.85V266H1270.18V185.828C1270.18 174.3 1267.3 165.479 1261.53 159.366C1255.77 153.078 1247.91 149.934 1237.95 149.934C1227.82 149.934 1219.79 153.078 1213.85 159.366C1208.08 165.479 1205.2 174.3 1205.2 185.828V266H1168.52V120.852H1205.2V138.93C1210.09 132.642 1216.29 127.751 1223.8 124.258C1231.49 120.59 1239.87 118.756 1248.96 118.756Z" fill="#212278"/>+<path d="M181.165 139.644V69.822L241.346 35.0571L241.054 104.879L181.165 139.644Z" fill="#60FFD2"/>+<path d="M181.165 69.822V139.644L120.4 104.879V35.0571L181.165 69.822Z" fill="#36B5B4"/>+<path d="M120.4 35.0571L181.165 69.822L241.346 35.0571L181.165 0L120.4 35.0571Z" fill="#5FE4D2"/>+<path d="M240.818 244.173V174.351L300.999 139.586L300.707 209.408L240.818 244.173Z" fill="#71DEFF"/>+<path d="M240.818 174.351V244.173L180.052 209.408V139.586L240.818 174.351Z" fill="#3877C5"/>+<path d="M180.052 139.586L240.818 174.351L300.999 139.586L240.818 104.529L180.052 139.586Z" fill="#4EAADE"/>+<path d="M121.512 244.173V174.351L181.693 139.586L181.401 209.408L121.512 244.173Z" fill="#71DEFF"/>+<path d="M121.512 174.351V244.173L60.7466 209.408V139.586L121.512 174.351Z" fill="#3877C5"/>+<path d="M60.7466 139.586L121.512 174.351L181.693 139.586L121.512 104.529L60.7466 139.586Z" fill="#4EAADE"/>+<path d="M181.165 348.702V278.88L241.346 244.115L241.054 313.937L181.165 348.702Z" fill="#7D7FE5"/>+<path d="M181.165 278.88V348.702L120.4 313.937V244.115L181.165 278.88Z" fill="#2F31AE"/>+<path d="M120.4 244.115L181.165 278.88L241.346 244.115L181.165 209.057L120.4 244.115Z" fill="#6041D0"/>+<path d="M60.7652 348.702V278.88L120.947 244.115L120.654 313.937L60.7652 348.702Z" fill="#7D7FE5"/>+<path d="M60.7652 278.88V348.702L-1.52588e-05 313.937V244.115L60.7652 278.88Z" fill="#2F31AE"/>+<path d="M-1.52588e-05 244.115L60.7652 278.88L120.947 244.115L60.7656 209.057L-1.52588e-05 244.115Z" fill="#6041D0"/>+<path d="M301.017 348.702V278.88L361.198 244.115L360.906 313.937L301.017 348.702Z" fill="#7D7FE5"/>+<path d="M301.017 278.88V348.702L240.252 313.937V244.115L301.017 278.88Z" fill="#2F31AE"/>+<path d="M240.252 244.115L301.017 278.88L361.198 244.115L301.018 209.057L240.252 244.115Z" fill="#6041D0"/>+</svg>diff --git a/apps/university/public/favicon-16x16.png b/apps/university/public/favicon-16x16.pngnew file mode 100644index 0000000000..eb216e453fBinary files /dev/null and b/apps/university/public/favicon-16x16.png differdiff --git a/apps/university/public/favicon-32x32.png b/apps/university/public/favicon-32x32.pngnew file mode 100644index 0000000000..a7064d2122Binary files /dev/null and b/apps/university/public/favicon-32x32.png differdiff --git a/apps/university/public/favicon-96x96.png b/apps/university/public/favicon-96x96.pngnew file mode 100644index 0000000000..c36c27be04Binary files /dev/null and b/apps/university/public/favicon-96x96.png differdiff --git a/apps/university/public/favicon.ico b/apps/university/public/favicon.iconew file mode 100644index 0000000000..a87e92b575Binary files /dev/null and b/apps/university/public/favicon.ico differdiff --git a/apps/university/public/favicon.svg b/apps/university/public/favicon.svgnew file mode 100644index 0000000000..1f953c23a1--- /dev/null+++ b/apps/university/public/favicon.svg@@ -0,0 +1,22 @@+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="362" height="349"><svg width="362" height="349" viewBox="0 0 362 349" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M181.165 139.643V69.8213L241.346 35.0564L241.054 104.878L181.165 139.643Z" fill="#60FFD2"></path>+<path d="M181.165 69.8213V139.643L120.4 104.878V35.0564L181.165 69.8213Z" fill="#36B5B4"></path>+<path d="M120.4 35.0565L181.165 69.8214L241.347 35.0565L181.165 -0.000610352L120.4 35.0565Z" fill="#5FE4D2"></path>+<path d="M240.818 244.172V174.35L300.999 139.585L300.707 209.407L240.818 244.172Z" fill="#71DEFF"></path>+<path d="M240.818 174.35V244.172L180.052 209.407V139.585L240.818 174.35Z" fill="#3877C5"></path>+<path d="M180.052 139.586L240.818 174.35L300.999 139.586L240.818 104.528L180.052 139.586Z" fill="#4EAADE"></path>+<path d="M121.512 244.172V174.35L181.693 139.585L181.401 209.407L121.512 244.172Z" fill="#71DEFF"></path>+<path d="M121.512 174.35V244.172L60.7466 209.407V139.585L121.512 174.35Z" fill="#3877C5"></path>+<path d="M60.7466 139.586L121.512 174.35L181.694 139.586L121.512 104.528L60.7466 139.586Z" fill="#4EAADE"></path>+<path d="M181.165 348.701V278.879L241.346 244.114L241.054 313.936L181.165 348.701Z" fill="#7D7FE5"></path>+<path d="M181.165 278.879V348.701L120.4 313.936V244.114L181.165 278.879Z" fill="#2F31AE"></path>+<path d="M120.4 244.114L181.165 278.879L241.347 244.114L181.165 209.057L120.4 244.114Z" fill="#6041D0"></path>+<path d="M60.7651 348.701V278.879L120.946 244.114L120.654 313.936L60.7651 348.701Z" fill="#7D7FE5"></path>+<path d="M60.7656 278.879V348.701L0 313.936V244.114L60.7656 278.879Z" fill="#2F31AE"></path>+<path d="M0 244.114L60.7656 278.879L120.947 244.114L60.7656 209.057L0 244.114Z" fill="#6041D0"></path>+<path d="M301.017 348.701V278.879L361.198 244.114L360.906 313.936L301.017 348.701Z" fill="#7D7FE5"></path>+<path d="M301.018 278.879V348.701L240.252 313.936V244.114L301.018 278.879Z" fill="#2F31AE"></path>+<path d="M240.252 244.114L301.018 278.879L361.199 244.114L301.018 209.057L240.252 244.114Z" fill="#6041D0"></path>+</svg><style>@media (prefers-color-scheme: light) { :root { filter: none; } }+@media (prefers-color-scheme: dark) { :root { filter: none; } }+</style></svg>\ No newline at end of filediff --git a/apps/university/public/grid.svg b/apps/university/public/grid.svgnew file mode 100644index 0000000000..76e3b29f0d--- /dev/null+++ b/apps/university/public/grid.svg@@ -0,0 +1,5 @@++<svg id="download" xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">+ <path id="Path_3" data-name="Path 3" d="M96,95h4v1H96v4H95V96H86v4H85V96H76v4H75V96H66v4H65V96H56v4H55V96H46v4H45V96H36v4H35V96H26v4H25V96H16v4H15V96H0V95H15V86H0V85H15V76H0V75H15V66H0V65H15V56H0V55H15V46H0V45H15V36H0V35H15V26H0V25H15V16H0V15H15V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96Zm-1,0V86H86v9ZM85,95V86H76v9ZM75,95V86H66v9ZM65,95V86H56v9ZM55,95V86H46v9ZM45,95V86H36v9ZM35,95V86H26v9ZM25,95V86H16v9ZM16,85h9V76H16Zm10,0h9V76H26Zm10,0h9V76H36Zm10,0h9V76H46Zm10,0h9V76H56Zm10,0h9V76H66Zm10,0h9V76H76Zm10,0h9V76H86Zm9-10V66H86v9ZM85,75V66H76v9ZM75,75V66H66v9ZM65,75V66H56v9ZM55,75V66H46v9ZM45,75V66H36v9ZM35,75V66H26v9ZM25,75V66H16v9ZM16,65h9V56H16Zm10,0h9V56H26Zm10,0h9V56H36Zm10,0h9V56H46Zm10,0h9V56H56Zm10,0h9V56H66Zm10,0h9V56H76Zm10,0h9V56H86Zm9-10V46H86v9ZM85,55V46H76v9ZM75,55V46H66v9ZM65,55V46H56v9ZM55,55V46H46v9ZM45,55V46H36v9ZM35,55V46H26v9ZM25,55V46H16v9ZM16,45h9V36H16Zm10,0h9V36H26Zm10,0h9V36H36Zm10,0h9V36H46Zm10,0h9V36H56Zm10,0h9V36H66Zm10,0h9V36H76Zm10,0h9V36H86Zm9-10V26H86v9ZM85,35V26H76v9ZM75,35V26H66v9ZM65,35V26H56v9ZM55,35V26H46v9ZM45,35V26H36v9ZM35,35V26H26v9ZM25,35V26H16v9ZM16,25h9V16H16Zm10,0h9V16H26Zm10,0h9V16H36Zm10,0h9V16H46Zm10,0h9V16H56Zm10,0h9V16H66Zm10,0h9V16H76Zm10,0h9V16H86Z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd" opacity="0.5"/>+ <path id="Path_4" data-name="Path 4" d="M6,5V0H5V5H0V6H5v94H6V6h94V5Z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd"/>+</svg>diff --git a/apps/university/public/serviceWorker.js b/apps/university/public/serviceWorker.jsnew file mode 100644index 0000000000..790bcf811a--- /dev/null+++ b/apps/university/public/serviceWorker.js@@ -0,0 +1,31 @@+self.addEventListener("fetch", (event) => {+ let url = new URL(event.request.url);+ let method = event.request.method;++ // any non GET request is ignored+ if (method.toLowerCase() !== "get") return;++ // If the request is for the favicons, fonts, or the built files (which are hashed in the name)+ if (+ url.pathname.includes("logo") ||+ url.pathname.includes("storage/v1/object/public/avatars")+ ) {+ event.respondWith(+ // we will open the assets cache+ caches.open("assets").then(async (cache) => {+ // if the request is cached we will use the cache+ let cacheResponse = await cache.match(event.request);+ if (cacheResponse) return cacheResponse;++ // if it's not cached we will run the fetch, cache it and return it+ // this way the next time this asset it's needed it will load from the cache+ let fetchResponse = await fetch(event.request);+ cache.put(event.request, fetchResponse.clone());++ return fetchResponse;+ })+ );+ }++ return;+});diff --git a/apps/university/public/site.webmanifest b/apps/university/public/site.webmanifestnew file mode 100644index 0000000000..344837476f--- /dev/null+++ b/apps/university/public/site.webmanifest@@ -0,0 +1,21 @@+{+ "name": "Carbon",+ "short_name": "Carbon",+ "icons": [+ {+ "src": "/web-app-manifest-192x192.png",+ "sizes": "192x192",+ "type": "image/png",+ "purpose": "maskable"+ },+ {+ "src": "/web-app-manifest-512x512.png",+ "sizes": "512x512",+ "type": "image/png",+ "purpose": "maskable"+ }+ ],+ "theme_color": "#000000",+ "background_color": "#000000",+ "display": "standalone"+}\ No newline at end of filediff --git a/apps/university/public/web-app-manifest-192x192.png b/apps/university/public/web-app-manifest-192x192.pngnew file mode 100644index 0000000000..cda38d5ed4Binary files /dev/null and b/apps/university/public/web-app-manifest-192x192.png differdiff --git a/apps/university/public/web-app-manifest-512x512.png b/apps/university/public/web-app-manifest-512x512.pngnew file mode 100644index 0000000000..88c30a090eBinary files /dev/null and b/apps/university/public/web-app-manifest-512x512.png differdiff --git a/apps/university/tailwind.config.js b/apps/university/tailwind.config.jsnew file mode 100644index 0000000000..5856bc01d7--- /dev/null+++ b/apps/university/tailwind.config.js@@ -0,0 +1,4 @@+module.exports = {+ "tailwindcss/nesting": {},+ ...require("@carbon/tailwind/tailwind.config"),+};diff --git a/apps/university/tsconfig.json b/apps/university/tsconfig.jsonnew file mode 100644index 0000000000..ac163dacdb--- /dev/null+++ b/apps/university/tsconfig.json@@ -0,0 +1,30 @@+{+ "include": [+ "env.d.ts",+ "**/*.ts",+ "**/*.tsx",+ "app/modules/documents/documents.service.ts",+ "../carbon/app/components/Breadcrumb.tsx"+ ],+ "compilerOptions": {+ "lib": ["dom", "dom.iterable", "ESNext"],+ "esModuleInterop": true,+ "jsx": "react-jsx",+ "module": "ESNext",+ "moduleResolution": "Bundler",+ "resolveJsonModule": true,+ "target": "ES2019",+ "strict": true,+ "forceConsistentCasingInFileNames": true,+ "allowJs": true,+ "baseUrl": ".",+ "paths": {+ "~/*": ["./app/*"]+ },+ "types": ["@remix-run/react/future/single-fetch.d.ts"],+ "noEmit": true,+ "isolatedModules": true,+ "skipLibCheck": true,+ "noErrorTruncation": true+ }+}diff --git a/apps/university/vite.config.ts b/apps/university/vite.config.tsnew file mode 100644index 0000000000..67e1e8952d--- /dev/null+++ b/apps/university/vite.config.ts@@ -0,0 +1,65 @@+import { vitePlugin as remix } from "@remix-run/dev";+import { vercelPreset } from "@vercel/remix/vite";+import path from "node:path";+import { flatRoutes } from "remix-flat-routes";+import { defineConfig } from "vite";+import tsconfigPaths from "vite-tsconfig-paths";++export default defineConfig({+ build: {+ sourcemap: false,+ rollupOptions: {+ onwarn(warning, defaultHandler) {+ if (warning.code === "SOURCEMAP_ERROR") {+ return;+ }++ defaultHandler(warning);+ },+ },+ },+ define: {+ global: "globalThis",+ },+ ssr: {+ noExternal: [+ "react-tweet",+ "react-dropzone",+ "react-icons",+ "react-phone-number-input",+ "tailwind-merge",+ ],+ },+ server: {+ port: 3003,+ },+ plugins: [+ remix({+ presets: [vercelPreset()],+ future: {+ unstable_singleFetch: false,+ },+ ignoredRouteFiles: ["**/.*"],+ serverModuleFormat: "esm",+ routes: async (defineRoutes) => {+ return flatRoutes("routes", defineRoutes, {+ // eslint-disable-next-line no-undef+ appDir: path.resolve(__dirname, "app"),+ });+ },+ }),+ tsconfigPaths(),+ ],+ resolve: {+ alias: {+ "@carbon/utils": path.resolve(+ __dirname,+ "../../packages/utils/src/index.ts"+ ),+ "@carbon/form": path.resolve(+ __dirname,+ "../../packages/form/src/index.tsx"+ ),+ },+ },+});diff --git a/package.json b/package.jsonindex 55b2216556..22aaef76aa 100755--- a/package.json+++ b/package.json@@ -47,8 +47,9 @@"db:types": "npm run db:types -w @carbon/database","deploy": "turbo run deploy","dev": "turbo run dev --filter=./apps/erp --filter=./packages/",- "dev:starter": "turbo run dev --filter=./apps/starter --filter=./packages/","dev:mes": "turbo run dev --filter=./apps/mes",+ "dev:starter": "turbo run dev --filter=./apps/starter --filter=./packages/",+ "dev:university": "turbo run dev --filter=./apps/university --filter=./packages/","dev:packages": "turbo run dev --filter=./packages/*","generate:types": "tsx scripts/generate-db-types.ts","generate:swagger": "tsx scripts/generate-swagger-docs.ts && npx prettier --write ./packages/database/src/swagger-docs-schema.ts ",