diff --git a/apps/ensadmin/.cta.json b/apps/ensadmin/.cta.json new file mode 100644 index 000000000..35699ff2b --- /dev/null +++ b/apps/ensadmin/.cta.json @@ -0,0 +1,12 @@ +{ + "projectName": "ensadmin-vite", + "mode": "file-router", + "typescript": true, + "tailwind": true, + "packageManager": "pnpm", + "addOnOptions": {}, + "git": true, + "version": 1, + "framework": "react-cra", + "chosenAddOns": ["biome"] +} diff --git a/apps/ensadmin/.gitignore b/apps/ensadmin/.gitignore index 3639bc528..58b859832 100644 --- a/apps/ensadmin/.gitignore +++ b/apps/ensadmin/.gitignore @@ -1,42 +1,10 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc +node_modules .DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# env files (can opt-in for committing if needed) -.env* -!.env*.example - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts +dist +dist-ssr +*.local +count.txt +.env +.nitro +.tanstack +.wrangler diff --git a/apps/ensadmin/Dockerfile b/apps/ensadmin/Dockerfile index 8b38d9678..f1a8fb1f3 100644 --- a/apps/ensadmin/Dockerfile +++ b/apps/ensadmin/Dockerfile @@ -18,7 +18,7 @@ RUN pnpm --filter ensadmin build FROM nginx:alpine AS runner # Copy the static export output -COPY --from=builder /app/apps/ensadmin/out /usr/share/nginx/html +COPY --from=builder /app/apps/ensadmin/dist /usr/share/nginx/html # Replace default nginx configuration with our own RUN rm -f /etc/nginx/conf.d/default.conf.default diff --git a/apps/ensadmin/biome.jsonc b/apps/ensadmin/biome.jsonc index 9a2ce4db6..542522eb8 100644 --- a/apps/ensadmin/biome.jsonc +++ b/apps/ensadmin/biome.jsonc @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.1/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.2/schema.json", "extends": "//", "css": { "parser": { @@ -15,3 +15,39 @@ } } } + +// { +// "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json", +// "vcs": { +// "enabled": false, +// "clientKind": "git", +// "useIgnoreFile": false +// }, +// "files": { +// "ignoreUnknown": false, +// "includes": [ +// "**/src/**/*", +// "**/.vscode/**/*", +// "**/index.html", +// "**/vite.config.js", +// "!**/src/routeTree.gen.ts", +// "!**/src/styles.css" +// ] +// }, +// "formatter": { +// "enabled": true, +// "indentStyle": "tab" +// }, +// "assist": { "actions": { "source": { "organizeImports": "on" } } }, +// "linter": { +// "enabled": true, +// "rules": { +// "recommended": true +// } +// }, +// "javascript": { +// "formatter": { +// "quoteStyle": "double" +// } +// } +// } diff --git a/apps/ensadmin/components.json b/apps/ensadmin/components.json index 4e3cb4705..67b287a0d 100644 --- a/apps/ensadmin/components.json +++ b/apps/ensadmin/components.json @@ -1,15 +1,16 @@ { "$schema": "https://ui.shadcn.com/schema.json", "style": "new-york", - "rsc": true, + "rsc": false, "tsx": true, "tailwind": { - "config": "tailwind.config.ts", - "css": "src/app/globals.css", + "config": "", + "css": "src/styles.css", "baseColor": "slate", "cssVariables": true, "prefix": "" }, + "iconLibrary": "lucide", "aliases": { "components": "@/components", "utils": "@/lib/utils", @@ -17,5 +18,5 @@ "lib": "@/lib", "hooks": "@/hooks" }, - "iconLibrary": "lucide" + "registries": {} } diff --git a/apps/ensadmin/index.html b/apps/ensadmin/index.html new file mode 100644 index 000000000..2f6cc28eb --- /dev/null +++ b/apps/ensadmin/index.html @@ -0,0 +1,50 @@ + + + + + + + + + + ENSAdmin + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + diff --git a/apps/ensadmin/next.config.ts b/apps/ensadmin/next.config.ts deleted file mode 100644 index 1fe68bf39..000000000 --- a/apps/ensadmin/next.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { NextConfig } from "next"; - -const nextConfig: NextConfig = { - // Use Single Page App mode only for ENSAdmin - output: "export", - // Enable source maps in production - productionBrowserSourceMaps: true, -}; - -export default nextConfig; diff --git a/apps/ensadmin/nginx.conf b/apps/ensadmin/nginx.conf index 447a4771f..94dd4c4e8 100644 --- a/apps/ensadmin/nginx.conf +++ b/apps/ensadmin/nginx.conf @@ -5,19 +5,6 @@ server { root /usr/share/nginx/html; index index.html; - # Backward compatibility redirects from ENSNode services - location = /about { - return 301 /; - } - - location = /gql/subgraph-compat { - return 301 /api/subgraph; - } - - location = /gql/ponder { - return 301 /; - } - # Try to serve the requested URI, then with .html extension, then as directory, or 404 location / { try_files $uri $uri.html $uri/ =404; diff --git a/apps/ensadmin/package.json b/apps/ensadmin/package.json index 411b09282..cb25befa6 100644 --- a/apps/ensadmin/package.json +++ b/apps/ensadmin/package.json @@ -13,9 +13,9 @@ }, "homepage": "https://github.com/namehash/ensnode/tree/main/apps/ensadmin", "scripts": { - "dev": "next dev -p 4173", - "build": "next build", - "start": "serve out -l 4173", + "dev": "vite --port 4173", + "build": "vite build && tsc", + "start": "serve dist -l 4173", "lint": "biome check --write .", "lint:ci": "biome ci", "typecheck": "tsc --noEmit", @@ -27,6 +27,7 @@ "@ensnode/ensnode-schema": "workspace:*", "@ensnode/ensnode-sdk": "workspace:*", "@ensnode/ponder-metadata": "workspace:*", + "@fontsource-variable/inter": "^5.2.8", "@formkit/auto-animate": "^0.9.0", "@graphiql/plugin-explorer": "5.1.1", "@graphiql/react": "0.37.1", @@ -42,10 +43,16 @@ "@radix-ui/react-label": "^2.1.2", "@radix-ui/react-select": "^2.1.6", "@radix-ui/react-separator": "^1.1.2", - "@radix-ui/react-slot": "^1.1.2", + "@radix-ui/react-slot": "^1.2.3", "@radix-ui/react-tabs": "^1.1.13", "@radix-ui/react-tooltip": "^1.1.8", - "@tanstack/react-query": "^5.66.9", + "@tailwindcss/vite": "^4.1.16", + "@tanstack/react-devtools": "^0.7.0", + "@tanstack/react-query": "^5.90.5", + "@tanstack/react-query-devtools": "^5.90.2", + "@tanstack/react-router": "^1.132.0", + "@tanstack/react-router-devtools": "^1.132.0", + "@tanstack/router-plugin": "^1.132.0", "@xyflow/react": "^12.4.4", "boring-avatars": "^1.11.2", "class-variance-authority": "^0.7.1", @@ -54,25 +61,31 @@ "date-fns": "catalog:", "graphiql": "5.2.0", "graphql": "^16.10.0", - "lucide-react": "^0.548.0", - "next": "16.0.1", - "next-themes": "^0.4.6", - "react": "^19", - "react-dom": "^19", + "lucide-react": "^0.545.0", + "react": "^19.2.0", + "react-dom": "^19.2.0", "rooks": "^8.4.0", "serve": "^14.2.5", "sonner": "^2.0.3", - "tailwind-merge": "^3.0.2", + "tailwind-merge": "^3.3.1", + "tailwindcss": "^4.1.5", "tailwindcss-animate": "^1.0.7", - "viem": "catalog:" + "viem": "catalog:", + "vite-plugin-monaco-editor": "^1.1.0" }, "devDependencies": { - "@types/node": "^22", - "@types/react": "^19", - "@types/react-dom": "^19", - "postcss": "^8", - "tailwindcss": "^3.4.17", - "typescript": "^5", - "vitest": "catalog:" + "@biomejs/biome": "2.2.4", + "@testing-library/dom": "^10.4.0", + "@testing-library/react": "^16.2.0", + "@types/node": "^22.18.13", + "@types/react": "^19.2.0", + "@types/react-dom": "^19.2.0", + "@vitejs/plugin-react": "^5.0.4", + "jsdom": "^27.0.0", + "tw-animate-css": "^1.4.0", + "typescript": "^5.7.2", + "vite": "^7.1.7", + "vitest": "catalog:", + "web-vitals": "^5.1.0" } } diff --git a/apps/ensadmin/postcss.config.mjs b/apps/ensadmin/postcss.config.mjs deleted file mode 100644 index 1a69fd2a4..000000000 --- a/apps/ensadmin/postcss.config.mjs +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('postcss-load-config').Config} */ -const config = { - plugins: { - tailwindcss: {}, - }, -}; - -export default config; diff --git a/apps/ensadmin/src/app/@actions/api/subgraph/page.tsx b/apps/ensadmin/src/app/@actions/api/subgraph/page.tsx deleted file mode 100644 index 24bb8506c..000000000 --- a/apps/ensadmin/src/app/@actions/api/subgraph/page.tsx +++ /dev/null @@ -1,21 +0,0 @@ -"use client"; - -import { CopyButton } from "@/components/copy-button"; -import { useSelectedConnection } from "@/hooks/active/use-selected-connection"; - -export default function ActionsSubgraphCompatPage() { - const { validatedSelectedConnection } = useSelectedConnection(); - - // TODO: we need a broader refactor to recognize the difference between - // a selected connection being in a valid format or not. - if (!validatedSelectedConnection.isValid) return null; - - const url = new URL(`/subgraph`, validatedSelectedConnection.url).toString(); - - return ( -
- {url} - -
- ); -} diff --git a/apps/ensadmin/src/app/@actions/connection/page.tsx b/apps/ensadmin/src/app/@actions/connection/page.tsx deleted file mode 100644 index 0c2eca337..000000000 --- a/apps/ensadmin/src/app/@actions/connection/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function ConnectionActions() { - return null; -} diff --git a/apps/ensadmin/src/app/@actions/default.tsx b/apps/ensadmin/src/app/@actions/default.tsx deleted file mode 100644 index 44918316f..000000000 --- a/apps/ensadmin/src/app/@actions/default.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function ActionsDefault() { - return null; -} diff --git a/apps/ensadmin/src/app/@actions/inspect/primary-name/page.tsx b/apps/ensadmin/src/app/@actions/inspect/primary-name/page.tsx deleted file mode 100644 index 04a75648f..000000000 --- a/apps/ensadmin/src/app/@actions/inspect/primary-name/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function PrimaryNameActions() { - return null; -} diff --git a/apps/ensadmin/src/app/@actions/inspect/primary-names/page.tsx b/apps/ensadmin/src/app/@actions/inspect/primary-names/page.tsx deleted file mode 100644 index 759aaac3a..000000000 --- a/apps/ensadmin/src/app/@actions/inspect/primary-names/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function PrimaryNamesActions() { - return null; -} diff --git a/apps/ensadmin/src/app/@actions/inspect/records/page.tsx b/apps/ensadmin/src/app/@actions/inspect/records/page.tsx deleted file mode 100644 index 9a0e43395..000000000 --- a/apps/ensadmin/src/app/@actions/inspect/records/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function RecordsActions() { - return null; -} diff --git a/apps/ensadmin/src/app/@actions/layout.tsx b/apps/ensadmin/src/app/@actions/layout.tsx deleted file mode 100644 index b444b3aee..000000000 --- a/apps/ensadmin/src/app/@actions/layout.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function ActionsLayout({ children }: { children: React.ReactNode }) { - return children; -} diff --git a/apps/ensadmin/src/app/@actions/loading.tsx b/apps/ensadmin/src/app/@actions/loading.tsx deleted file mode 100644 index 8a6b0b05a..000000000 --- a/apps/ensadmin/src/app/@actions/loading.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function Loading() { - return
; -} diff --git a/apps/ensadmin/src/app/@actions/name/page.tsx b/apps/ensadmin/src/app/@actions/name/page.tsx deleted file mode 100644 index 9b4e1e75d..000000000 --- a/apps/ensadmin/src/app/@actions/name/page.tsx +++ /dev/null @@ -1,32 +0,0 @@ -"use client"; - -import { useSearchParams } from "next/navigation"; - -import type { Name } from "@ensnode/ensnode-sdk"; - -import { ExternalLinkWithIcon } from "@/components/link"; -import { Button } from "@/components/ui/button"; -import { useNamespace } from "@/hooks/async/use-namespace"; -import { buildExternalEnsAppProfileUrl } from "@/lib/namespace-utils"; - -export default function ActionsNamePage() { - const searchParams = useSearchParams(); - const nameParam = searchParams.get("name"); - - const name = nameParam ? (decodeURIComponent(nameParam) as Name) : null; - - const { data: namespace } = useNamespace(); - - const ensAppProfileUrl = - name && namespace ? buildExternalEnsAppProfileUrl(name, namespace) : null; - - if (!ensAppProfileUrl) return null; - - return ( - - ); -} diff --git a/apps/ensadmin/src/app/@actions/registration/page.tsx b/apps/ensadmin/src/app/@actions/registration/page.tsx deleted file mode 100644 index cfa72d3e1..000000000 --- a/apps/ensadmin/src/app/@actions/registration/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function ActionsExploreRegistrationsPage() { - return null; -} diff --git a/apps/ensadmin/src/app/@actions/status/page.tsx b/apps/ensadmin/src/app/@actions/status/page.tsx deleted file mode 100644 index bc0caacdf..000000000 --- a/apps/ensadmin/src/app/@actions/status/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function StatusActions() { - return null; -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/(apis)/api/subgraph/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/(apis)/api/subgraph/page.tsx deleted file mode 100644 index b71535d4b..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/(apis)/api/subgraph/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - Subgraph (GraphQL) - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/(apis)/layout.tsx b/apps/ensadmin/src/app/@breadcrumbs/(apis)/layout.tsx deleted file mode 100644 index 6b40d4517..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/(apis)/layout.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import BreadcrumbsGroup from "@/components/breadcrumbs/group"; - -export default function BreadcrumbsAPIsLayout({ children }: { children: React.ReactNode }) { - return {children}; -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/connection/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/connection/page.tsx deleted file mode 100644 index 5ffc8aa53..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/connection/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - Connection - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/default.tsx b/apps/ensadmin/src/app/@breadcrumbs/default.tsx deleted file mode 100644 index 616118376..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/default.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function BreadcrumbsDefault() { - return null; -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/inspect/layout.tsx b/apps/ensadmin/src/app/@breadcrumbs/inspect/layout.tsx deleted file mode 100644 index 41911a2d2..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/inspect/layout.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import BreadcrumbsGroup from "@/components/breadcrumbs/group"; - -export default function Layout({ children }: { children: React.ReactNode }) { - return {children}; -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/inspect/primary-name/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/inspect/primary-name/page.tsx deleted file mode 100644 index b809ab87a..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/inspect/primary-name/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - Primary Name Resolution - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/inspect/primary-names/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/inspect/primary-names/page.tsx deleted file mode 100644 index 1d3aa361c..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/inspect/primary-names/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - Primary Names Resolution - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/inspect/records/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/inspect/records/page.tsx deleted file mode 100644 index b04d84489..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/inspect/records/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - Records Resolution - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/inspect/visualizer/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/inspect/visualizer/page.tsx deleted file mode 100644 index 40e3397a7..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/inspect/visualizer/page.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - - Visualization Example{" "} - - teaser - - - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/layout.tsx b/apps/ensadmin/src/app/@breadcrumbs/layout.tsx deleted file mode 100644 index c06f0f439..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/layout.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { Breadcrumb, BreadcrumbList } from "@/components/ui/breadcrumb"; - -export default function BreadcrumbsLayout({ children }: { children: React.ReactNode }) { - return ( - - {children} - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/mock/config-info/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/mock/config-info/page.tsx deleted file mode 100644 index 7f508fd19..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/mock/config-info/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -"use client"; - -import { - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; -import { useRawConnectionUrlParam } from "@/hooks/use-connection-url-param"; - -export default function Page() { - const { retainCurrentRawConnectionUrlParam } = useRawConnectionUrlParam(); - const uiMocksBaseHref = retainCurrentRawConnectionUrlParam("/mock"); - - return ( - <> - - UI Mocks - - - - ENSNodeConfigInfo - - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/mock/display-identity/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/mock/display-identity/page.tsx deleted file mode 100644 index 5a63e3ef4..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/mock/display-identity/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -"use client"; - -import { - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; -import { useRawConnectionUrlParam } from "@/hooks/use-connection-url-param"; - -export default function Page() { - const { retainCurrentRawConnectionUrlParam } = useRawConnectionUrlParam(); - const uiMocksBaseHref = retainCurrentRawConnectionUrlParam("/mock"); - - return ( - <> - - UI Mocks - - - - DisplayIdentity - - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/mock/indexing-stats/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/mock/indexing-stats/page.tsx deleted file mode 100644 index 8f9dd043b..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/mock/indexing-stats/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -"use client"; - -import { - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; -import { useRawConnectionUrlParam } from "@/hooks/use-connection-url-param"; - -export default function Page() { - const { retainCurrentRawConnectionUrlParam } = useRawConnectionUrlParam(); - const uiMocksBaseHref = retainCurrentRawConnectionUrlParam("/mock"); - - return ( - <> - - UI Mocks - - - - IndexingStats - - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/mock/layout.tsx b/apps/ensadmin/src/app/@breadcrumbs/mock/layout.tsx deleted file mode 100644 index 6351256bf..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/mock/layout.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { Breadcrumb, BreadcrumbList } from "@/components/ui/breadcrumb"; - -export default function Layout({ children }: { children: React.ReactNode }) { - return ( - - {children} - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/mock/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/mock/page.tsx deleted file mode 100644 index 19f7cffee..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/mock/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - UI Mocks - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/mock/recent-registrations/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/mock/recent-registrations/page.tsx deleted file mode 100644 index bd4691347..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/mock/recent-registrations/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -"use client"; - -import { - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; -import { useRawConnectionUrlParam } from "@/hooks/use-connection-url-param"; - -export default function Page() { - const { retainCurrentRawConnectionUrlParam } = useRawConnectionUrlParam(); - const uiMocksBaseHref = retainCurrentRawConnectionUrlParam("/mock"); - - return ( - <> - - UI Mocks - - - - RecentRegistrations - - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/mock/relative-time/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/mock/relative-time/page.tsx deleted file mode 100644 index 199d3a118..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/mock/relative-time/page.tsx +++ /dev/null @@ -1,25 +0,0 @@ -"use client"; - -import { - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; -import { useRawConnectionUrlParam } from "@/hooks/use-connection-url-param"; - -export default function Page() { - const { retainCurrentRawConnectionUrlParam } = useRawConnectionUrlParam(); - const uiMocksBaseHref = retainCurrentRawConnectionUrlParam("/mock"); - return ( - <> - - UI Mocks - - - - RelativeTime - - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/name/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/name/page.tsx deleted file mode 100644 index d83791aba..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/name/page.tsx +++ /dev/null @@ -1,46 +0,0 @@ -"use client"; - -import { useSearchParams } from "next/navigation"; - -import type { Name } from "@ensnode/ensnode-sdk"; - -import BreadcrumbsGroup from "@/components/breadcrumbs/group"; -import { NameDisplay } from "@/components/identity/utils"; -import { - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb"; -import { useRawConnectionUrlParam } from "@/hooks/use-connection-url-param"; - -export default function Page() { - const searchParams = useSearchParams(); - const nameParam = searchParams.get("name"); - const { retainCurrentRawConnectionUrlParam } = useRawConnectionUrlParam(); - const exploreNamesBaseHref = retainCurrentRawConnectionUrlParam("/name"); - - const name = nameParam ? (decodeURIComponent(nameParam) as Name) : null; - - return ( - - {name ? ( - <> - - Names - - - - - - - - - ) : ( - - Names - - )} - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/registration/layout.tsx b/apps/ensadmin/src/app/@breadcrumbs/registration/layout.tsx deleted file mode 100644 index f642722e5..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/registration/layout.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import BreadcrumbsGroup from "@/components/breadcrumbs/group"; - -export default function BreadcrumbsNameLayout({ children }: { children: React.ReactNode }) { - return {children}; -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/registration/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/registration/page.tsx deleted file mode 100644 index b36b59bbe..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/registration/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - Registrations - - ); -} diff --git a/apps/ensadmin/src/app/@breadcrumbs/status/page.tsx b/apps/ensadmin/src/app/@breadcrumbs/status/page.tsx deleted file mode 100644 index 24a1e2bb9..000000000 --- a/apps/ensadmin/src/app/@breadcrumbs/status/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { BreadcrumbItem, BreadcrumbPage } from "@/components/ui/breadcrumb"; - -export default function Page() { - return ( - - Status - - ); -} diff --git a/apps/ensadmin/src/app/api/_ai/ens-subgraph-gql-schema.ts b/apps/ensadmin/src/app/api/_ai/ens-subgraph-gql-schema.ts deleted file mode 100644 index b6e02af78..000000000 --- a/apps/ensadmin/src/app/api/_ai/ens-subgraph-gql-schema.ts +++ /dev/null @@ -1,453 +0,0 @@ -// export const ensSubgraphSchemaGql = ` -// type Domain @entity { -// "The namehash of the name" -// id: ID! -// "The human readable name, if known. Unknown portions replaced with hash in square brackets (eg, foo.[1234].eth)" -// name: String -// "The human readable label name (imported from CSV), if known" -// labelName: String -// "keccak256(labelName)" -// labelhash: Bytes -// "The namehash (id) of the parent name" -// parent: Domain -// "Can count domains from length of array" -// subdomains: [Domain!]! @derivedFrom(field: "parent") -// "The number of subdomains" -// subdomainCount: Int! -// "Address logged from current resolver, if any" -// resolvedAddress: Account - -// "The resolver that controls the domain's settings" -// resolver: Resolver -// "The time-to-live (TTL) value of the domain's records" -// ttl: BigInt - -// "Indicates whether the domain has been migrated to a new registrar" -// isMigrated: Boolean! -// "The time when the domain was created" -// createdAt: BigInt! - -// "The account that owns the domain" -// owner: Account! -// "The account that owns the ERC721 NFT for the domain" -// registrant: Account -// "The account that owns the wrapped domain" -// wrappedOwner: Account - -// "The expiry date for the domain, from either the registration, or the wrapped domain if PCC is burned" -// expiryDate: BigInt - -// "The registration associated with the domain" -// registration: Registration @derivedFrom(field: "domain") -// "The wrapped domain associated with the domain" -// wrappedDomain: WrappedDomain @derivedFrom(field: "domain") - -// "The events associated with the domain" -// events: [DomainEvent!]! @derivedFrom(field: "domain") -// } - -// interface DomainEvent { -// "The unique identifier of the event" -// id: ID! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// } - -// type Transfer implements DomainEvent @entity { -// "The unique identifier of the event" -// id: ID! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// "The account that owns the domain after the transfer" -// owner: Account! -// } - -// type NewOwner implements DomainEvent @entity { -// "The unique identifier of the event" -// id: ID! -// "The parent domain of the domain name associated with the event" -// parentDomain: Domain! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// "The new account that owns the domain" -// owner: Account! -// } - -// type NewResolver implements DomainEvent @entity { -// "The unique identifier of the event" -// id: ID! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// "The new resolver contract address associated with the domain" -// resolver: Resolver! -// } - -// type NewTTL implements DomainEvent @entity { -// "The unique identifier of the event" -// id: ID! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// "The new TTL value (in seconds) associated with the domain" -// ttl: BigInt! -// } - -// type WrappedTransfer implements DomainEvent @entity { -// "The unique identifier of the event" -// id: ID! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// "The account that owns the wrapped domain after the transfer" -// owner: Account! -// } - -// type NameWrapped implements DomainEvent @entity { -// "The unique identifier of the wrapped domain" -// id: ID! -// "The domain name associated with the wrapped domain" -// domain: Domain! -// "The block number at which the wrapped domain was wrapped" -// blockNumber: Int! -// "The transaction hash of the transaction that wrapped the domain" -// transactionID: Bytes! -// "The human-readable name of the wrapped domain" -// name: String -// "The number of fuses associated with the wrapped domain" -// fuses: Int! -// "The account that owns the wrapped domain" -// owner: Account! -// "The expiry date of the wrapped domain registration" -// expiryDate: BigInt! -// } - -// type NameUnwrapped implements DomainEvent @entity { -// "The unique identifier of the event" -// id: ID! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// "The account that owns the domain after it was unwrapped" -// owner: Account! -// } - -// type FusesSet implements DomainEvent @entity { -// "The unique identifier of the event" -// id: ID! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// "The number of fuses associated with the domain after the set event" -// fuses: Int! -// } - -// type ExpiryExtended implements DomainEvent @entity { -// "The unique identifier of the event" -// id: ID! -// "The domain name associated with the event" -// domain: Domain! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash of the transaction that triggered the event" -// transactionID: Bytes! -// "The new expiry date associated with the domain after the extension event" -// expiryDate: BigInt! -// } - -// type Registration @entity { -// "The unique identifier of the registration" -// id: ID! -// "The domain name associated with the registration" -// domain: Domain! -// "The registration date of the domain" -// registrationDate: BigInt! -// "The expiry date of the domain" -// expiryDate: BigInt! -// "The cost associated with the domain registration" -// cost: BigInt -// "The account that registered the domain" -// registrant: Account! -// "The human-readable label name associated with the domain registration" -// labelName: String -// "The events associated with the domain registration" -// events: [RegistrationEvent!]! @derivedFrom(field: "registration") -// } - -// interface RegistrationEvent { -// "The unique identifier of the registration event" -// id: ID! -// "The registration associated with the event" -// registration: Registration! -// "The block number of the event" -// blockNumber: Int! -// "The transaction ID associated with the event" -// transactionID: Bytes! -// } - -// type NameRegistered implements RegistrationEvent @entity { -// "The unique identifier of the NameRegistered event" -// id: ID! -// "The registration associated with the event" -// registration: Registration! -// "The block number of the event" -// blockNumber: Int! -// "The transaction ID associated with the event" -// transactionID: Bytes! -// "The account that registered the name" -// registrant: Account! -// "The expiry date of the registration" -// expiryDate: BigInt! -// } - -// type NameRenewed implements RegistrationEvent @entity { -// "The unique identifier of the NameRenewed event" -// id: ID! -// "The registration associated with the event" -// registration: Registration! -// "The block number of the event" -// blockNumber: Int! -// "The transaction ID associated with the event" -// transactionID: Bytes! -// "The new expiry date of the registration" -// expiryDate: BigInt! -// } - -// type NameTransferred implements RegistrationEvent @entity { -// "The ID of the event" -// id: ID! -// "The registration associated with the event" -// registration: Registration! -// "The block number of the event" -// blockNumber: Int! -// "The transaction ID of the event" -// transactionID: Bytes! -// "The new owner of the domain" -// newOwner: Account! -// } - -// type WrappedDomain @entity { -// "unique identifier for each instance of the WrappedDomain entity" -// id: ID! -// "The domain that is wrapped by this WrappedDomain" -// domain: Domain! -// "The expiry date of the wrapped domain" -// expiryDate: BigInt! -// "The number of fuses remaining on the wrapped domain" -// fuses: Int! -// "The account that owns this WrappedDomain" -// owner: Account! -// "The name of the wrapped domain" -// name: String -// } - -// type Account @entity { -// "The unique identifier for the account" -// id: ID! -// "The domains owned by the account" -// domains: [Domain!]! @derivedFrom(field: "owner") -// "The WrappedDomains owned by the account" -// wrappedDomains: [WrappedDomain!] @derivedFrom(field: "owner") -// "The Registrations made by the account" -// registrations: [Registration!] @derivedFrom(field: "registrant") -// } - -// type Resolver @entity { -// "The unique identifier for this resolver, which is a concatenation of the resolver address and the domain namehash" -// id: ID! -// "The domain that this resolver is associated with" -// domain: Domain -// "The address of the resolver contract" -// address: Bytes! -// "The current value of the 'addr' record for this resolver, as determined by the associated events" -// addr: Account -// "The content hash for this resolver, in binary format" -// contentHash: Bytes -// "The set of observed text record keys for this resolver" -// texts: [String!] -// "The set of observed SLIP-44 coin types for this resolver" -// coinTypes: [BigInt!] -// "The events associated with this resolver" -// events: [ResolverEvent!]! @derivedFrom(field: "resolver") -// } - -// interface ResolverEvent { -// "Concatenation of block number and log ID" -// id: ID! -// "Used to derive relationships to Resolvers" -// resolver: Resolver! -// "The block number that the event occurred on" -// blockNumber: Int! -// "The transaction hash of the event" -// transactionID: Bytes! -// } - -// type AddrChanged implements ResolverEvent @entity { -// "Unique identifier for this event" -// id: ID! -// "The resolver associated with this event" -// resolver: Resolver! -// "The block number at which this event occurred" -// blockNumber: Int! -// "The transaction ID for the transaction in which this event occurred" -// transactionID: Bytes! -// "The new address associated with the resolver" -// addr: Account! -// } - -// type MulticoinAddrChanged implements ResolverEvent @entity { -// "Unique identifier for the event" -// id: ID! -// "Resolver associated with this event" -// resolver: Resolver! -// "Block number in which this event was emitted" -// blockNumber: Int! -// "Transaction ID in which this event was emitted" -// transactionID: Bytes! -// "The coin type of the changed address" -// coinType: BigInt! -// "The new address value for the given coin type" -// addr: Bytes! -// } - -// type NameChanged implements ResolverEvent @entity { -// "Concatenation of block number and log ID" -// id: ID! -// "Used to derive relationships to Resolvers" -// resolver: Resolver! -// "Block number where event occurred" -// blockNumber: Int! -// "Unique transaction ID where event occurred" -// transactionID: Bytes! -// "New ENS name value" -// name: String! -// } - -// type AbiChanged implements ResolverEvent @entity { -// "Concatenation of block number and log ID" -// id: ID! -// "Used to derive relationships to Resolvers" -// resolver: Resolver! -// "The block number at which the event was emitted" -// blockNumber: Int! -// "The transaction hash of the transaction in which the event was emitted" -// transactionID: Bytes! -// "The content type of the ABI change" -// contentType: BigInt! -// } - -// type PubkeyChanged implements ResolverEvent @entity { -// "Concatenation of block number and log ID" -// id: ID! -// "Used to derive relationships to Resolvers" -// resolver: Resolver! -// "Block number of the Ethereum block where the event occurred" -// blockNumber: Int! -// "Transaction hash of the Ethereum transaction where the event occurred" -// transactionID: Bytes! -// "The x-coordinate of the new public key" -// x: Bytes! -// "The y-coordinate of the new public key" -// y: Bytes! -// } - -// type TextChanged implements ResolverEvent @entity { -// "Concatenation of block number and log ID" -// id: ID! -// "Used to derive relationships to Resolvers" -// resolver: Resolver! -// "Block number of the Ethereum block in which the event occurred" -// blockNumber: Int! -// "Hash of the Ethereum transaction in which the event occurred" -// transactionID: Bytes! -// "The key of the text record that was changed" -// key: String! -// "The new value of the text record that was changed" -// value: String -// } - -// type ContenthashChanged implements ResolverEvent @entity { -// "Concatenation of block number and log ID" -// id: ID! -// "Used to derive relationships to Resolvers" -// resolver: Resolver! -// "The block number where the event occurred" -// blockNumber: Int! -// "The ID of the transaction where the event occurred" -// transactionID: Bytes! -// "The new content hash for the domain" -// hash: Bytes! -// } - -// type InterfaceChanged implements ResolverEvent @entity { -// "Concatenation of block number and log ID" -// id: ID! -// "Used to derive relationships to Resolvers" -// resolver: Resolver! -// "The block number in which the event occurred" -// blockNumber: Int! -// "The transaction ID for the transaction in which the event occurred" -// transactionID: Bytes! -// "The ID of the EIP-1820 interface that was changed" -// interfaceID: Bytes! -// "The address of the contract that implements the interface" -// implementer: Bytes! -// } - -// type AuthorisationChanged implements ResolverEvent @entity { -// "Unique identifier for this event" -// id: ID! -// "The resolver associated with this event" -// resolver: Resolver! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash associated with the event" -// transactionID: Bytes! -// "The owner of the authorisation" -// owner: Bytes! -// "The target of the authorisation" -// target: Bytes! -// "Whether the authorisation was added or removed" -// isAuthorized: Boolean! -// } - -// type VersionChanged implements ResolverEvent @entity { -// "Unique identifier for this event" -// id: ID! -// "The resolver associated with this event" -// resolver: Resolver! -// "The block number at which the event occurred" -// blockNumber: Int! -// "The transaction hash associated with the event" -// transactionID: Bytes! -// "The new version number of the resolver" -// version: BigInt! -// } -// `; diff --git a/apps/ensadmin/src/app/api/_ai/route.ts b/apps/ensadmin/src/app/api/_ai/route.ts deleted file mode 100644 index 07f5bfb6e..000000000 --- a/apps/ensadmin/src/app/api/_ai/route.ts +++ /dev/null @@ -1,205 +0,0 @@ -// import { AdapterAnthropic } from "@gqlpt/adapter-anthropic"; -// import { GQLPTClient } from "gqlpt"; -// import { type NextRequest } from "next/server"; -// import { ensSubgraphSchemaGql } from "./ens-subgraph-gql-schema"; - -// export async function GET(request: NextRequest) { -// const requestUrl = new URL(request.url); -// const maybePrompt = requestUrl.searchParams.get("prompt"); -// const maybeGqlApiUrl = requestUrl.searchParams.get("gqlApiUrl"); - -// let generateQueryDto: GenerateQueryDto; - -// // try to parse the request into a DTO -// try { -// generateQueryDto = getQueryGeneratorClient.parseRequest({ -// maybePrompt, -// maybeGqlApiUrl, -// }); -// } catch (error) { -// const errorMessage = error instanceof Error ? error.message : "Unknown error"; -// return Response.json({ error: `Parsing request error: ${errorMessage}` }, { status: 400 }); -// } - -// let queryGeneratorClient: QueryGeneratorClient; - -// // try to get the query generator client -// try { -// // get the optional LLM API key from the environment variable -// const llmApiKey = process.env.ANTHROPIC_API_KEY; - -// if (!llmApiKey) { -// throw new Error("ANTHROPIC_API_KEY environment variable is required but has not been set."); -// } - -// // get the query generator client for the given GQL API URL -// queryGeneratorClient = await getQueryGeneratorClient({ -// ...generateQueryDto, -// llmApiKey, -// }); -// } catch (error) { -// const errorMessage = error instanceof Error ? error.message : "Unknown error"; - -// console.error(`Query generator client error: ${errorMessage}`); -// return Response.json({ error: `Query generator client error` }, { status: 500 }); -// } - -// // try to generate the query and variables -// try { -// const generatedQueryAndVariables = await queryGeneratorClient.generateQueryAndVariables( -// generateQueryDto.prompt, -// ); -// return Response.json(generatedQueryAndVariables); -// } catch (error) { -// const errorMessage = error instanceof Error ? error.message : "Unknown error"; -// console.error(`Query generation error: ${errorMessage}`); -// return Response.json({ error: errorMessage }, { status: 500 }); -// } -// } - -// /** The max tokens to use per message */ -// const MAX_TOKENS_PER_MESSAGE = 1024; - -// /** The LLM temperature */ -// const TEMPERATURE = 0; - -// /** The system prompt to use for the LLM */ -// const SYSTEM_PROMPT = ` -// You are a helpful assistant that generates GraphQL queries and variables. - -// You will be given a prompt and a GraphQL schema. - -// You will generate a GraphQL query and variables that will be used to test the GraphQL API. - -// Always respond with the GraphQL query and variables in JSON format. - -// Always include an operation name for each generated GraphQL query. Do not forget about it under any circumstances. - -// Include useful comments in the generated GraphQL query to make it easier to understand. - -// Values such as 'vitalik.eth' or 'abc.123.com' should be interpreted as domain names. - -// Hex values with 40 hex digits (20 bytes) such as '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' should be interpreted as addresses or account id values. All addresses and account id values in your output should be formatted completely in lowercase. - -// Hex values with 64 hex digits (32 bytes) such as '0x412329d38ad88cb88b1bb6d4005cd6aa010b7bdeb55fd28f980943d423725fb1' should be interpreted as either a labelhash, or the id of a domain. All labelhash and domain id values in your output should be formatted completely in lowercase. - -// If requested to generate a query that finds domains by name, unless specifically requested to use a particular strategy such as "names ending with", default to finding name values that are an exact match. -// `; - -// /** -// * Map of GQL API URLs to query generator clients. -// */ -// const clients = new Map(); - -// interface QueryGeneratorClient extends Pick {} - -// interface GetQueryGeneratorClientOptions { -// /** The URL of the GQL API used for GQL schema introspection */ -// gqlApiUrl: URL; - -// /** The API key for the LLM */ -// llmApiKey?: string; -// } - -// /** -// * Get a query generator client for the given GQL API URL. -// * -// * @param gqlApiUrl The URL of the GQL API -// * @param llmApiKey The API key for the LLM -// * @returns query generator client -// */ -// async function getQueryGeneratorClient( -// options: GetQueryGeneratorClientOptions, -// ): Promise { -// let client = clients.get(options.gqlApiUrl.toString()); - -// if (!client) { -// // create the client if it doesn't exist yet -// client = new GQLPTClient({ -// url: options.gqlApiUrl.toString(), -// adapter: new AdapterAnthropic({ -// apiKey: options.llmApiKey, -// model: Model.Claude35Sonnet, -// systemPrompt: `${SYSTEM_PROMPT}\n\n${ensSubgraphSchemaGql}`, -// maxTokensPerMessage: MAX_TOKENS_PER_MESSAGE, -// temperature: TEMPERATURE, -// cacheControl: { -// type: "ephemeral", -// }, -// }), -// }); - -// try { -// // ensure the client is connected -// await client.connect(); -// } catch (error) { -// const errorMessage = error instanceof Error ? error.message : "Unknown error"; -// throw new Error(`Failed to connect to the LLM: ${errorMessage}`); -// } - -// // store the client in the map for future use -// clients.set(options.gqlApiUrl.toString(), client); -// } - -// return client; -// } - -// interface ParseRequestOptions { -// maybeGqlApiUrl: string | null; -// maybePrompt: string | null; -// } - -// /** -// * Parse the request URL to get the prompt and GQL API URL. -// * -// * @param requestUrl The request URL -// * @returns The prompt and GQL API URL -// * @throws {Error} If the prompt or GQL API URL was not provided -// */ -// getQueryGeneratorClient.parseRequest = function parseQueryGeneratorClientRequest( -// options: ParseRequestOptions, -// ): GenerateQueryDto { -// return GenerateQueryDto.tryParse(options.maybePrompt, options.maybeGqlApiUrl); -// }; - -// /** -// * DTO for the generateQueryAndVariables request. -// */ -// class GenerateQueryDto { -// private constructor( -// public readonly prompt: string, -// public readonly gqlApiUrl: URL, -// ) {} - -// static tryParse(maybePrompt: string | null, maybeGqlApiUrl: string | null) { -// const prompt = GenerateQueryDto.parsePrompt(maybePrompt); -// const gqlApiUrl = GenerateQueryDto.parseGqlApiUrl(maybeGqlApiUrl); - -// return new GenerateQueryDto(prompt, gqlApiUrl); -// } - -// static parsePrompt(maybePrompt: string | null) { -// if (!maybePrompt) { -// throw new Error("Prompt is required"); -// } - -// return maybePrompt; -// } - -// static parseGqlApiUrl(maybeGqlApiUrl: string | null) { -// if (!maybeGqlApiUrl) { -// throw new Error("URL is required"); -// } - -// try { -// return new URL(maybeGqlApiUrl); -// } catch (error) { -// throw new Error("Invalid URL"); -// } -// } -// } - -// enum Model { -// Claude35Sonnet = "claude-3-5-sonnet-20241022", -// Claude37Sonnet = "claude-3-7-sonnet-20250219", -// } diff --git a/apps/ensadmin/src/app/api/subgraph/loading.tsx b/apps/ensadmin/src/app/api/subgraph/loading.tsx deleted file mode 100644 index 5f38c7498..000000000 --- a/apps/ensadmin/src/app/api/subgraph/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { LoadingSpinner } from "@/components/loading-spinner"; - -export default function Loading() { - return ( -
- -
- ); -} diff --git a/apps/ensadmin/src/app/connection/page.tsx b/apps/ensadmin/src/app/connection/page.tsx deleted file mode 100644 index 49bfe6874..000000000 --- a/apps/ensadmin/src/app/connection/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import ConnectionInfo from "@/components/connection"; - -export default function ConnectionPage() { - return ; -} diff --git a/apps/ensadmin/src/app/globals.css b/apps/ensadmin/src/app/globals.css deleted file mode 100644 index b264f211a..000000000 --- a/apps/ensadmin/src/app/globals.css +++ /dev/null @@ -1,171 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - :root { - --background: 0 0% 100%; - - --foreground: 222.2 84% 4.9%; - - --card: 0 0% 100%; - - --card-foreground: 222.2 84% 4.9%; - - --popover: 0 0% 100%; - - --popover-foreground: 222.2 84% 4.9%; - - --primary: 222.2 47.4% 11.2%; - - --primary-foreground: 210 40% 98%; - - --secondary: 210 40% 96.1%; - - --secondary-foreground: 222.2 47.4% 11.2%; - - --muted: 210 40% 96.1%; - - --muted-foreground: 215.4 16.3% 46.9%; - - --accent: 210 40% 96.1%; - - --accent-foreground: 222.2 47.4% 11.2%; - - --destructive: 0 84.2% 60.2%; - - --destructive-foreground: 210 40% 98%; - - --border: 214.3 31.8% 91.4%; - - --input: 214.3 31.8% 91.4%; - - --ring: 222.2 84% 4.9%; - - --chart-1: 12 76% 61%; - - --chart-2: 173 58% 39%; - - --chart-3: 197 37% 24%; - - --chart-4: 43 74% 66%; - - --chart-5: 27 87% 67%; - - --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: 222.2 84% 4.9%; - - --foreground: 210 40% 98%; - - --card: 222.2 84% 4.9%; - - --card-foreground: 210 40% 98%; - - --popover: 222.2 84% 4.9%; - - --popover-foreground: 210 40% 98%; - - --primary: 210 40% 98%; - - --primary-foreground: 222.2 47.4% 11.2%; - - --secondary: 217.2 32.6% 17.5%; - - --secondary-foreground: 210 40% 98%; - - --muted: 217.2 32.6% 17.5%; - - --muted-foreground: 215 20.2% 65.1%; - - --accent: 217.2 32.6% 17.5%; - - --accent-foreground: 210 40% 98%; - - --destructive: 0 62.8% 30.6%; - - --destructive-foreground: 210 40% 98%; - - --border: 217.2 32.6% 17.5%; - - --input: 217.2 32.6% 17.5%; - - --ring: 212.7 26.8% 83.9%; - - --chart-1: 220 70% 50%; - - --chart-2: 160 60% 45%; - - --chart-3: 30 80% 55%; - - --chart-4: 280 65% 60%; - - --chart-5: 340 75% 55%; - - --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 outline-ring/50; - } - - body { - @apply bg-background text-foreground; - } -} - -@layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } -} - -@layer utilities { - /* Hide scrollbar for Chrome, Safari, and Opera */ - .no-scrollbar::-webkit-scrollbar { - display: none; - } - - /* Hide scrollbar for IE, Edge, and Firefox */ - .no-scrollbar { - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ - } -} diff --git a/apps/ensadmin/src/app/inspect/visualizer/page.tsx b/apps/ensadmin/src/app/inspect/visualizer/page.tsx deleted file mode 100644 index 2a8050fe7..000000000 --- a/apps/ensadmin/src/app/inspect/visualizer/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -"use client"; - -import VisualizerClient from "@/components/visualizer/client"; - -export default function InspectorPage() { - return ( -
- -
- ); -} diff --git a/apps/ensadmin/src/app/layout.tsx b/apps/ensadmin/src/app/layout.tsx deleted file mode 100644 index 244b08d13..000000000 --- a/apps/ensadmin/src/app/layout.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import type { Metadata } from "next"; -import "./globals.css"; - -import { Inter } from "next/font/google"; -import Script from "next/script"; -import { Suspense } from "react"; - -import { LayoutWrapper } from "@/components/layout-wrapper"; -import { QueryClientProvider } from "@/components/query-client/components"; -import { Toaster } from "@/components/ui/sonner"; -import { ConnectionsLibraryProvider } from "@/hooks/use-connections-library"; -import { ensAdminPublicUrl } from "@/lib/env"; - -const inter = Inter({ - variable: "--font-inter", - subsets: ["latin"], -}); - -const siteName = "ENSAdmin"; -const title = "ENSAdmin"; -const description = "Explore the ENS Protocol like never before"; - -export const metadata: Metadata = { - title: title, - description: description, - metadataBase: ensAdminPublicUrl(), - openGraph: { - title: { - template: `${siteName} - %s`, - default: title, - }, - description: description, - url: "/", - type: "website", - siteName: siteName, - images: ["/opengraph-image.png"], - }, - twitter: { - title: { - template: `${siteName} - %s`, - default: title, - }, - card: "summary_large_image", - site: "@NamehashLabs", - creator: "@NamehashLabs", - images: ["/twitter-image.png"], - }, -}; - -export default function Layout({ - children, - breadcrumbs, - actions, -}: { - children: React.ReactNode; - breadcrumbs: React.ReactNode; - actions: React.ReactNode; -}) { - return ( - - - - - - - {children} - - - - - - - {/* load the runtime-config.js script ahead of next.js */} -