├── website ├── src │ ├── app │ │ ├── opengraph-image.alt.txt │ │ ├── favicon.ico │ │ ├── opengraph-image.png │ │ ├── layout.tsx │ │ ├── globals.css │ │ └── page.tsx │ ├── lib │ │ └── utils.ts │ └── components │ │ ├── code-block.tsx │ │ ├── ui │ │ └── button.tsx │ │ └── background-beams-with-collision.tsx ├── README.md ├── public │ └── images │ │ └── demo.gif ├── postcss.config.mjs ├── next.config.ts ├── components.json ├── tsconfig.json └── package.json ├── pnpm-workspace.yaml ├── packages ├── view │ ├── src │ │ ├── app │ │ │ ├── favicon.ico │ │ │ ├── layout.tsx │ │ │ ├── page.tsx │ │ │ └── globals.css │ │ ├── lib │ │ │ └── utils.ts │ │ ├── components │ │ │ ├── drizzle-studio.tsx │ │ │ ├── drizzle-visualizer.tsx │ │ │ ├── theme-mode.tsx │ │ │ └── ui │ │ │ │ ├── tabs.tsx │ │ │ │ ├── button.tsx │ │ │ │ └── dropdown-menu.tsx │ │ └── hooks │ │ │ └── use-config.ts │ ├── postcss.config.mjs │ ├── next.config.ts │ ├── components.json │ ├── tsconfig.json │ └── package.json └── cli │ ├── index.js │ ├── main.go │ ├── go.mod │ ├── internal │ ├── console │ │ ├── banner.go │ │ └── server_info.go │ └── server │ │ ├── extractor.go │ │ ├── utils.go │ │ ├── next_server.go │ │ ├── server.go │ │ └── static.go │ ├── package.json │ ├── go.sum │ ├── cmd │ └── root.go │ └── drizzle-view.js ├── README.md ├── package.json ├── biome.json ├── .gitignore ├── .github └── workflows │ └── release.yml └── pnpm-lock.yaml /website/src/app/opengraph-image.alt.txt: -------------------------------------------------------------------------------- 1 | Drizzle View -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "packages/*" 3 | - "website" 4 | -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- 1 | # `docs` 2 | 3 | https://drizzle-view.vercel.app 4 | -------------------------------------------------------------------------------- /website/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytaesu/drizzle-view/HEAD/website/src/app/favicon.ico -------------------------------------------------------------------------------- /website/public/images/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytaesu/drizzle-view/HEAD/website/public/images/demo.gif -------------------------------------------------------------------------------- /packages/view/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytaesu/drizzle-view/HEAD/packages/view/src/app/favicon.ico -------------------------------------------------------------------------------- /website/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: ["@tailwindcss/postcss"], 3 | }; 4 | 5 | export default config; 6 | -------------------------------------------------------------------------------- /website/src/app/opengraph-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytaesu/drizzle-view/HEAD/website/src/app/opengraph-image.png -------------------------------------------------------------------------------- /packages/view/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: ["@tailwindcss/postcss"], 3 | }; 4 | 5 | export default config; 6 | -------------------------------------------------------------------------------- /website/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /website/src/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 | -------------------------------------------------------------------------------- /packages/view/src/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 | -------------------------------------------------------------------------------- /packages/view/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | output: "export", 5 | trailingSlash: true, 6 | images: { 7 | unoptimized: true, 8 | }, 9 | }; 10 | 11 | export default nextConfig; 12 | -------------------------------------------------------------------------------- /packages/cli/index.js: -------------------------------------------------------------------------------- 1 | const { ensureBinary } = require("./drizzle-view"); 2 | 3 | /** 4 | * Drizzle View CLI - Main entry point 5 | */ 6 | module.exports = { 7 | /** 8 | * Downloads and ensures the platform-specific Drizzle View binary is available 9 | * @returns {Promise} Path to the binary 10 | */ 11 | ensureBinary, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/cli/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "embed" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/bytaesu/drizzle-view/cmd" 9 | ) 10 | 11 | //go:embed out/* 12 | var distFS embed.FS 13 | 14 | func main() { 15 | rootCmd := cmd.NewRootCmd(distFS) 16 | if err := rootCmd.Execute(); err != nil { 17 | fmt.Fprintln(os.Stderr, err) 18 | os.Exit(1) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | demo 2 | 3 | # Drizzle View 4 | 5 | Run Drizzle Studio and Drizzle Visualizer together in one view. 6 | 7 | ### How to Use 8 | 9 | Check it out here: [https://drizzle-view.vercel.app](https://drizzle-view.vercel.app) 10 | 11 | ### License 12 | 13 | MIT 14 | -------------------------------------------------------------------------------- /packages/cli/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bytaesu/drizzle-view 2 | 3 | go 1.21 4 | 5 | require ( 6 | github.com/fatih/color v1.18.0 7 | github.com/spf13/cobra v1.10.1 8 | ) 9 | 10 | require ( 11 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 12 | github.com/mattn/go-colorable v0.1.13 // indirect 13 | github.com/mattn/go-isatty v0.0.20 // indirect 14 | github.com/spf13/pflag v1.0.9 // indirect 15 | golang.org/x/sys v0.25.0 // indirect 16 | ) 17 | -------------------------------------------------------------------------------- /packages/cli/internal/console/banner.go: -------------------------------------------------------------------------------- 1 | package console 2 | 3 | import ( 4 | "github.com/fatih/color" 5 | ) 6 | 7 | // ShowBanner displays the application banner 8 | func ShowBanner() { 9 | green := color.New(color.FgGreen, color.Bold) 10 | banner := ` 11 | ┌─────────────────────────────┐ 12 | │ │ 13 | │ Drizzle View │ 14 | │ │ 15 | └─────────────────────────────┘ 16 | ` 17 | 18 | green.Println(banner) 19 | } 20 | -------------------------------------------------------------------------------- /packages/view/src/components/drizzle-studio.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useConfig } from "@/hooks/use-config"; 4 | 5 | const DrizzleStudio = () => { 6 | const { config, loading } = useConfig(); 7 | 8 | if (loading) { 9 | return ( 10 |
11 |

Loading Studio...

12 |
13 | ); 14 | } 15 | 16 | return