├── apps ├── desktop │ ├── src │ │ ├── renderer │ │ │ ├── src │ │ │ │ ├── assets │ │ │ │ │ └── index.css │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── use-mobile.ts │ │ │ │ │ ├── use-panel-collapse.ts │ │ │ │ │ ├── use-copy-to-clipboard.ts │ │ │ │ │ ├── use-auto-updater.ts │ │ │ │ │ └── use-execution-plan-resize.ts │ │ │ │ ├── components │ │ │ │ │ ├── ui │ │ │ │ │ │ ├── skeleton.tsx │ │ │ │ │ │ ├── label.tsx │ │ │ │ │ │ ├── textarea.tsx │ │ │ │ │ │ ├── separator.tsx │ │ │ │ │ │ ├── collapsible.tsx │ │ │ │ │ │ ├── kbd.tsx │ │ │ │ │ │ ├── progress.tsx │ │ │ │ │ │ ├── input.tsx │ │ │ │ │ │ ├── checkbox.tsx │ │ │ │ │ │ ├── switch.tsx │ │ │ │ │ │ ├── scroll-area.tsx │ │ │ │ │ │ ├── badge.tsx │ │ │ │ │ │ ├── popover.tsx │ │ │ │ │ │ ├── tooltip.tsx │ │ │ │ │ │ ├── button.tsx │ │ │ │ │ │ ├── table.tsx │ │ │ │ │ │ └── breadcrumb.tsx │ │ │ │ │ ├── Versions.tsx │ │ │ │ │ ├── ai │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── dashboard │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── dashboard-grid.tsx │ │ │ │ │ ├── nav-main.tsx │ │ │ │ │ ├── nav-secondary.tsx │ │ │ │ │ ├── mode-toggle.tsx │ │ │ │ │ ├── titlebar-actions.tsx │ │ │ │ │ ├── theme-provider.tsx │ │ │ │ │ ├── fk-cell-value.tsx │ │ │ │ │ ├── nav-workspaces.tsx │ │ │ │ │ ├── team-switcher.tsx │ │ │ │ │ └── nav-favorites.tsx │ │ │ │ ├── stores │ │ │ │ │ ├── index.ts │ │ │ │ │ └── settings-store.ts │ │ │ │ ├── lib │ │ │ │ │ ├── type-colors.ts │ │ │ │ │ ├── utils.ts │ │ │ │ │ ├── sql-formatter.ts │ │ │ │ │ └── export.ts │ │ │ │ ├── main.tsx │ │ │ │ └── env.d.ts │ │ │ └── index.html │ │ └── main │ │ │ ├── ipc │ │ │ ├── file-handlers.ts │ │ │ ├── window-handler.ts │ │ │ ├── types.ts │ │ │ ├── index.ts │ │ │ └── connection-handlers.ts │ │ │ ├── app-state.ts │ │ │ ├── sql-utils.ts │ │ │ ├── context-menu.ts │ │ │ ├── window-state.ts │ │ │ └── lib │ │ │ └── logger.ts │ ├── .gitignore │ ├── .vscode │ │ ├── extensions.json │ │ ├── settings.json │ │ └── launch.json │ ├── .prettierrc.yaml │ ├── build │ │ ├── icon.ico │ │ ├── icon.png │ │ ├── icon.icns │ │ └── entitlements.mac.plist │ ├── .prettierignore │ ├── resources │ │ └── icon.png │ ├── dev-app-update.yml │ ├── .npmrc │ ├── .editorconfig │ ├── tsconfig.json │ ├── tsconfig.node.json │ ├── components.json │ ├── README.md │ ├── tsconfig.web.json │ ├── vitest.config.ts │ ├── electron.vite.config.ts │ ├── eslint.config.mjs │ └── electron-builder.yml ├── docs │ ├── public │ │ ├── robots.txt │ │ ├── images │ │ │ ├── erd.png │ │ │ ├── ai-assistant-2.png │ │ │ ├── ai-assistant.png │ │ │ └── multi-window.png │ │ └── favicon.svg │ ├── content │ │ └── docs │ │ │ ├── reference │ │ │ ├── meta.json │ │ │ ├── index.mdx │ │ │ └── keyboard-shortcuts.mdx │ │ │ ├── configuration │ │ │ ├── meta.json │ │ │ ├── themes.mdx │ │ │ ├── index.mdx │ │ │ ├── settings.mdx │ │ │ └── licensing.mdx │ │ │ ├── database-support │ │ │ ├── meta.json │ │ │ ├── index.mdx │ │ │ ├── mysql.mdx │ │ │ ├── postgresql.mdx │ │ │ ├── mssql.mdx │ │ │ └── sqlite.mdx │ │ │ ├── getting-started │ │ │ ├── meta.json │ │ │ ├── index.mdx │ │ │ ├── first-connection.mdx │ │ │ └── installation.mdx │ │ │ ├── meta.json │ │ │ ├── features │ │ │ ├── meta.json │ │ │ ├── multi-window.mdx │ │ │ ├── export.mdx │ │ │ ├── saved-queries.mdx │ │ │ ├── erd-diagrams.mdx │ │ │ └── query-plans.mdx │ │ │ └── index.mdx │ ├── source.config.ts │ ├── README.md │ ├── .gitignore │ ├── src │ │ ├── router.tsx │ │ ├── lib │ │ │ ├── source.ts │ │ │ └── layout.shared.tsx │ │ ├── routes │ │ │ └── api │ │ │ │ └── search.ts │ │ └── components │ │ │ └── not-found.tsx │ ├── tsconfig.json │ ├── vite.config.ts │ └── package.json └── web │ ├── src │ ├── app │ │ ├── favicon.ico │ │ ├── robots.ts │ │ ├── page.tsx │ │ ├── sitemap.ts │ │ ├── api │ │ │ ├── checkout │ │ │ │ └── route.ts │ │ │ ├── license │ │ │ │ ├── deactivate │ │ │ │ │ └── route.ts │ │ │ │ └── validate │ │ │ │ │ └── route.ts │ │ │ ├── customer-portal │ │ │ │ └── route.ts │ │ │ └── updates │ │ │ │ └── check │ │ │ │ └── route.ts │ │ └── layout.tsx │ ├── components │ │ ├── marketing │ │ │ ├── index.ts │ │ │ ├── checkout-button.tsx │ │ │ └── cta.tsx │ │ ├── ui │ │ │ ├── badge.tsx │ │ │ └── button.tsx │ │ └── blog │ │ │ └── reading-progress.tsx │ ├── db │ │ └── index.ts │ ├── middleware.ts │ └── lib │ │ └── license.ts │ ├── postcss.config.mjs │ ├── public │ ├── vercel.svg │ ├── window.svg │ ├── file.svg │ ├── globe.svg │ └── next.svg │ ├── next.config.ts │ ├── drizzle.config.ts │ ├── drizzle │ ├── meta │ │ └── _journal.json │ └── 0001_steep_lady_ursula.sql │ ├── eslint.config.mjs │ ├── .gitignore │ ├── tsconfig.json │ ├── README.md │ └── package.json ├── pnpm-workspace.yaml ├── packages └── shared │ ├── package.json │ ├── tsconfig.json │ └── src │ └── type-maps.ts ├── .npmrc ├── .gitignore ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── PULL_REQUEST_TEMPLATE.md └── FUNDING.yml ├── notes └── README.md ├── turbo.json ├── package.json ├── LICENSE └── CONTRIBUTING.md /apps/desktop/src/renderer/src/assets/index.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss'; 2 | -------------------------------------------------------------------------------- /apps/desktop/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | out 4 | .DS_Store 5 | .eslintcache 6 | *.log* 7 | -------------------------------------------------------------------------------- /apps/desktop/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["dbaeumer.vscode-eslint"] 3 | } 4 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - apps/* 3 | - packages/* 4 | 5 | enablePrePostScripts: true 6 | -------------------------------------------------------------------------------- /apps/desktop/.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | singleQuote: true 2 | semi: false 3 | printWidth: 100 4 | trailingComma: none 5 | -------------------------------------------------------------------------------- /apps/desktop/build/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/desktop/build/icon.ico -------------------------------------------------------------------------------- /apps/desktop/build/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/desktop/build/icon.png -------------------------------------------------------------------------------- /apps/desktop/.prettierignore: -------------------------------------------------------------------------------- 1 | out 2 | dist 3 | pnpm-lock.yaml 4 | LICENSE.md 5 | tsconfig.json 6 | tsconfig.*.json 7 | -------------------------------------------------------------------------------- /apps/desktop/build/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/desktop/build/icon.icns -------------------------------------------------------------------------------- /apps/docs/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | 4 | Sitemap: https://docs.datapeek.dev/sitemap.xml 5 | -------------------------------------------------------------------------------- /apps/web/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/web/src/app/favicon.ico -------------------------------------------------------------------------------- /apps/desktop/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/desktop/resources/icon.png -------------------------------------------------------------------------------- /apps/docs/public/images/erd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/docs/public/images/erd.png -------------------------------------------------------------------------------- /apps/docs/content/docs/reference/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Reference", 3 | "pages": ["index", "keyboard-shortcuts"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/docs/public/images/ai-assistant-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/docs/public/images/ai-assistant-2.png -------------------------------------------------------------------------------- /apps/docs/public/images/ai-assistant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/docs/public/images/ai-assistant.png -------------------------------------------------------------------------------- /apps/docs/public/images/multi-window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rohithgilla12/data-peek/HEAD/apps/docs/public/images/multi-window.png -------------------------------------------------------------------------------- /apps/desktop/dev-app-update.yml: -------------------------------------------------------------------------------- 1 | provider: generic 2 | url: https://example.com/auto-updates 3 | updaterCacheDirName: data-peek-desktop-updater 4 | -------------------------------------------------------------------------------- /apps/docs/content/docs/configuration/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Configuration", 3 | "pages": ["index", "settings", "themes", "licensing"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/web/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: { 3 | "@tailwindcss/postcss": {}, 4 | }, 5 | }; 6 | 7 | export default config; 8 | -------------------------------------------------------------------------------- /apps/web/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/content/docs/database-support/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Database Support", 3 | "pages": ["index", "postgresql", "mysql", "mssql", "sqlite"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/docs/content/docs/getting-started/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Getting Started", 3 | "pages": ["index", "installation", "first-connection", "first-query"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/web/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 | -------------------------------------------------------------------------------- /apps/desktop/.npmrc: -------------------------------------------------------------------------------- 1 | electron_mirror=https://npmmirror.com/mirrors/electron/ 2 | electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/ 3 | shamefully-hoist=true 4 | -------------------------------------------------------------------------------- /apps/desktop/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true -------------------------------------------------------------------------------- /apps/docs/source.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, defineDocs } from 'fumadocs-mdx/config'; 2 | 3 | export const docs = defineDocs({ 4 | dir: 'content/docs', 5 | }); 6 | 7 | export default defineConfig(); 8 | -------------------------------------------------------------------------------- /packages/shared/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@data-peek/shared", 3 | "version": "0.10.1", 4 | "private": true, 5 | "main": "./src/index.ts", 6 | "types": "./src/index.ts", 7 | "scripts": { 8 | "typecheck": "tsc --noEmit" 9 | } 10 | } -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | // Custom hooks 2 | export { useCopyToClipboard } from './use-copy-to-clipboard' 3 | export { useExecutionPlanResize } from './use-execution-plan-resize' 4 | export { usePanelCollapse } from './use-panel-collapse' 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | # Electron requires postinstall to download platform-specific binaries 2 | # pnpm caches aggressively and can skip postinstall - this prevents that 3 | side-effects-cache=true 4 | 5 | # Don't skip optional dependencies (native modules like better-sqlite3) 6 | optional=true 7 | -------------------------------------------------------------------------------- /apps/docs/README.md: -------------------------------------------------------------------------------- 1 | # docs 2 | 3 | This is a Tanstack Start application generated with 4 | [Create Fumadocs](https://github.com/fuma-nama/fumadocs). 5 | 6 | Run development server: 7 | 8 | ```bash 9 | npm run dev 10 | # or 11 | pnpm dev 12 | # or 13 | yarn dev 14 | ``` 15 | -------------------------------------------------------------------------------- /apps/desktop/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }], 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["./src/renderer/src/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/docs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | .DS_Store 4 | .cache 5 | .vercel 6 | .output 7 | .nitro 8 | /build/ 9 | /api/ 10 | /server/build 11 | /public/build 12 | /test-results/ 13 | /playwright-report/ 14 | /blob-report/ 15 | /playwright/.cache/ 16 | .tanstack 17 | 18 | src/routeTree.gen.ts 19 | .source -------------------------------------------------------------------------------- /apps/desktop/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[typescript]": { 3 | "editor.defaultFormatter": "esbenp.prettier-vscode" 4 | }, 5 | "[javascript]": { 6 | "editor.defaultFormatter": "esbenp.prettier-vscode" 7 | }, 8 | "[json]": { 9 | "editor.defaultFormatter": "esbenp.prettier-vscode" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/web/drizzle.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'drizzle-kit' 2 | 3 | export default defineConfig({ 4 | schema: './src/db/schema.ts', 5 | out: './drizzle', 6 | dialect: 'postgresql', 7 | dbCredentials: { 8 | url: process.env.DATABASE_URL!, 9 | }, 10 | verbose: true, 11 | strict: true, 12 | }) 13 | -------------------------------------------------------------------------------- /apps/web/src/app/robots.ts: -------------------------------------------------------------------------------- 1 | import type { MetadataRoute } from 'next' 2 | 3 | export default function robots(): MetadataRoute.Robots { 4 | return { 5 | rules: { 6 | userAgent: '*', 7 | allow: '/', 8 | disallow: '/api/', 9 | }, 10 | sitemap: 'https://datapeek.dev/sitemap.xml', 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/web/src/components/marketing/index.ts: -------------------------------------------------------------------------------- 1 | export { Header } from './header' 2 | export { Hero } from './hero' 3 | export { Features } from './features' 4 | export { Pricing } from './pricing' 5 | export { CheckoutButton } from './checkout-button' 6 | export { FAQ } from './faq' 7 | export { CTA } from './cta' 8 | export { Footer } from './footer' 9 | -------------------------------------------------------------------------------- /apps/docs/content/docs/reference/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reference 3 | description: Quick reference guides for data-peek 4 | --- 5 | 6 | # Reference 7 | 8 | Quick reference materials for data-peek. 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "bundler", 6 | "strict": true, 7 | "esModuleInterop": true, 8 | "skipLibCheck": true, 9 | "declaration": true, 10 | "declarationMap": true, 11 | "noEmit": true 12 | }, 13 | "include": ["src"] 14 | } 15 | -------------------------------------------------------------------------------- /apps/desktop/src/main/ipc/file-handlers.ts: -------------------------------------------------------------------------------- 1 | import { dialog, ipcMain } from 'electron' 2 | 3 | export function registerFileHandlers(): void { 4 | ipcMain.handle('open-file-dialog', async () => { 5 | const result = await dialog.showOpenDialog({ 6 | properties: ['openFile'] 7 | }) 8 | return result.canceled ? null : result.filePaths[0] 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@/lib/utils' 2 | 3 | function Skeleton({ className, ...props }: React.ComponentProps<'div'>) { 4 | return ( 5 |
10 | ) 11 | } 12 | 13 | export { Skeleton } 14 | -------------------------------------------------------------------------------- /apps/docs/content/docs/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Documentation", 3 | "pages": [ 4 | "index", 5 | "---Getting Started---", 6 | "getting-started", 7 | "---Features---", 8 | "features", 9 | "---Configuration---", 10 | "configuration", 11 | "---Database Support---", 12 | "database-support", 13 | "---Reference---", 14 | "reference" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /apps/web/public/window.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/web/public/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/docs/src/router.tsx: -------------------------------------------------------------------------------- 1 | import { createRouter as createTanStackRouter } from '@tanstack/react-router'; 2 | import { routeTree } from './routeTree.gen'; 3 | import { NotFound } from '@/components/not-found'; 4 | 5 | export function getRouter() { 6 | return createTanStackRouter({ 7 | routeTree, 8 | defaultPreload: 'intent', 9 | scrollRestoration: true, 10 | defaultNotFoundComponent: NotFound, 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /apps/docs/src/lib/source.ts: -------------------------------------------------------------------------------- 1 | import { loader } from 'fumadocs-core/source'; 2 | import * as icons from 'lucide-static'; 3 | import { docs } from 'fumadocs-mdx:collections/server'; 4 | 5 | export const source = loader({ 6 | source: docs.toFumadocsSource(), 7 | baseUrl: '/docs', 8 | icon(icon) { 9 | if (!icon) { 10 | return; 11 | } 12 | 13 | if (icon in icons) return icons[icon as keyof typeof icons]; 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /apps/desktop/src/main/app-state.ts: -------------------------------------------------------------------------------- 1 | // Shared application state that can be accessed from multiple modules 2 | // This avoids circular dependencies between index.ts and other modules 3 | 4 | // Used by macOS to determine if the app should quit or hide on close 5 | let forceQuit = false 6 | 7 | export function setForceQuit(value: boolean): void { 8 | forceQuit = value 9 | } 10 | 11 | export function shouldForceQuit(): boolean { 12 | return forceQuit 13 | } 14 | -------------------------------------------------------------------------------- /apps/docs/content/docs/features/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Features", 3 | "pages": [ 4 | "index", 5 | "query-editor", 6 | "schema-explorer", 7 | "results-viewer", 8 | "inline-editing", 9 | "ai-assistant", 10 | "command-palette", 11 | "saved-queries", 12 | "multi-window", 13 | "table-designer", 14 | "erd-diagrams", 15 | "query-plans", 16 | "query-telemetry", 17 | "ssh-tunnels", 18 | "export" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /apps/web/drizzle/meta/_journal.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "7", 3 | "dialect": "postgresql", 4 | "entries": [ 5 | { 6 | "idx": 0, 7 | "version": "7", 8 | "when": 1764402280058, 9 | "tag": "0000_cute_ben_urich", 10 | "breakpoints": true 11 | }, 12 | { 13 | "idx": 1, 14 | "version": "7", 15 | "when": 1764666962966, 16 | "tag": "0001_steep_lady_ursula", 17 | "breakpoints": true 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/stores/index.ts: -------------------------------------------------------------------------------- 1 | export * from './connection-store' 2 | export * from './query-store' 3 | export * from './tab-store' 4 | export * from './ddl-store' 5 | export * from './license-store' 6 | export * from './saved-queries-store' 7 | export * from './scheduled-queries-store' 8 | export * from './dashboard-store' 9 | export * from './settings-store' 10 | export * from './notification-store' 11 | export * from './telemetry-store' 12 | export * from './perf-indicator-store' 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | out/ 4 | 5 | # Business documentation (contains sensitive info) 6 | /docs/ 7 | 8 | # OS files 9 | .DS_Store 10 | Thumbs.db 11 | 12 | # IDE 13 | .idea/ 14 | .vscode/ 15 | *.swp 16 | *.swo 17 | 18 | # Environment files 19 | .env 20 | .env.local 21 | .env.*.local 22 | 23 | # Build outputs 24 | *.tsbuildinfo 25 | .next/ 26 | .turbo/ 27 | 28 | # Logs 29 | *.log 30 | npm-debug.log* 31 | pnpm-debug.log* 32 | 33 | # Test coverage 34 | coverage/ 35 | 36 | # MCP 37 | .playwright-mcp/ -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/components/Versions.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from 'react' 2 | 3 | function Versions(): React.JSX.Element { 4 | const [versions] = useState(window.electron.process.versions) 5 | 6 | return ( 7 | 12 | ) 13 | } 14 | 15 | export default Versions 16 | -------------------------------------------------------------------------------- /apps/docs/src/routes/api/search.ts: -------------------------------------------------------------------------------- 1 | import { createFileRoute } from '@tanstack/react-router'; 2 | import { source } from '@/lib/source'; 3 | import { createFromSource } from 'fumadocs-core/search/server'; 4 | 5 | const server = createFromSource(source, { 6 | // https://docs.orama.com/docs/orama-js/supported-languages 7 | language: 'english', 8 | }); 9 | 10 | export const Route = createFileRoute('/api/search')({ 11 | server: { 12 | handlers: { 13 | GET: async ({ request }) => server.GET(request), 14 | }, 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /apps/desktop/src/renderer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Electron 6 | 7 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /apps/desktop/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@electron-toolkit/tsconfig/tsconfig.node.json", 3 | "include": [ 4 | "electron.vite.config.*", 5 | "src/main/**/*", 6 | "src/preload/**/*", 7 | "../../packages/shared/src/**/*" 8 | ], 9 | "compilerOptions": { 10 | "composite": true, 11 | "types": ["electron-vite/node"], 12 | "baseUrl": ".", 13 | "paths": { 14 | "@shared/*": ["../../packages/shared/src/*"], 15 | "@data-peek/shared": ["../../packages/shared/src/index.ts"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest a feature for data-peek 4 | title: '[Feature] ' 5 | labels: enhancement 6 | assignees: '' 7 | --- 8 | 9 | ## Problem 10 | 11 | A clear description of the problem you're trying to solve. 12 | 13 | ## Proposed Solution 14 | 15 | Describe the solution you'd like. 16 | 17 | ## Alternatives Considered 18 | 19 | Any alternative solutions or features you've considered. 20 | 21 | ## Additional Context 22 | 23 | Add any other context, mockups, or examples here. 24 | -------------------------------------------------------------------------------- /apps/desktop/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "", 8 | "css": "src/renderer/src/assets/global.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 | -------------------------------------------------------------------------------- /apps/web/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig, globalIgnores } from "eslint/config"; 2 | import nextVitals from "eslint-config-next/core-web-vitals"; 3 | import nextTs from "eslint-config-next/typescript"; 4 | 5 | const eslintConfig = defineConfig([ 6 | ...nextVitals, 7 | ...nextTs, 8 | // Override default ignores of eslint-config-next. 9 | globalIgnores([ 10 | // Default ignores of eslint-config-next: 11 | ".next/**", 12 | "out/**", 13 | "build/**", 14 | "next-env.d.ts", 15 | ]), 16 | ]); 17 | 18 | export default eslintConfig; 19 | -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import * as LabelPrimitive from '@radix-ui/react-label' 3 | import { cn } from '@/lib/utils' 4 | 5 | function Label({ className, ...props }: React.ComponentProps) { 6 | return ( 7 | 14 | ) 15 | } 16 | 17 | export { Label } 18 | -------------------------------------------------------------------------------- /apps/web/src/db/index.ts: -------------------------------------------------------------------------------- 1 | import { drizzle } from 'drizzle-orm/postgres-js' 2 | import postgres from 'postgres' 3 | import * as schema from './schema' 4 | 5 | // Connection string from environment 6 | const connectionString = process.env.DATABASE_URL! 7 | 8 | // For serverless environments (Vercel, Cloudflare), use connection pooling 9 | const client = postgres(connectionString, { 10 | max: 1, // Single connection for serverless 11 | idle_timeout: 20, 12 | connect_timeout: 10, 13 | }) 14 | 15 | export const db = drizzle(client, { schema }) 16 | 17 | export * from './schema' 18 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Summary 2 | 3 | Brief description of the changes. 4 | 5 | ## Changes 6 | 7 | - Change 1 8 | - Change 2 9 | 10 | ## Related Issues 11 | 12 | Fixes #(issue number) 13 | 14 | ## Type of Change 15 | 16 | - [ ] Bug fix 17 | - [ ] New feature 18 | - [ ] Breaking change 19 | - [ ] Documentation update 20 | 21 | ## Checklist 22 | 23 | - [ ] My code follows the project's style guidelines 24 | - [ ] I have performed a self-review 25 | - [ ] I have tested my changes 26 | - [ ] I have updated documentation if needed 27 | 28 | ## Screenshots (if applicable) 29 | 30 | Add screenshots for UI changes. 31 | -------------------------------------------------------------------------------- /apps/desktop/build/entitlements.mac.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.allow-jit 6 | 7 | com.apple.security.cs.allow-unsigned-executable-memory 8 | 9 | com.apple.security.cs.allow-dyld-environment-variables 10 | 11 | com.apple.security.network.client 12 | 13 | com.apple.security.network.server 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/components/ai/index.ts: -------------------------------------------------------------------------------- 1 | // AI Components 2 | export { AIChatPanel } from './ai-chat-panel' 3 | export { AIMessage } from './ai-message' 4 | export { AISQLPreview } from './ai-sql-preview' 5 | export { AIQueryResult } from './ai-query-result' 6 | export { AISchemaCard } from './ai-schema-card' 7 | export { AISuggestions } from './ai-suggestions' 8 | export { AISettingsModal } from './ai-settings-modal' 9 | 10 | // Types 11 | export type { 12 | AIChatMessage, 13 | AIResponseType, 14 | AIResponseData, 15 | AIQueryData, 16 | AIChartData, 17 | AIMetricData, 18 | AISchemaData 19 | } from './ai-chat-panel' 20 | -------------------------------------------------------------------------------- /apps/desktop/src/main/ipc/window-handler.ts: -------------------------------------------------------------------------------- 1 | import { ipcMain, BrowserWindow } from 'electron' 2 | 3 | export function registerWindowHandlers(): void { 4 | ipcMain.handle('minimize-window', () => { 5 | BrowserWindow.getFocusedWindow()?.minimize() 6 | }) 7 | 8 | ipcMain.handle('maximize-window', () => { 9 | const focusedWindow = BrowserWindow.getFocusedWindow() 10 | 11 | if (focusedWindow?.isMaximized()) { 12 | focusedWindow.unmaximize() 13 | } else { 14 | focusedWindow?.maximize() 15 | } 16 | }) 17 | 18 | ipcMain.handle('close-window', () => { 19 | BrowserWindow.getFocusedWindow()?.close() 20 | }) 21 | } 22 | -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/hooks/use-mobile.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | const MOBILE_BREAKPOINT = 768 4 | 5 | export function useIsMobile() { 6 | const [isMobile, setIsMobile] = React.useState(undefined) 7 | 8 | React.useEffect(() => { 9 | const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) 10 | const onChange = () => { 11 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 12 | } 13 | mql.addEventListener('change', onChange) 14 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 15 | return () => mql.removeEventListener('change', onChange) 16 | }, []) 17 | 18 | return !!isMobile 19 | } 20 | -------------------------------------------------------------------------------- /apps/desktop/README.md: -------------------------------------------------------------------------------- 1 | # data-peek-desktop 2 | 3 | An Electron application with React and TypeScript 4 | 5 | ## Recommended IDE Setup 6 | 7 | - [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) 8 | 9 | ## Project Setup 10 | 11 | ### Install 12 | 13 | ```bash 14 | $ pnpm install 15 | ``` 16 | 17 | ### Development 18 | 19 | ```bash 20 | $ pnpm dev 21 | ``` 22 | 23 | ### Build 24 | 25 | ```bash 26 | # For windows 27 | $ pnpm build:win 28 | 29 | # For macOS 30 | $ pnpm build:mac 31 | 32 | # For Linux 33 | $ pnpm build:linux 34 | ``` 35 | -------------------------------------------------------------------------------- /apps/docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["**/*.ts", "**/*.tsx"], 3 | "compilerOptions": { 4 | "strict": true, 5 | "esModuleInterop": true, 6 | "jsx": "react-jsx", 7 | "module": "ESNext", 8 | "moduleResolution": "Bundler", 9 | "lib": ["DOM", "DOM.Iterable", "ES2022"], 10 | "types": ["vite/client"], 11 | "isolatedModules": true, 12 | "resolveJsonModule": true, 13 | "skipLibCheck": true, 14 | "target": "ES2022", 15 | "allowJs": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "baseUrl": ".", 18 | "paths": { 19 | "@/*": ["./src/*"], 20 | "fumadocs-mdx:collections/*": [".source/*"] 21 | }, 22 | "noEmit": true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/components/dashboard/index.ts: -------------------------------------------------------------------------------- 1 | export { Dashboards } from './dashboards' 2 | export { DashboardView } from './dashboard-view' 3 | export { DashboardGrid } from './dashboard-grid' 4 | export { DashboardFormDialog } from './dashboard-form-dialog' 5 | export { WidgetCard } from './widget-card' 6 | export { AddWidgetDialog } from './add-widget-dialog' 7 | export { WidgetChart } from './widget-chart' 8 | export { WidgetKPI } from './widget-kpi' 9 | export { WidgetTable } from './widget-table' 10 | export { RefreshScheduleDialog } from './refresh-schedule-dialog' 11 | export { AIWidgetSuggestion } from './ai-widget-suggestion' 12 | export type { WidgetSuggestion } from './ai-widget-suggestion' 13 | -------------------------------------------------------------------------------- /apps/web/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import { Header } from '@/components/marketing/header' 2 | import { Hero } from '@/components/marketing/hero' 3 | import { Features } from '@/components/marketing/features' 4 | import { Pricing } from '@/components/marketing/pricing' 5 | import { FAQ } from '@/components/marketing/faq' 6 | import { CTA } from '@/components/marketing/cta' 7 | import { Footer } from '@/components/marketing/footer' 8 | 9 | export default function Home() { 10 | return ( 11 |
12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /apps/desktop/tsconfig.web.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@electron-toolkit/tsconfig/tsconfig.web.json", 3 | "include": [ 4 | "src/renderer/src/env.d.ts", 5 | "src/renderer/src/**/*", 6 | "src/renderer/src/**/*.tsx", 7 | "src/preload/*.d.ts", 8 | "../../packages/shared/src/**/*" 9 | ], 10 | "compilerOptions": { 11 | "composite": true, 12 | "jsx": "react-jsx", 13 | "baseUrl": ".", 14 | "paths": { 15 | "@/*": ["./src/renderer/src/*"], 16 | "@renderer/*": [ 17 | "src/renderer/src/*" 18 | ], 19 | "@shared/*": [ 20 | "../../packages/shared/src/*" 21 | ], 22 | "@data-peek/shared": [ 23 | "../../packages/shared/src/index.ts" 24 | ] 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /apps/web/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env* 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | 43 | # clerk configuration (can include secrets) 44 | /.clerk/ 45 | -------------------------------------------------------------------------------- /apps/desktop/src/renderer/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { cn } from '@/lib/utils' 3 | 4 | const Textarea = React.forwardRef>( 5 | ({ className, ...props }, ref) => { 6 | return ( 7 |