The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
started fe work for js frameworks
ddux830e5619a00c
diff --git a/frontend/src/lib/components/add-project-modal.svelte b/frontend/src/lib/components/add-project-modal.svelteindex f7246856..db053abc 100644--- a/frontend/src/lib/components/add-project-modal.svelte+++ b/frontend/src/lib/components/add-project-modal.svelte@@ -23,14 +23,20 @@let createdProject = $state<ProjectWithToken | null>(null);let copied = $state(false);- // Framework options with labelsconst frameworks = [- { value: 'gin', label: 'Gin', description: 'Fast HTTP web framework' },- { value: 'fiber', label: 'Fiber', description: 'Express-inspired framework' },- { value: 'chi', label: 'Chi', description: 'Lightweight router' },- { value: 'fasthttp', label: 'FastHTTP', description: 'High-performance HTTP' },- { value: 'stdlib', label: 'Standard Library', description: 'net/http package' },- { value: 'custom', label: 'Custom', description: 'Other / manual setup' },+ { value: 'gin', label: 'Gin', description: 'Fast HTTP web framework', group: 'Go' },+ { value: 'fiber', label: 'Fiber', description: 'Express-inspired framework', group: 'Go' },+ { value: 'chi', label: 'Chi', description: 'Lightweight router', group: 'Go' },+ { value: 'fasthttp', label: 'FastHTTP', description: 'High-performance HTTP', group: 'Go' },+ { value: 'stdlib', label: 'Standard Library', description: 'net/http package', group: 'Go' },+ { value: 'custom', label: 'Custom', description: 'Other / manual setup', group: 'Go' },+ { value: 'react', label: 'React', description: 'Frontend UI library', group: 'JavaScript' },+ { value: 'svelte', label: 'Svelte', description: 'Frontend compiler framework', group: 'JavaScript' },+ { value: 'vuejs', label: 'Vue.js', description: 'Progressive frontend framework', group: 'JavaScript' },+ { value: 'nextjs', label: 'Next.js', description: 'React full-stack framework', group: 'JavaScript' },+ { value: 'nestjs', label: 'NestJS', description: 'Node.js server framework', group: 'JavaScript' },+ { value: 'express', label: 'Express', description: 'Minimal Node.js framework', group: 'JavaScript' },+ { value: 'remix', label: 'Remix', description: 'React full-stack framework', group: 'JavaScript' },] as const;const selectedFrameworkLabel = $derived(@@ -174,26 +180,48 @@</div></Select.Trigger><Select.Content>- {#each frameworks as framework}- <Select.Item value={framework.value}>- {#snippet children({ selected })}- <div class="flex items-center gap-2">- <FrameworkIcon framework={framework.value} />- <div class="flex flex-col">- <span class="font-medium">{framework.label}</span>- <span class="text-xs text-muted-foreground">{framework.description}</span>+ <Select.Group>+ <Select.GroupHeading class="px-2 py-1.5 text-xs font-semibold text-muted-foreground">Go</Select.GroupHeading>+ {#each frameworks.filter(f => f.group === 'Go') as framework}+ <Select.Item value={framework.value}>+ {#snippet children({ selected })}+ <div class="flex items-center gap-2">+ <FrameworkIcon framework={framework.value} />+ <div class="flex flex-col">+ <span class="font-medium">{framework.label}</span>+ <span class="text-xs text-muted-foreground">{framework.description}</span>+ </div></div>- </div>- {#if selected}- <Check class="absolute end-2 size-4" />- {/if}- {/snippet}- </Select.Item>- {/each}+ {#if selected}+ <Check class="absolute end-2 size-4" />+ {/if}+ {/snippet}+ </Select.Item>+ {/each}+ </Select.Group>+ <Select.Group>+ <Select.GroupHeading class="px-2 py-1.5 text-xs font-semibold text-muted-foreground">JavaScript</Select.GroupHeading>+ {#each frameworks.filter(f => f.group === 'JavaScript') as framework}+ <Select.Item value={framework.value}>+ {#snippet children({ selected })}+ <div class="flex items-center gap-2">+ <FrameworkIcon framework={framework.value} />+ <div class="flex flex-col">+ <span class="font-medium">{framework.label}</span>+ <span class="text-xs text-muted-foreground">{framework.description}</span>+ </div>+ </div>+ {#if selected}+ <Check class="absolute end-2 size-4" />+ {/if}+ {/snippet}+ </Select.Item>+ {/each}+ </Select.Group></Select.Content></Select.Root><p class="text-xs text-muted-foreground">- Select your Go web framework for tailored integration code+ Select your framework for tailored integration code</p></div>diff --git a/frontend/src/lib/components/app-sidebar.svelte b/frontend/src/lib/components/app-sidebar.svelteindex ac00e872..a3b68b9f 100644--- a/frontend/src/lib/components/app-sidebar.svelte+++ b/frontend/src/lib/components/app-sidebar.svelte@@ -3,7 +3,7 @@import { useSidebar } from '$lib/components/ui/sidebar';import { Bug, Link2, ChartNoAxesCombined, ChartNoAxesGantt, Gauge, ListEnd, Settings, BookOpen } from "@lucide/svelte";import { themeState } from '$lib/state/theme.svelte';- import { projectsState } from '$lib/state/projects.svelte';+ import { projectsState, isFrontendFramework } from '$lib/state/projects.svelte';import { LayoutDashboard } from "@lucide/svelte";import { page } from '$app/state';import { createRowClickHandler } from "$lib/utils/navigation";@@ -17,7 +17,9 @@external?: boolean;}- const sidebarItems: SidebarItem[] = [+ const hiddenForFrontend = new Set(['Endpoints', 'Tasks', 'Metrics']);++ const allSidebarItems: SidebarItem[] = [{Icon: LayoutDashboard, href: "/", title: "Dashboard", stickyParams: []},{Icon: Bug, href: "/issues", title: "Issues", stickyParams: []},{Icon: Gauge, href: "/endpoints", title: "Endpoints", stickyParams: ['presets', 'from', 'to']},@@ -26,6 +28,12 @@{Icon: Link2, href: "/connection", title: "Connection", stickyParams: []},]+ const sidebarItems = $derived(+ projectsState.currentProject && isFrontendFramework(projectsState.currentProject.framework)+ ? allSidebarItems.filter(item => !hiddenForFrontend.has(item.title))+ : allSidebarItems+ );+const allSidebarItemsBottom: SidebarItem[] = [{Icon: BookOpen, href: "https://docs.tracewayapp.com", title: "Docs", stickyParams: [], external: true},{Icon: Settings, href: "/settings", title: "Settings", stickyParams: [], adminOnly: true},diff --git a/frontend/src/lib/components/framework-icon.svelte b/frontend/src/lib/components/framework-icon.svelteindex 7d351e0d..febb0bbb 100644--- a/frontend/src/lib/components/framework-icon.svelte+++ b/frontend/src/lib/components/framework-icon.svelte@@ -23,6 +23,44 @@<img src="/fasthttp.png" alt="FastHTTP" class={className} />{:else if framework === 'stdlib'}<img src="/stdlib.png" alt="Standard Library" class={className} />+{:else if framework === 'react'}+ <svg class={className} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+ <circle cx="8" cy="8" r="1.5" fill="#61DAFB"/>+ <ellipse cx="8" cy="8" rx="6.5" ry="2.5" stroke="#61DAFB" stroke-width="0.8" fill="none"/>+ <ellipse cx="8" cy="8" rx="6.5" ry="2.5" stroke="#61DAFB" stroke-width="0.8" fill="none" transform="rotate(60 8 8)"/>+ <ellipse cx="8" cy="8" rx="6.5" ry="2.5" stroke="#61DAFB" stroke-width="0.8" fill="none" transform="rotate(120 8 8)"/>+ </svg>+{:else if framework === 'svelte'}+ <svg class={className} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path d="M13.2 2.8C11.8 0.8 9.1 0.2 7.1 1.4L3.8 3.6C2.9 4.2 2.3 5.1 2.1 6.1C2 6.9 2.1 7.7 2.5 8.4C2.2 8.9 2.1 9.5 2.1 10.1C2 11.1 2.4 12.1 3.1 12.8C4.5 14.8 7.2 15.4 9.2 14.2L12.5 12C13.4 11.4 14 10.5 14.2 9.5C14.3 8.7 14.2 7.9 13.8 7.2C14.1 6.7 14.2 6.1 14.2 5.5C14.3 4.5 13.9 3.5 13.2 2.8Z" fill="#FF3E00"/>+ <path d="M7.4 12.8C6.2 13.2 4.9 12.7 4.2 11.7C3.9 11.3 3.7 10.7 3.8 10.2L3.9 9.8L4.1 10.1C4.5 10.7 5.1 11.1 5.7 11.3L5.9 11.3C6.5 11.3 7.1 11 7.4 10.5C7.5 10.3 7.6 10 7.5 9.7C7.5 9.5 7.4 9.2 7.2 9.1L5.8 8.1C5 7.5 4.6 6.4 4.8 5.4C4.9 4.9 5.2 4.4 5.6 4.1L6.9 3.2C7.5 2.8 8.2 2.7 8.9 2.8C9.6 3 10.2 3.4 10.5 4C10.8 4.4 11 4.9 10.9 5.5L10.8 5.9L10.6 5.6C10.2 5 9.6 4.6 9 4.4L8.8 4.4C8.2 4.4 7.6 4.7 7.3 5.2C7.2 5.4 7.1 5.7 7.2 5.9C7.2 6.2 7.3 6.4 7.5 6.6L8.9 7.6C9.7 8.2 10.1 9.2 9.9 10.3C9.8 10.8 9.5 11.3 9.1 11.6L7.4 12.8Z" fill="white"/>+ </svg>+{:else if framework === 'vuejs'}+ <svg class={className} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path d="M12.8 1H10.4L8 5L5.6 1H3.2L8 9.5L12.8 1Z" fill="#41B883"/>+ <path d="M15 1H12.8L8 9.5L3.2 1H1L8 13L15 1Z" fill="#41B883" opacity="0.6"/>+ <path d="M12.8 1H10.4L8 5L5.6 1H3.2L8 9.5L12.8 1Z" fill="#35495E"/>+ </svg>+{:else if framework === 'nextjs'}+ <svg class={className} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+ <circle cx="8" cy="8" r="7" fill="currentColor"/>+ <path d="M6 5V11L11.5 5" stroke="var(--background, white)" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>+ <path d="M10.5 5V11" stroke="var(--background, white)" stroke-width="1.2" stroke-linecap="round"/>+ </svg>+{:else if framework === 'nestjs'}+ <svg class={className} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path d="M9.2 1.2C8.9 1.2 8.6 1.3 8.4 1.5C9 1.7 9.4 2.2 9.5 2.8C9.5 2.9 9.5 3 9.5 3.1C9.5 3.2 9.5 3.3 9.4 3.4C9.4 3.7 9.5 4 9.7 4.2C10 4.5 10.4 4.6 10.7 4.5C10.7 4.1 10.9 3.7 11.2 3.4C11.1 2.1 10.3 1.2 9.2 1.2Z" fill="#E0234E"/>+ <path d="M14 6.5C13.7 5.5 13.1 4.6 12.3 4C12.3 4 12.2 4 12.2 3.9C11.9 3.8 11.5 3.9 11.3 4.1C11.1 4.3 11 4.6 11.1 4.9C11.1 5 11.2 5.1 11.2 5.2C11.3 5.3 11.3 5.3 11.3 5.4C11 5.2 10.6 5.1 10.2 5.1C9.8 5.1 9.5 5.2 9.2 5.3C8 5.8 7.2 5.5 6.6 5.5C5.8 5.4 5.1 5.7 4.5 6.2C3.5 7.1 3.1 8.5 3.4 9.7C3.7 11.3 4.5 12.8 5.7 13.8C6.2 14.3 6.9 14.6 7.6 14.6C8 14.6 8.3 14.5 8.6 14.3C9.2 14.6 9.9 14.7 10.5 14.5C11.3 14.2 11.8 13.5 12 12.7C12.5 12.4 13 12 13.3 11.5C14.1 10 14.4 8.2 14 6.5Z" fill="#E0234E"/>+ </svg>+{:else if framework === 'express'}+ <svg class={className} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path d="M2 4H14V5.5H5V7.2H13V8.7H5V10.5H14V12H2V4Z" fill="currentColor"/>+ </svg>+{:else if framework === 'remix'}+ <svg class={className} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path d="M13.5 12.5H9.8C9.8 11.5 9.8 11 9.2 10.3C8.6 9.6 7.7 9.5 7 9.5H2.5V12.5H2.5V14H13.5V12.5Z" fill="currentColor"/>+ <path d="M7.5 2C10.5 2 13 3.5 13 6C13 7.8 11.8 9 9.5 9.3C10.6 9.6 11.2 10.3 11.3 11.5H13.5V10H15V13H13.5V12.5H9.8C9.8 11.2 9.4 10.5 7.5 10.5H2.5V8H7.5C9.8 8 11 7.2 11 5.8C11 4.4 9.8 3.5 7.5 3.5H2.5V2H7.5Z" fill="currentColor"/>+ </svg>{:else}<img src="/custom.png" alt="Custom" class={className} />{/if}diff --git a/frontend/src/lib/state/projects.svelte.ts b/frontend/src/lib/state/projects.svelte.tsindex bc70d648..c9580a01 100644--- a/frontend/src/lib/state/projects.svelte.ts+++ b/frontend/src/lib/state/projects.svelte.ts@@ -1,7 +1,18 @@import { api } from '$lib/api';import { authState } from './auth.svelte';-export type Framework = 'gin' | 'fiber' | 'chi' | 'fasthttp' | 'stdlib' | 'custom';+export type Framework = 'gin' | 'fiber' | 'chi' | 'fasthttp' | 'stdlib' | 'custom' | 'react' | 'svelte' | 'vuejs' | 'nextjs' | 'nestjs' | 'express' | 'remix';++export const FRONTEND_FRAMEWORKS: Framework[] = ['react', 'svelte', 'vuejs'];+export const JS_FRAMEWORKS: Framework[] = ['react', 'svelte', 'vuejs', 'nextjs', 'nestjs', 'express', 'remix'];++export function isFrontendFramework(fw: Framework): boolean {+ return FRONTEND_FRAMEWORKS.includes(fw);+}++export function isJsFramework(fw: Framework): boolean {+ return JS_FRAMEWORKS.includes(fw);+}export interface Project {id: string;diff --git a/frontend/src/lib/utils/framework-code.ts b/frontend/src/lib/utils/framework-code.tsindex 14ef47b5..daa0d99a 100644--- a/frontend/src/lib/utils/framework-code.ts+++ b/frontend/src/lib/utils/framework-code.ts@@ -1,4 +1,5 @@import type { Framework } from '$lib/state/projects.svelte';+import { isJsFramework } from '$lib/state/projects.svelte';export function getInstallCommand(framework: Framework): string {const base = 'go get go.tracewayapp.com';@@ -13,6 +14,20 @@ export function getInstallCommand(framework: Framework): string {return `${base} && go get go.tracewayapp.com/tracewayfasthttp`;case 'stdlib':return `${base} && go get go.tracewayapp.com/tracewayhttp`;+ case 'react':+ return 'npm install @tracewayapp/react';+ case 'svelte':+ return 'npm install @tracewayapp/svelte';+ case 'vuejs':+ return 'npm install @tracewayapp/vue';+ case 'nextjs':+ return 'npm install @tracewayapp/next';+ case 'nestjs':+ return 'npm install @tracewayapp/nest';+ case 'express':+ return 'npm install @tracewayapp/express';+ case 'remix':+ return 'npm install @tracewayapp/remix';case 'custom':default:return base;@@ -108,6 +123,71 @@ func main() {http.ListenAndServe(":8080", handler)}`;+ case 'react':+ return `import { init, captureException } from "@tracewayapp/react";++init("${connectionString}");++function App() {+ return <div>My App</div>;+}++export default App;`;++ case 'svelte':+ return `import { init, captureException } from "@tracewayapp/svelte";++init("${connectionString}");`;++ case 'vuejs':+ return `import { createApp } from "vue";+import { init, captureException } from "@tracewayapp/vue";++init("${connectionString}");++const app = createApp(App);+app.mount("#app");`;++ case 'nextjs':+ return `import { withTraceway } from "@tracewayapp/next";++export default withTraceway({+ connectionString: "${connectionString}",+});`;++ case 'nestjs':+ return `import { Module } from "@nestjs/common";+import { TracewayModule } from "@tracewayapp/nest";++@Module({+ imports: [+ TracewayModule.forRoot({+ connectionString: "${connectionString}",+ }),+ ],+})+export class AppModule {}`;++ case 'express':+ return `import express from "express";+import { traceway } from "@tracewayapp/express";++const app = express();+app.use(traceway("${connectionString}"));++app.get("/api/users", (req, res) => {+ res.json({ users: [] });+});++app.listen(8080);`;++ case 'remix':+ return `import { withTraceway } from "@tracewayapp/remix";++export default withTraceway({+ connectionString: "${connectionString}",+});`;+case 'custom':default:return `package main@@ -126,18 +206,40 @@ func main() {}}-export function getTestingRouteCode(): string {+export function getTestingRouteCode(framework?: Framework): string {+ if (framework && isJsFramework(framework)) {+ return `// Trigger a test error+throw new Error("Test error from Traceway integration");`;+ }return `r.GET("/testing", func(c *gin.Context) {panic("Test error from Traceway integration")})`;}-export function getTestingRouteCode2(): string {+export function getTestingRouteCode2(framework?: Framework): string {+ if (framework && isJsFramework(framework)) {+ return `import { captureException } from "@tracewayapp/${getPackageName(framework)}";++captureException(new Error("Test error from Traceway integration"));`;+ }return `r.GET("/testing", func(c *gin.Context) {c.AbortWithError(500, traceway.NewStackTraceErrorf("testing"))})`;}+function getPackageName(framework: Framework): string {+ switch (framework) {+ case 'react': return 'react';+ case 'svelte': return 'svelte';+ case 'vuejs': return 'vue';+ case 'nextjs': return 'next';+ case 'nestjs': return 'nest';+ case 'express': return 'express';+ case 'remix': return 'remix';+ default: return 'react';+ }+}+export function getFrameworkLabel(framework: Framework): string {const labels: Record<Framework, string> = {gin: 'Gin',@@ -145,7 +247,18 @@ export function getFrameworkLabel(framework: Framework): string {chi: 'Chi',fasthttp: 'FastHTTP',stdlib: 'Standard Library (net/http)',- custom: 'Custom Integration'+ custom: 'Custom Integration',+ react: 'React',+ svelte: 'Svelte',+ vuejs: 'Vue.js',+ nextjs: 'Next.js',+ nestjs: 'NestJS',+ express: 'Express',+ remix: 'Remix',};return labels[framework] || framework;}++export function getCodeLanguage(framework: Framework): 'go' | 'javascript' {+ return isJsFramework(framework) ? 'javascript' : 'go';+}diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelteindex 0431bbbd..2fc10b69 100644--- a/frontend/src/routes/+page.svelte+++ b/frontend/src/routes/+page.svelte@@ -22,11 +22,12 @@import { ViewAllTableRow } from '$lib/components/ui/view-all-table-row';import { api } from '$lib/api';import { ErrorDisplay } from '$lib/components/ui/error-display';- import { projectsState, type ProjectWithToken } from '$lib/state/projects.svelte';+ import { projectsState, type ProjectWithToken, isFrontendFramework, isJsFramework } from '$lib/state/projects.svelte';import { setSortState } from '$lib/utils/sort-storage';import { Button } from '$lib/components/ui/button';import Highlight from 'svelte-highlight';import go from 'svelte-highlight/languages/go';+ import javascript from 'svelte-highlight/languages/javascript';import bash from 'svelte-highlight/languages/bash';import { themeState } from '$lib/state/theme.svelte';import 'svelte-highlight/styles/github-dark.css';@@ -35,7 +36,8 @@getInstallCommand,getTestingRouteCode,getFrameworkLabel,- getTestingRouteCode2+ getTestingRouteCode2,+ getCodeLanguage} from '$lib/utils/framework-code';import { toast } from 'svelte-sonner';@@ -96,8 +98,22 @@: 'go get go.tracewayapp.com');- const testingRouteCode = getTestingRouteCode();- const testingRouteCode2 = getTestingRouteCode2();+ const isFrontend = $derived(+ projectWithToken ? isFrontendFramework(projectWithToken.framework) : false+ );++ const codeLanguage = $derived(+ projectWithToken ? getCodeLanguage(projectWithToken.framework) : 'go' as const+ );++ const highlightLanguage = $derived(codeLanguage === 'javascript' ? javascript : go);++ const testingRouteCode = $derived(+ getTestingRouteCode(projectWithToken?.framework)+ );+ const testingRouteCode2 = $derived(+ getTestingRouteCode2(projectWithToken?.framework)+ );async function copyInstall() {await navigator.clipboard.writeText(installCommand);@@ -293,7 +309,7 @@? 'dark-code': 'light-code'}">- <Highlight language={go} code={sdkCode} />+ <Highlight language={highlightLanguage} code={sdkCode} /></div></div></div>@@ -334,7 +350,7 @@? 'dark-code': 'light-code'}">- <Highlight language={go} code={testingRouteCode} />+ <Highlight language={highlightLanguage} code={testingRouteCode} /></div></div>@@ -357,7 +373,7 @@? 'dark-code': 'light-code'}">- <Highlight language={go} code={testingRouteCode2} />+ <Highlight language={highlightLanguage} code={testingRouteCode2} /></div></div></div>@@ -390,6 +406,7 @@</div>{:else if !error}<div class="space-y-6">+ {#if !isFrontend}<!-- Endpoints --><div><div class="items-bottom mb-4 flex gap-1">@@ -502,6 +519,7 @@</div>{/if}</div>+ {/if}<!-- Issues Section --><div>diff --git a/frontend/src/routes/connection/+page.svelte b/frontend/src/routes/connection/+page.svelteindex 6bb728f5..4e7d08ae 100644--- a/frontend/src/routes/connection/+page.svelte+++ b/frontend/src/routes/connection/+page.svelte@@ -8,18 +8,20 @@} from '$lib/components/ui/card';import { Button } from '$lib/components/ui/button';import { Copy, Check } from 'lucide-svelte';- import { projectsState, type ProjectWithToken } from '$lib/state/projects.svelte';+ import { projectsState, type ProjectWithToken, isJsFramework } from '$lib/state/projects.svelte';import { LoadingCircle } from '$lib/components/ui/loading-circle';import FrameworkIcon from '$lib/components/framework-icon.svelte';import Highlight from 'svelte-highlight';import go from 'svelte-highlight/languages/go';+ import javascript from 'svelte-highlight/languages/javascript';import bash from 'svelte-highlight/languages/bash';import { themeState } from '$lib/state/theme.svelte';import 'svelte-highlight/styles/github-dark.css';import {getFrameworkCode,getInstallCommand,- getFrameworkLabel+ getFrameworkLabel,+ getCodeLanguage} from '$lib/utils/framework-code';let projectWithToken = $derived(projectsState.currentProject);@@ -42,6 +44,14 @@: 'go get go.tracewayapp.com');+ const highlightLanguage = $derived(+ projectWithToken && isJsFramework(projectWithToken.framework) ? javascript : go+ );++ const isJs = $derived(+ projectWithToken ? isJsFramework(projectWithToken.framework) : false+ );+async function copyCode() {await navigator.clipboard.writeText(sdkCode);copiedCode = true;@@ -69,7 +79,7 @@{getFrameworkLabel(projectWithToken.framework)} Integration</CardTitle><CardDescription>- Add Traceway to your Go application with just a few lines of code.+ Add Traceway to your application with just a few lines of code.</CardDescription></CardHeader><CardContent>@@ -90,7 +100,7 @@? 'dark-code': 'light-code'}">- <Highlight language={go} code={sdkCode} />+ <Highlight language={highlightLanguage} code={sdkCode} /></div></div></CardContent>@@ -99,7 +109,7 @@<Card><CardHeader><CardTitle>Installation</CardTitle>- <CardDescription>Install the required packages using go get.</CardDescription>+ <CardDescription>Install the required packages{isJs ? '' : ' using go get'}.</CardDescription></CardHeader><CardContent><div class="relative">diff --git a/frontend/src/routes/register/+page.svelte b/frontend/src/routes/register/+page.svelteindex bf2eb98f..3b3cacab 100644--- a/frontend/src/routes/register/+page.svelte+++ b/frontend/src/routes/register/+page.svelte@@ -56,12 +56,19 @@}const frameworks = [- { value: 'gin', label: 'Gin', description: 'Fast HTTP web framework' },- { value: 'fiber', label: 'Fiber', description: 'Express-inspired framework' },- { value: 'chi', label: 'Chi', description: 'Lightweight router' },- { value: 'fasthttp', label: 'FastHTTP', description: 'High-performance HTTP' },- { value: 'stdlib', label: 'Standard Library', description: 'net/http package' },- { value: 'custom', label: 'Custom', description: 'Other / manual setup' },+ { value: 'gin', label: 'Gin', description: 'Fast HTTP web framework', group: 'Go' },+ { value: 'fiber', label: 'Fiber', description: 'Express-inspired framework', group: 'Go' },+ { value: 'chi', label: 'Chi', description: 'Lightweight router', group: 'Go' },+ { value: 'fasthttp', label: 'FastHTTP', description: 'High-performance HTTP', group: 'Go' },+ { value: 'stdlib', label: 'Standard Library', description: 'net/http package', group: 'Go' },+ { value: 'custom', label: 'Custom', description: 'Other / manual setup', group: 'Go' },+ { value: 'react', label: 'React', description: 'Frontend UI library', group: 'JavaScript' },+ { value: 'svelte', label: 'Svelte', description: 'Frontend compiler framework', group: 'JavaScript' },+ { value: 'vuejs', label: 'Vue.js', description: 'Progressive frontend framework', group: 'JavaScript' },+ { value: 'nextjs', label: 'Next.js', description: 'React full-stack framework', group: 'JavaScript' },+ { value: 'nestjs', label: 'NestJS', description: 'Node.js server framework', group: 'JavaScript' },+ { value: 'express', label: 'Express', description: 'Minimal Node.js framework', group: 'JavaScript' },+ { value: 'remix', label: 'Remix', description: 'React full-stack framework', group: 'JavaScript' },] as const;const selectedFrameworkLabel = $derived(@@ -213,22 +220,44 @@</div></Select.Trigger><Select.Content>- {#each frameworks as fw}- <Select.Item value={fw.value}>- {#snippet children({ selected })}- <div class="flex items-center gap-2">- <FrameworkIcon framework={fw.value} />- <div class="flex flex-col">- <span class="font-medium">{fw.label}</span>- <span class="text-xs text-muted-foreground">{fw.description}</span>+ <Select.Group>+ <Select.GroupHeading class="px-2 py-1.5 text-xs font-semibold text-muted-foreground">Go</Select.GroupHeading>+ {#each frameworks.filter(f => f.group === 'Go') as fw}+ <Select.Item value={fw.value}>+ {#snippet children({ selected })}+ <div class="flex items-center gap-2">+ <FrameworkIcon framework={fw.value} />+ <div class="flex flex-col">+ <span class="font-medium">{fw.label}</span>+ <span class="text-xs text-muted-foreground">{fw.description}</span>+ </div></div>- </div>- {#if selected}- <Check class="absolute end-2 size-4" />- {/if}- {/snippet}- </Select.Item>- {/each}+ {#if selected}+ <Check class="absolute end-2 size-4" />+ {/if}+ {/snippet}+ </Select.Item>+ {/each}+ </Select.Group>+ <Select.Group>+ <Select.GroupHeading class="px-2 py-1.5 text-xs font-semibold text-muted-foreground">JavaScript</Select.GroupHeading>+ {#each frameworks.filter(f => f.group === 'JavaScript') as fw}+ <Select.Item value={fw.value}>+ {#snippet children({ selected })}+ <div class="flex items-center gap-2">+ <FrameworkIcon framework={fw.value} />+ <div class="flex flex-col">+ <span class="font-medium">{fw.label}</span>+ <span class="text-xs text-muted-foreground">{fw.description}</span>+ </div>+ </div>+ {#if selected}+ <Check class="absolute end-2 size-4" />+ {/if}+ {/snippet}+ </Select.Item>+ {/each}+ </Select.Group></Select.Content></Select.Root></div>