Commit graph

384 commits

Author SHA1 Message Date
Rohith Gilla
c94a7fcd25
feat(webapp): add sync endpoints to saved-queries and history routers
Adds updatedSince/executedSince filters to list endpoints, bulkUpsert to saved-queries, and bulkCreate to history for desktop sync support.
2026-04-06 17:08:23 +05:30
Rohith Gilla
d722e8996c
feat(webapp): add Dexie database definition for local-first storage 2026-04-06 17:08:09 +05:30
Rohith Gilla
07f00b4711
docs: add local-first Dexie implementation plan
15-task plan covering Dexie setup, sync endpoints, SyncManager,
hooks layer, component migration, and old store cleanup.
2026-04-06 17:05:56 +05:30
Rohith Gilla
327f8ef6a9
docs: add local-first Dexie + Postgres sync design spec
Design for moving saved queries, query history, tabs, and UI state
to IndexedDB via Dexie with background sync to existing Postgres.
2026-04-06 15:27:37 +05:30
Rohith Gilla
ed41c71f67
fix(webapp): add Clerk dark theme for visible auth UI
Clerk components were rendering dark text on dark background, making
sign-in, user button, and other auth UI invisible. Added @clerk/themes
dark base theme with matching color variables.
2026-04-06 10:45:10 +05:30
vercel[bot]
edc464c29e
Install and configure Vercel Web Analytics (#136)
# Vercel Web Analytics Installation Report

## Summary
Successfully installed and configured Vercel Web Analytics for the data-peek webapp project following the latest official Vercel documentation.

## Changes Made

### 1. Package Installation
- Installed `@vercel/analytics` version 2.0.1 using pnpm
- Updated `apps/webapp/package.json` to include the new dependency

### 2. Code Integration
Modified `apps/webapp/src/app/layout.tsx`:
- Added import: `import { Analytics } from '@vercel/analytics/next'`
- Added `<Analytics />` component inside the `<body>` tag, after the main content providers

### 3. Framework-Specific Implementation
- Used Next.js App Router approach as documented in Vercel's quickstart guide
- Placed Analytics component in the root layout file (`app/layout.tsx`)
- Component placed within `<body>` tag to ensure proper tracking across all pages

## Implementation Details

The Analytics component was added to the root layout following Next.js App Router best practices:
- Import from `@vercel/analytics/next` for Next.js-specific integration
- Placed after the main application content to avoid interfering with the existing ClerkProvider, Providers, and NuqsAdapter wrapper hierarchy
- This ensures analytics tracking is initialized for all pages in the application

## Files Modified
1. `apps/webapp/package.json` - Added @vercel/analytics dependency
2. `apps/webapp/src/app/layout.tsx` - Added Analytics import and component
3. `pnpm-lock.yaml` - Updated lockfile with new dependencies

## Next Steps for Deployment
To enable analytics on Vercel:
1. Enable Web Analytics in the Vercel dashboard (Analytics section)
2. Deploy the application using `vercel deploy`
3. Verify tracking via browser Network tab (look for analytics requests)

## Notes
- The project had pre-existing build issues unrelated to this change (missing @radix-ui dependencies in the UI package)
- The Analytics implementation itself is correct and follows official Vercel documentation
- Analytics will automatically start collecting data once deployed to Vercel with the feature enabled in the dashboard

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-04-06 09:57:30 +05:30
Rohith Gilla
00500d3e4e
fix: add @types/react to packages/ui devDependencies 2026-04-06 09:34:33 +05:30
Rohith Gilla
96ac606027
chore: trigger redeploy 2026-04-06 08:57:26 +05:30
Rohith Gilla
9a33dede59
fix(webapp): fix type cast and add Suspense boundary for nuqs 2026-04-06 08:49:38 +05:30
Rohith Gilla
4b5b3cd8f4
fix(webapp): use .returning() instead of rowCount for drizzle delete 2026-04-06 08:42:09 +05:30
Rohith Gilla
964472b403
chore: gitignore 2026-04-06 08:39:36 +05:30
Rohith Gilla
36ef187492
Merge branch 'main' of https://github.com/Rohithgilla12/data-peek 2026-04-06 08:39:10 +05:30
Rohith Gilla
7a27a61a4a
fix(webapp): accept Date type for connection card timestamps 2026-04-06 08:38:10 +05:30
tembo[bot]
05c222e90a
Add MSSQL & edit mode support (#134)
* feat(webapp): add MSSQL support, query editing, command palette, and SQL formatting

Co-authored-by: Rohith <gillarohith1@gmail.com>

* chore(webapp): remove MSSQL support and related code to drop database

Co-authored-by: Rohith <gillarohith1@gmail.com>

* fix(webapp): address review feedback for edit mode and query cancel

- Cache pg_backend_pid at connect time so cancelQuery works during in-flight queries
- Cache CONNECTION_ID at connect time for the same reason in MySQL adapter
- Use parameterized query for SET statement_timeout in Postgres adapter
- Parse SQL to extract table/schema context for edit mode instead of empty placeholders
- Add MSSQL bracket identifier quoting to escapeId in edit store
- Remove unused Trash2 and useQueryStore imports from edit-toolbar

---------

Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: Rohith <gillarohith1@gmail.com>
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>
2026-04-06 08:38:10 +05:30
tembo[bot]
33cc450958
Add MSSQL & edit mode support (#134)
* feat(webapp): add MSSQL support, query editing, command palette, and SQL formatting

Co-authored-by: Rohith <gillarohith1@gmail.com>

* chore(webapp): remove MSSQL support and related code to drop database

Co-authored-by: Rohith <gillarohith1@gmail.com>

* fix(webapp): address review feedback for edit mode and query cancel

- Cache pg_backend_pid at connect time so cancelQuery works during in-flight queries
- Cache CONNECTION_ID at connect time for the same reason in MySQL adapter
- Use parameterized query for SET statement_timeout in Postgres adapter
- Parse SQL to extract table/schema context for edit mode instead of empty placeholders
- Add MSSQL bracket identifier quoting to escapeId in edit store
- Remove unused Trash2 and useQueryStore imports from edit-toolbar

---------

Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: Rohith <gillarohith1@gmail.com>
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>
2026-04-05 21:31:22 +05:30
Rohith Gilla
ba1b336ebc
Add web SQL client (app.datapeek.dev) (#133) 2026-04-05 12:32:32 +05:30
pullfrog[bot]
59b7697b1a Address review feedback: security fixes, performance improvements, and cleanup
- Fix multi-tenant connection leak: key cache by userId:connectionId
- Fix SQL injection in pg_relation_size via quote_ident()
- Use per-query statement_timeout instead of hardcoded 30s
- Replace one-by-one delete loop with batch inArray delete
- Reorder cron cleanup: free-user rows first, then 90-day bulk delete
- Align SSL default logic between Postgres and MySQL adapters
- Increase db pool max from 1 to 5
- Reduce connection cache TTL from 60s to 15s
- Replace full-row queries with count() in usage router
- Fix empty-email unique constraint conflict via placeholder email
- Add key rotation TODO for encryption
- Add TODO for SSL rejectUnauthorized follow-up
2026-04-05 06:57:44 +00:00
Rohith Gilla
766ab2a01d
fix: export keys, isMac, shortcut from @data-peek/ui 2026-04-05 11:33:17 +05:30
Rohith Gilla
ddb9d9633d
refactor: migrate desktop UI components to shared @data-peek/ui package
Copy 9 remaining components (alert-dialog, chart, checkbox, collapsible,
command, context-menu, progress, sidebar, switch) to packages/ui and
update all 92 desktop files to import from @data-peek/ui instead of
local @/components/ui/* paths.
2026-04-05 09:47:01 +05:30
Rohith Gilla
fb89beee0c
refactor(webapp): use @data-peek/ui shared components in data table and toolbar 2026-04-05 09:29:31 +05:30
Rohith Gilla
431b10e317
feat: create shared @data-peek/ui component library from shadcn/ui 2026-04-05 09:25:16 +05:30
tembo[bot]
9daedc7be1
Enhance schema explorer & query editor UX (#132)
* refactor(schema-explorer,query-editor,data-table): enhance UI/UX and boolean display

Co-authored-by: Rohith <gillarohith1@gmail.com>

* feat(webapp): enhance schema explorer and query editor UX with FK icons, search, and empty states

Co-authored-by: Rohith <gillarohith1@gmail.com>

---------

Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
Co-authored-by: Rohith <gillarohith1@gmail.com>
2026-04-05 09:19:37 +05:30
Rohith Gilla
308cb4cb88
fix(webapp): improve error handling — prevent silent failures, add logging, fix race conditions 2026-04-05 08:28:24 +05:30
Rohith Gilla
e3af89be11
fix(webapp): escape SQL identifiers in column stats, fix statement_timeout concurrency 2026-04-05 08:27:57 +05:30
Rohith Gilla
8d3642b1be
feat(webapp): add column stats adapter methods and nuqs dependency 2026-04-04 22:08:03 +05:30
Rohith Gilla
0adfb8052d
feat(webapp): add nuqs URL state for connection, sidebar, SQL, and schema search 2026-04-04 21:58:41 +05:30
Rohith Gilla
5cc04237b6
refactor(webapp): match desktop layout — toolbar below editor, bottom status bar, schema search 2026-04-04 21:32:50 +05:30
Rohith Gilla
f5f329a89e
refactor(webapp): match desktop data table styling — virtualization, sizing, headers, pagination 2026-04-04 21:28:41 +05:30
Rohith Gilla
40a9a4f555
feat(webapp): upgrade results table with filtering, pagination, copy, type badges 2026-04-04 21:25:15 +05:30
Rohith Gilla
44e11508b7
feat(webapp): click table play button to view data with auto-execute 2026-04-04 21:19:38 +05:30
Rohith Gilla
1a4c3a362e
feat(webapp): add purposeful animations and micro-interactions across UI 2026-04-04 21:13:54 +05:30
Rohith Gilla
140ef50ece
feat(webapp): add connection string URL parsing to add connection dialog 2026-04-04 21:09:17 +05:30
Rohith Gilla
5e97d078d0
feat(webapp): add feature gates with Pro badges on gated features 2026-04-04 18:22:14 +05:30
Rohith Gilla
d76f034ff7
feat(webapp): add upgrade dialog, usage banner, and pro badges 2026-04-04 11:18:43 +05:30
Rohith Gilla
b2c0494fcb
feat(webapp): add query history cleanup cron job 2026-04-03 17:09:41 +05:30
Rohith Gilla
9e5589f37b
feat(webapp): add billing page with plan comparison 2026-04-03 17:09:36 +05:30
Rohith Gilla
f73d3c2ad1
feat(webapp): add settings page with profile and usage display 2026-04-03 17:09:31 +05:30
Rohith Gilla
36e65ca55e
feat(webapp): add usage tracking tRPC router 2026-04-03 17:09:28 +05:30
Rohith Gilla
710cb8c299
feat(webapp): add usage tracking middleware with plan limits 2026-04-03 17:09:09 +05:30
Rohith Gilla
d4824018c6
feat(webapp): add sidebar tabs for schema/saved/history and health nav 2026-04-03 16:55:29 +05:30
Rohith Gilla
2b2289df49
feat(webapp): add CSV/JSON export buttons to results toolbar 2026-04-03 16:54:37 +05:30
Rohith Gilla
55774b5f20
feat(webapp): add column stats slide-over panel 2026-04-03 16:53:59 +05:30
Rohith Gilla
65e8e4a148
feat(webapp): add column stats with adapter methods and tRPC router 2026-04-03 16:53:23 +05:30
Rohith Gilla
6fa2d1585c
feat(webapp): add health monitor page with 4-card grid 2026-04-03 13:33:26 +05:30
Rohith Gilla
426d428cbc
feat(webapp): add health monitor tRPC router 2026-04-03 13:32:42 +05:30
Rohith Gilla
2290ba2bfe
feat(webapp): add health monitor methods to database adapters 2026-04-03 13:32:18 +05:30
Rohith Gilla
4c86aba0c0
feat(webapp): add query history with filters and date grouping 2026-04-03 13:28:37 +05:30
Rohith Gilla
89dbb2ee63
feat(webapp): add saved queries with CRUD router and UI 2026-04-03 13:28:18 +05:30
Rohith Gilla
b1e864ec3c
feat(webapp): add CSV/JSON export utilities 2026-04-03 13:28:14 +05:30
Rohith Gilla
50435f3ac7
feat(webapp): wire up query page with editor, results, and schema explorer 2026-04-03 13:22:12 +05:30