├── public ├── logo.png ├── favicon.ico ├── placeholder.jpg ├── placeholder-logo.png ├── placeholder-user.jpg ├── placeholder-logo.svg └── placeholder.svg ├── app ├── page.tsx ├── api │ ├── ai-services │ │ └── route.ts │ ├── run │ │ └── route.ts │ ├── status │ │ └── [jobId] │ │ │ └── route.ts │ ├── image-proxy │ │ └── route.ts │ └── upload │ │ └── route.ts ├── layout.tsx └── globals.css ├── postcss.config.mjs ├── lib ├── utils.ts └── ai-services.ts ├── next.config.mjs ├── components ├── theme-provider.tsx ├── ui │ ├── collapsible.tsx │ ├── label.tsx │ ├── textarea.tsx │ ├── progress.tsx │ ├── input.tsx │ ├── slider.tsx │ ├── switch.tsx │ ├── badge.tsx │ ├── scroll-area.tsx │ ├── card.tsx │ ├── button.tsx │ └── select.tsx ├── theme-toggle.tsx └── glb-viewer-window.tsx ├── .gitignore ├── components.json ├── tsconfig.json ├── package.json └── README.md /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camenduru/TostUI/HEAD/public/logo.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camenduru/TostUI/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camenduru/TostUI/HEAD/public/placeholder.jpg -------------------------------------------------------------------------------- /public/placeholder-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camenduru/TostUI/HEAD/public/placeholder-logo.png -------------------------------------------------------------------------------- /public/placeholder-user.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/camenduru/TostUI/HEAD/public/placeholder-user.jpg -------------------------------------------------------------------------------- /app/page.tsx: -------------------------------------------------------------------------------- 1 | import { CanvasEditor } from "@/components/canvas-editor" 2 | 3 | export default function Home() { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | '@tailwindcss/postcss': {}, 5 | }, 6 | } 7 | 8 | export default config 9 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from 'clsx' 2 | import { twMerge } from 'tailwind-merge' 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | typescript: { 4 | ignoreBuildErrors: false, 5 | }, 6 | images: { 7 | unoptimized: true, 8 | }, 9 | devIndicators: false, 10 | } 11 | 12 | export default nextConfig -------------------------------------------------------------------------------- /components/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import { 5 | ThemeProvider as NextThemesProvider, 6 | type ThemeProviderProps, 7 | } from 'next-themes' 8 | 9 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 10 | return {children} 11 | } 12 | -------------------------------------------------------------------------------- /components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 5 | 6 | const Collapsible = CollapsiblePrimitive.Root 7 | 8 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 9 | 10 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 11 | 12 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # next.js 7 | /.next/ 8 | /out/ 9 | 10 | # production 11 | /build 12 | 13 | # debug 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | .pnpm-debug.log* 18 | 19 | # env files 20 | .env* 21 | 22 | # vercel 23 | .vercel 24 | 25 | # typescript 26 | *.tsbuildinfo 27 | next-env.d.ts -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "", 8 | "css": "app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } 22 | -------------------------------------------------------------------------------- /app/api/ai-services/route.ts: -------------------------------------------------------------------------------- 1 | import { NextResponse } from 'next/server' 2 | 3 | export async function GET() { 4 | try { 5 | const url = process.env.TOST_AI_SERVICES_URL 6 | if (!url) { 7 | return NextResponse.json({ error: 'TOST_AI_SERVICES_URL not configured' }, { status: 500 }) 8 | } 9 | const response = await fetch(url) 10 | const data = await response.json() 11 | return NextResponse.json(data) 12 | } catch (error) { 13 | console.error('Failed to fetch AI services:', error) 14 | return NextResponse.json({ error: 'Failed to fetch AI services' }, { status: 500 }) 15 | } 16 | } -------------------------------------------------------------------------------- /components/theme-toggle.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import { Moon, Sun } from 'lucide-react' 5 | import { useTheme } from 'next-themes' 6 | 7 | import { Button } from '@/components/ui/button' 8 | 9 | export function ThemeToggle() { 10 | const { setTheme, theme } = useTheme() 11 | 12 | return ( 13 | 22 | ) 23 | } -------------------------------------------------------------------------------- /components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | import { cva, type VariantProps } from "class-variance-authority" 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const labelVariants = cva( 10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 11 | ) 12 | 13 | const Label = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | VariantProps 17 | >(({ className, ...props }, ref) => ( 18 | 23 | )) 24 | Label.displayName = LabelPrimitive.Root.displayName 25 | 26 | export { Label } -------------------------------------------------------------------------------- /components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |