diff --git a/frontend/.gitignore b/frontend/.gitignore
index 5fcf68e462..2826a9917e 100644
--- a/frontend/.gitignore
+++ b/frontend/.gitignore
@@ -49,7 +49,3 @@ vitest.config.*.timestamp*
# Environment files
.env.local
.env*.local
-
-# Next.js
-.next
-out
diff --git a/frontend/apps/artcraft-website/vite.config.ts b/frontend/apps/artcraft-website/vite.config.ts
index da5987c99f..4df77c2536 100644
--- a/frontend/apps/artcraft-website/vite.config.ts
+++ b/frontend/apps/artcraft-website/vite.config.ts
@@ -1,7 +1,7 @@
///
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
-import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
+import tsconfigPaths from 'vite-tsconfig-paths';
import { execSync } from 'child_process';
import path from 'path';
@@ -42,7 +42,7 @@ export default defineConfig(() => ({
port: 4300,
host: 'localhost',
},
- plugins: [generateNewsPlugin(), nxViteTsPaths(), react()],
+ plugins: [generateNewsPlugin(), tsconfigPaths(), react()],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
diff --git a/frontend/apps/artcraft/app/src/pages/PageDraw/stores/SceneState.ts b/frontend/apps/artcraft/app/src/pages/PageDraw/stores/SceneState.ts
index be7aafc1f4..1e9ccfddd0 100644
--- a/frontend/apps/artcraft/app/src/pages/PageDraw/stores/SceneState.ts
+++ b/frontend/apps/artcraft/app/src/pages/PageDraw/stores/SceneState.ts
@@ -1,6 +1,6 @@
import { create } from "zustand";
import { Node, NodeType } from "../Node";
-import { EnqueueImageBgRemoval } from "@storyteller/tauri-api";
+import { EnqueueImageBgRemoval } from "libs/tauri-api/src/lib/enqueue/EnqueueImageBgRemovalCommand";
import { ImageBundle } from "~/pages/PageEdit/HistoryStack";
import { BaseSelectorImage } from "~/pages/PageEdit/BaseImageSelector";
diff --git a/frontend/apps/artcraft/app/src/pages/PageEdit/BaseImageSelector.tsx b/frontend/apps/artcraft/app/src/pages/PageEdit/BaseImageSelector.tsx
index 353f223be6..f83dbba4f3 100644
--- a/frontend/apps/artcraft/app/src/pages/PageEdit/BaseImageSelector.tsx
+++ b/frontend/apps/artcraft/app/src/pages/PageEdit/BaseImageSelector.tsx
@@ -1,5 +1,5 @@
import { faImages, faPencil } from "@fortawesome/pro-solid-svg-icons";
-import { downloadFileFromUrl } from "@storyteller/api";
+import { downloadFileFromUrl } from "libs/api/src/lib/LocalApi";
import { GalleryModal, GalleryItem } from "@storyteller/ui-gallery-modal";
import { useState } from "react";
import toast from "react-hot-toast";
diff --git a/frontend/apps/artcraft/app/src/pages/PageEdit/stores/EditState.ts b/frontend/apps/artcraft/app/src/pages/PageEdit/stores/EditState.ts
index a228023f18..38e79bfc04 100644
--- a/frontend/apps/artcraft/app/src/pages/PageEdit/stores/EditState.ts
+++ b/frontend/apps/artcraft/app/src/pages/PageEdit/stores/EditState.ts
@@ -2,6 +2,7 @@ import { create } from "zustand";
import { LineNode, generateId } from "~/pages/PageDraw/stores/SceneState";
import { Node } from "~/pages/PageDraw/Node";
import { BaseSelectorImage } from "../BaseImageSelector";
+import { FetchProxy } from "libs/tauri-utils/src/lib/FetchProxy";
import { ImageBundle } from "../HistoryStack";
export type ActiveEditTool = "select" | "edit" | "expand" | "marker" | "eraser";
diff --git a/frontend/apps/artcraft/sb-vite.config.ts b/frontend/apps/artcraft/sb-vite.config.ts
index 437b21a270..5e38db4415 100644
--- a/frontend/apps/artcraft/sb-vite.config.ts
+++ b/frontend/apps/artcraft/sb-vite.config.ts
@@ -1,5 +1,5 @@
import { defineConfig, loadEnv } from "vite";
-import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
+import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
@@ -7,6 +7,6 @@ export default defineConfig(({ mode }) => {
return {
// no Remix Vite plugin here
- plugins: [nxViteTsPaths()],
+ plugins: [tsconfigPaths()],
};
});
diff --git a/frontend/apps/artcraft/vite.config.ts b/frontend/apps/artcraft/vite.config.ts
index 4d9fdeb48b..548c96224f 100644
--- a/frontend/apps/artcraft/vite.config.ts
+++ b/frontend/apps/artcraft/vite.config.ts
@@ -1,5 +1,5 @@
import { defineConfig, type Plugin } from "vite";
-import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
+import tsconfigPaths from "vite-tsconfig-paths";
import path from "path";
import { resolve } from "node:path";
import wasm from "vite-plugin-wasm";
@@ -56,7 +56,7 @@ export default defineConfig({
},
},
},
- plugins: [sparkWasmDataUrlFix(), nxViteTsPaths(), wasm()],
+ plugins: [sparkWasmDataUrlFix(), tsconfigPaths(), wasm()],
server: {
fs: {
allow: [workspaceRoot],
diff --git a/frontend/apps/genhub/.swcrc b/frontend/apps/genhub/.swcrc
deleted file mode 100644
index 257df6f482..0000000000
--- a/frontend/apps/genhub/.swcrc
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "jsc": {
- "target": "es2017",
- "parser": {
- "syntax": "typescript",
- "decorators": true,
- "dynamicImport": true
- },
- "transform": {
- "decoratorMetadata": true,
- "legacyDecorator": true
- },
- "keepClassNames": true,
- "externalHelpers": true,
- "loose": true
- },
- "module": {
- "type": "commonjs"
- },
- "sourceMaps": true,
- "exclude": ["jest.config.[ct]s",".*\\.spec.tsx?$",".*\\.test.tsx?$","./src/jest-setup.ts$","./**/jest-setup.ts$",".*.js$",".*.d.ts$"]
-}
diff --git a/frontend/apps/genhub/_redirects b/frontend/apps/genhub/_redirects
new file mode 100644
index 0000000000..f8243379a0
--- /dev/null
+++ b/frontend/apps/genhub/_redirects
@@ -0,0 +1 @@
+/* /index.html 200
\ No newline at end of file
diff --git a/frontend/apps/genhub/app/global.css b/frontend/apps/genhub/app/global.css
deleted file mode 100644
index 3649a53ad4..0000000000
--- a/frontend/apps/genhub/app/global.css
+++ /dev/null
@@ -1,128 +0,0 @@
-@import "tailwindcss";
-@import "tw-animate-css";
-
-@import "@fontsource-variable/figtree";
-
-@custom-variant dark (&:is(.dark *));
-
-@theme inline {
- --color-background: var(--background);
- --color-foreground: var(--foreground);
- --color-card: var(--card);
- --color-card-foreground: var(--card-foreground);
- --color-popover: var(--popover);
- --color-popover-foreground: var(--popover-foreground);
- --color-primary: var(--primary);
- --color-primary-foreground: var(--primary-foreground);
- --color-secondary: var(--secondary);
- --color-secondary-foreground: var(--secondary-foreground);
- --color-muted: var(--muted);
- --color-muted-foreground: var(--muted-foreground);
- --color-accent: var(--accent);
- --color-accent-foreground: var(--accent-foreground);
- --color-destructive: var(--destructive);
- --color-destructive-foreground: var(--destructive-foreground);
- --color-border: var(--border);
- --color-input: var(--input);
- --color-ring: var(--ring);
- --color-chart-1: var(--chart-1);
- --color-chart-2: var(--chart-2);
- --color-chart-3: var(--chart-3);
- --color-chart-4: var(--chart-4);
- --color-chart-5: var(--chart-5);
- --color-sidebar: var(--sidebar);
- --color-sidebar-foreground: var(--sidebar-foreground);
- --color-sidebar-primary: var(--sidebar-primary);
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
- --color-sidebar-accent: var(--sidebar-accent);
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
- --color-sidebar-border: var(--sidebar-border);
- --color-sidebar-ring: var(--sidebar-ring);
- --radius-sm: calc(var(--radius) - 4px);
- --radius-md: calc(var(--radius) - 2px);
- --radius-lg: var(--radius);
- --radius-xl: calc(var(--radius) + 4px);
-
- --font-sans: "Figtree Variable", ui-sans-serif, system-ui, sans-serif,
- "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-}
-
-:root {
- --radius: 0.625rem;
- --background: oklch(1 0 0);
- --foreground: oklch(0.145 0 0);
- --card: oklch(1 0 0);
- --card-foreground: oklch(0.145 0 0);
- --popover: oklch(1 0 0);
- --popover-foreground: oklch(0.145 0 0);
- --primary: oklch(0.205 0 0);
- --primary-foreground: oklch(0.985 0 0);
- --secondary: oklch(0.97 0 0);
- --secondary-foreground: oklch(0.205 0 0);
- --muted: oklch(0.97 0 0);
- --muted-foreground: oklch(0.556 0 0);
- --accent: oklch(0.97 0 0);
- --accent-foreground: oklch(0.205 0 0);
- --destructive: oklch(0.577 0.245 27.325);
- --destructive-foreground: oklch(0.577 0.245 27.325);
- --border: oklch(0.922 0 0);
- --input: oklch(0.922 0 0);
- --ring: oklch(0.708 0 0);
- --chart-1: oklch(0.646 0.222 41.116);
- --chart-2: oklch(0.6 0.118 184.704);
- --chart-3: oklch(0.398 0.07 227.392);
- --chart-4: oklch(0.828 0.189 84.429);
- --chart-5: oklch(0.769 0.188 70.08);
- --sidebar: oklch(0.985 0 0);
- --sidebar-foreground: oklch(0.145 0 0);
- --sidebar-primary: oklch(0.205 0 0);
- --sidebar-primary-foreground: oklch(0.985 0 0);
- --sidebar-accent: oklch(0.97 0 0);
- --sidebar-accent-foreground: oklch(0.205 0 0);
- --sidebar-border: oklch(0.922 0 0);
- --sidebar-ring: oklch(0.708 0 0);
-}
-
-.dark {
- --background: oklch(0.145 0 0);
- --foreground: oklch(0.985 0 0);
- --card: oklch(0.145 0 0);
- --card-foreground: oklch(0.985 0 0);
- --popover: oklch(0.145 0 0);
- --popover-foreground: oklch(0.985 0 0);
- --primary: oklch(0.985 0 0);
- --primary-foreground: oklch(0.205 0 0);
- --secondary: oklch(0.269 0 0);
- --secondary-foreground: oklch(0.985 0 0);
- --muted: oklch(0.269 0 0);
- --muted-foreground: oklch(0.708 0 0);
- --accent: oklch(0.269 0 0);
- --accent-foreground: oklch(0.985 0 0);
- --destructive: oklch(0.396 0.141 25.723);
- --destructive-foreground: oklch(0.637 0.237 25.331);
- --border: oklch(0.269 0 0);
- --input: oklch(0.269 0 0);
- --ring: oklch(0.439 0 0);
- --chart-1: oklch(0.488 0.243 264.376);
- --chart-2: oklch(0.696 0.17 162.48);
- --chart-3: oklch(0.769 0.188 70.08);
- --chart-4: oklch(0.627 0.265 303.9);
- --chart-5: oklch(0.645 0.246 16.439);
- --sidebar: oklch(0.205 0 0);
- --sidebar-foreground: oklch(0.985 0 0);
- --sidebar-primary: oklch(0.488 0.243 264.376);
- --sidebar-primary-foreground: oklch(0.985 0 0);
- --sidebar-accent: oklch(0.269 0 0);
- --sidebar-accent-foreground: oklch(0.985 0 0);
- --sidebar-border: oklch(0.269 0 0);
- --sidebar-ring: oklch(0.439 0 0);
-}
-
-@layer base {
- * {
- @apply border-border;
- }
- body {
- @apply bg-background text-foreground font-sans antialiased;
- }
-}
diff --git a/frontend/apps/genhub/app/layout.tsx b/frontend/apps/genhub/app/layout.tsx
deleted file mode 100644
index 4153f0f158..0000000000
--- a/frontend/apps/genhub/app/layout.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import type { Metadata } from "next";
-import "./global.css";
-
-export const metadata: Metadata = {
- title: {
- default: "GenHub — Community Prompts by Storyteller",
- template: "%s | GenHub",
- },
- description:
- "Discover, share, and remix AI prompts for image, video, and audio generation.",
- openGraph: {
- title: "GenHub — Community Prompts by Storyteller",
- description:
- "Discover, share, and remix AI prompts for image, video, and audio generation.",
- type: "website",
- siteName: "GenHub",
- },
- twitter: {
- card: "summary_large_image",
- title: "GenHub — Community Prompts by Storyteller",
- description:
- "Discover, share, and remix AI prompts for image, video, and audio generation.",
- },
-};
-
-export default function RootLayout({
- children,
-}: {
- children: React.ReactNode;
-}) {
- return (
-
-
{children}
-
- );
-}
diff --git a/frontend/apps/genhub/app/page.tsx b/frontend/apps/genhub/app/page.tsx
deleted file mode 100644
index 180a412e04..0000000000
--- a/frontend/apps/genhub/app/page.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-export default function Home() {
- return (
-
- );
-}
diff --git a/frontend/apps/genhub/components.json b/frontend/apps/genhub/components.json
index 5f09364274..131588b0bd 100644
--- a/frontend/apps/genhub/components.json
+++ b/frontend/apps/genhub/components.json
@@ -5,7 +5,7 @@
"tsx": true,
"tailwind": {
"config": "",
- "css": "app/global.css",
+ "css": "src/styles.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
diff --git a/frontend/apps/genhub/index.d.ts b/frontend/apps/genhub/index.d.ts
deleted file mode 100644
index 71997ece1a..0000000000
--- a/frontend/apps/genhub/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/* eslint-disable @typescript-eslint/no-explicit-any */
-declare module '*.svg' {
- const content: any;
- export const ReactComponent: any;
- export default content;
-}
-
-
diff --git a/frontend/apps/genhub/index.html b/frontend/apps/genhub/index.html
new file mode 100644
index 0000000000..7709fb7f73
--- /dev/null
+++ b/frontend/apps/genhub/index.html
@@ -0,0 +1,16 @@
+
+
+
+
+ Genhub
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/apps/genhub/netlify.toml b/frontend/apps/genhub/netlify.toml
index 94e21559bb..0eb5c3ba1e 100644
--- a/frontend/apps/genhub/netlify.toml
+++ b/frontend/apps/genhub/netlify.toml
@@ -1,6 +1,23 @@
[build]
- command = "npx nx build genhub"
- publish = "apps/genhub/.next"
+command = "./apps/genhub/script/netlify_build.sh"
+publish = "apps/genhub/dist/"
-[[plugins]]
- package = "@netlify/plugin-nextjs"
+[[headers]]
+for = "/build/*"
+
+[headers.values]
+"Cache-Control" = "public, max-age=31560000, immutable"
+
+# [[redirects]]
+# from = "/ingest/static/*"
+# to = "https://us-assets.i.posthog.com/static/:splat"
+# host = "us-assets.i.posthog.com"
+# status = 200
+# force = true
+#
+# [[redirects]]
+# from = "/ingest/*"
+# to = "https://us.i.posthog.com/:splat"
+# host = "us.i.posthog.com"
+# status = 200
+# force = true
diff --git a/frontend/apps/genhub/next-env.d.ts b/frontend/apps/genhub/next-env.d.ts
deleted file mode 100644
index c4b7818fbb..0000000000
--- a/frontend/apps/genhub/next-env.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-///
-///
-import "./.next/dev/types/routes.d.ts";
-
-// NOTE: This file should not be edited
-// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/frontend/apps/genhub/next.config.js b/frontend/apps/genhub/next.config.js
deleted file mode 100644
index dd3fb25cbe..0000000000
--- a/frontend/apps/genhub/next.config.js
+++ /dev/null
@@ -1,22 +0,0 @@
-//@ts-check
-
-// eslint-disable-next-line @typescript-eslint/no-var-requires
-const { composePlugins, withNx } = require('@nx/next');
-
-
-/**
- * @type {import('@nx/next/plugins/with-nx').WithNxOptions}
- **/
-const nextConfig = {
- // Use this to set Nx-specific options
- // See: https://nx.dev/recipes/next/next-config-setup
- nx: {},
-};
-
-const plugins = [
- // Add more Next.js plugins to this list if needed.
- withNx,
-];
-
-module.exports = composePlugins(...plugins)(nextConfig);
-
diff --git a/frontend/apps/genhub/package.json b/frontend/apps/genhub/package.json
index 0905c174da..57fcaea42a 100644
--- a/frontend/apps/genhub/package.json
+++ b/frontend/apps/genhub/package.json
@@ -2,35 +2,26 @@
"name": "@frontend/genhub",
"version": "0.0.1",
"private": true,
- "nx": {
- "name": "genhub",
- "implicitDependencies": ["!artcraft"]
+ "scripts": {
+ "dev": "vite",
+ "build": "vite build",
+ "preview": "vite preview"
},
"dependencies": {
- "@base-ui/react": "^1.2.0",
"@fontsource-variable/figtree": "^5.2.10",
"@fontsource-variable/geist": "^5.2.8",
- "@netlify/plugin-nextjs": "^5.15.9",
- "@tailwindcss/postcss": "^4.2.1",
+ "@tailwindcss/vite": "^4.2.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
- "date-fns": "^4.1.0",
- "embla-carousel-react": "^8.6.0",
"input-otp": "^1.4.2",
- "lucide-react": "^0.577.0",
- "next": "~15.5.12",
+ "lucide-react": "^0.512.0",
"next-themes": "^0.4.6",
- "postcss": "^8.5.8",
"radix-ui": "^1.4.3",
- "react": "18.3.1",
- "react-day-picker": "^9.14.0",
- "react-dom": "18.3.1",
"react-resizable-panels": "^4.7.2",
- "recharts": "^2.15.4",
"shadcn": "^4.0.5",
"sonner": "^2.0.7",
- "tailwind-merge": "^3.5.0",
+ "tailwind-merge": "^2.2.2",
"tailwindcss": "^4.2.1",
"tw-animate-css": "^1.4.0",
"vaul": "^1.1.2"
diff --git a/frontend/apps/genhub/postcss.config.mjs b/frontend/apps/genhub/postcss.config.mjs
deleted file mode 100644
index 61e36849cf..0000000000
--- a/frontend/apps/genhub/postcss.config.mjs
+++ /dev/null
@@ -1,7 +0,0 @@
-const config = {
- plugins: {
- "@tailwindcss/postcss": {},
- },
-};
-
-export default config;
diff --git a/frontend/apps/genhub/public/_redirects b/frontend/apps/genhub/public/_redirects
deleted file mode 100644
index ad37e2c2c9..0000000000
--- a/frontend/apps/genhub/public/_redirects
+++ /dev/null
@@ -1 +0,0 @@
-/* /index.html 200
diff --git a/frontend/apps/genhub/script/netlify_build.sh b/frontend/apps/genhub/script/netlify_build.sh
new file mode 100644
index 0000000000..507838ad62
--- /dev/null
+++ b/frontend/apps/genhub/script/netlify_build.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -euxo pipefail
+
+echo "Run build script (TODO: Make strict)"
+nx build genhub
+
+echo "Change to project dir"
+pushd apps/genhub/
+
+echo "Copy netlify configs into dist"
+#cp _headers dist/
+cp _redirects dist/
+
+#echo "Copy netlify 404.html page into dist"
+#cp "404.html" dist/
+
+echo "List final files in build"
+find dist/
+
diff --git a/frontend/apps/genhub/src/app/app.module.css b/frontend/apps/genhub/src/app/app.module.css
new file mode 100644
index 0000000000..7b88fbabf8
--- /dev/null
+++ b/frontend/apps/genhub/src/app/app.module.css
@@ -0,0 +1 @@
+/* Your styles goes here. */
diff --git a/frontend/apps/genhub/src/app/app.spec.tsx b/frontend/apps/genhub/src/app/app.spec.tsx
new file mode 100644
index 0000000000..b3ac142224
--- /dev/null
+++ b/frontend/apps/genhub/src/app/app.spec.tsx
@@ -0,0 +1,16 @@
+import { render } from '@testing-library/react';
+import { BrowserRouter } from 'react-router-dom';
+
+import App from './app';
+
+describe('App', () => {
+ it('should render successfully', () => {
+ const { baseElement } = render();
+ expect(baseElement).toBeTruthy();
+ });
+
+ it('should have a greeting as the title', () => {
+ const { getAllByText } = render();
+ expect(getAllByText(new RegExp('Welcome @frontend/genhub', 'gi')).length > 0).toBeTruthy();
+ });
+});
diff --git a/frontend/apps/genhub/src/app/app.tsx b/frontend/apps/genhub/src/app/app.tsx
new file mode 100644
index 0000000000..b5375c3864
--- /dev/null
+++ b/frontend/apps/genhub/src/app/app.tsx
@@ -0,0 +1,14 @@
+// Uncomment this line to use CSS modules
+// import styles from './app.module.css';
+
+export function App() {
+ return (
+
+ );
+}
+
+export default App;
diff --git a/frontend/apps/genhub/src/app/nx-welcome.tsx b/frontend/apps/genhub/src/app/nx-welcome.tsx
new file mode 100644
index 0000000000..63cc7d12c2
--- /dev/null
+++ b/frontend/apps/genhub/src/app/nx-welcome.tsx
@@ -0,0 +1,857 @@
+/*
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ This is a starter component and can be deleted.
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ Delete this file and get started with your project!
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ */
+export function NxWelcome({ title }: { title: string }) {
+ return (
+ <>
+