mirror of
https://github.com/Rohithgilla12/data-peek
synced 2026-04-21 12:57:16 +00:00
chore: prepare for open source release
This commit is contained in:
parent
a03cce9845
commit
d6b31d0559
13 changed files with 365 additions and 47 deletions
39
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
39
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
name: Bug Report
|
||||
about: Report a bug to help us improve data-peek
|
||||
title: '[Bug] '
|
||||
labels: bug
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
A clear and concise description of the bug.
|
||||
|
||||
## Steps to Reproduce
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. See error
|
||||
|
||||
## Expected Behavior
|
||||
|
||||
What you expected to happen.
|
||||
|
||||
## Actual Behavior
|
||||
|
||||
What actually happened.
|
||||
|
||||
## Screenshots
|
||||
|
||||
If applicable, add screenshots to help explain the problem.
|
||||
|
||||
## Environment
|
||||
|
||||
- **OS**: [e.g., macOS 14.0, Windows 11, Ubuntu 22.04]
|
||||
- **data-peek version**: [e.g., 1.0.0]
|
||||
- **Database**: [e.g., PostgreSQL 15]
|
||||
|
||||
## Additional Context
|
||||
|
||||
Add any other context about the problem here.
|
||||
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
name: Feature Request
|
||||
about: Suggest a feature for data-peek
|
||||
title: '[Feature] '
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Problem
|
||||
|
||||
A clear description of the problem you're trying to solve.
|
||||
|
||||
## Proposed Solution
|
||||
|
||||
Describe the solution you'd like.
|
||||
|
||||
## Alternatives Considered
|
||||
|
||||
Any alternative solutions or features you've considered.
|
||||
|
||||
## Additional Context
|
||||
|
||||
Add any other context, mockups, or examples here.
|
||||
30
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
30
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
## Summary
|
||||
|
||||
Brief description of the changes.
|
||||
|
||||
## Changes
|
||||
|
||||
- Change 1
|
||||
- Change 2
|
||||
|
||||
## Related Issues
|
||||
|
||||
Fixes #(issue number)
|
||||
|
||||
## Type of Change
|
||||
|
||||
- [ ] Bug fix
|
||||
- [ ] New feature
|
||||
- [ ] Breaking change
|
||||
- [ ] Documentation update
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] My code follows the project's style guidelines
|
||||
- [ ] I have performed a self-review
|
||||
- [ ] I have tested my changes
|
||||
- [ ] I have updated documentation if needed
|
||||
|
||||
## Screenshots (if applicable)
|
||||
|
||||
Add screenshots for UI changes.
|
||||
31
.gitignore
vendored
31
.gitignore
vendored
|
|
@ -1,5 +1,34 @@
|
|||
node_modules/
|
||||
dist/
|
||||
out/
|
||||
|
||||
# Business documentation (contains sensitive info)
|
||||
docs/
|
||||
docs/
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Build outputs
|
||||
*.tsbuildinfo
|
||||
.next/
|
||||
.turbo/
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Test coverage
|
||||
coverage/
|
||||
85
CONTRIBUTING.md
Normal file
85
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# Contributing to data-peek
|
||||
|
||||
Thank you for your interest in contributing to data-peek! This document provides guidelines and instructions for contributing.
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Fork the repository
|
||||
2. Clone your fork:
|
||||
```bash
|
||||
git clone https://github.com/YOUR_USERNAME/data-peek.git
|
||||
cd data-peek
|
||||
```
|
||||
3. Install dependencies:
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
4. Create a branch for your changes:
|
||||
```bash
|
||||
git checkout -b feature/your-feature-name
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# Start the desktop app in development mode
|
||||
pnpm dev
|
||||
|
||||
# Start the web app
|
||||
pnpm dev:web
|
||||
|
||||
# Run linting
|
||||
pnpm lint
|
||||
|
||||
# Type checking (from apps/desktop)
|
||||
cd apps/desktop
|
||||
pnpm typecheck
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
apps/
|
||||
desktop/ # Electron desktop app
|
||||
src/main/ # Main process (Node.js)
|
||||
src/preload/ # IPC bridge
|
||||
src/renderer/ # React frontend
|
||||
web/ # Marketing website
|
||||
packages/
|
||||
shared/ # Shared TypeScript types
|
||||
```
|
||||
|
||||
## Code Style
|
||||
|
||||
- We use Prettier for formatting (single quotes, no semicolons)
|
||||
- TypeScript strict mode is enabled
|
||||
- Run `pnpm lint` before committing
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
1. Ensure your code passes linting and type checking
|
||||
2. Update documentation if you're adding new features
|
||||
3. Write clear commit messages
|
||||
4. Open a PR against the `main` branch
|
||||
5. Describe what your PR does and why
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
When reporting issues, please include:
|
||||
|
||||
- Your operating system and version
|
||||
- Steps to reproduce the issue
|
||||
- Expected vs actual behavior
|
||||
- Screenshots if applicable
|
||||
|
||||
## Feature Requests
|
||||
|
||||
Feature requests are welcome! Please open an issue describing:
|
||||
|
||||
- The problem you're trying to solve
|
||||
- Your proposed solution
|
||||
- Any alternatives you've considered
|
||||
|
||||
## License
|
||||
|
||||
By contributing, you agree that your contributions will be licensed under the MIT License.
|
||||
99
README.md
Normal file
99
README.md
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# data-peek
|
||||
|
||||
A minimal, fast, lightweight PostgreSQL client desktop application. Built for developers who want to quickly peek at their data without the bloat.
|
||||
|
||||
## Features
|
||||
|
||||
- **Fast** - Opens in under 2 seconds, low memory footprint
|
||||
- **Query Editor** - Monaco editor with SQL syntax highlighting and autocomplete
|
||||
- **Multi-tab Support** - Work with multiple queries simultaneously
|
||||
- **Inline Editing** - Edit table data directly with INSERT/UPDATE/DELETE
|
||||
- **ERD Visualization** - See table relationships visually
|
||||
- **Query Plans** - Analyze query performance with EXPLAIN ANALYZE viewer
|
||||
- **Dark/Light Mode** - Easy on the eyes
|
||||
- **Keyboard-First** - Power users shouldn't need a mouse
|
||||
- **Secure** - Connection credentials encrypted locally, no telemetry
|
||||
|
||||
## Installation
|
||||
|
||||
### Download
|
||||
|
||||
Download the latest release for your platform from [Releases](https://github.com/Rohithgilla12/data-peek/releases).
|
||||
|
||||
- **macOS**: `.dmg` (Intel & Apple Silicon)
|
||||
- **Windows**: `.exe` installer
|
||||
- **Linux**: `.AppImage` or `.deb`
|
||||
|
||||
### Build from Source
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/Rohithgilla12/data-peek.git
|
||||
cd data-peek
|
||||
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
|
||||
# Run in development mode
|
||||
pnpm dev
|
||||
|
||||
# Build for your platform
|
||||
pnpm build:mac # macOS
|
||||
pnpm build:win # Windows
|
||||
pnpm build:linux # Linux
|
||||
```
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Layer | Technology |
|
||||
|-------|------------|
|
||||
| Desktop | Electron |
|
||||
| Frontend | React 19 + TypeScript |
|
||||
| UI | shadcn/ui + Tailwind CSS |
|
||||
| State | Zustand |
|
||||
| Query Editor | Monaco |
|
||||
| Database | pg (PostgreSQL driver) |
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
apps/
|
||||
desktop/ # Electron desktop application
|
||||
web/ # Marketing website + licensing
|
||||
packages/
|
||||
shared/ # Shared types for IPC
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
|
||||
# Start desktop app with hot reload
|
||||
pnpm dev
|
||||
|
||||
# Start web app
|
||||
pnpm dev:web
|
||||
|
||||
# Lint all workspaces
|
||||
pnpm lint
|
||||
|
||||
# Build desktop app
|
||||
pnpm build
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT License - see [LICENSE](LICENSE) for details.
|
||||
|
||||
Pre-built binaries require a license for commercial use. See the license file for details on free vs. commercial use.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
||||
|
||||
## Support
|
||||
|
||||
- [GitHub Issues](https://github.com/Rohithgilla12/data-peek/issues) - Bug reports and feature requests
|
||||
- Twitter/X: [@gillarohith](https://x.com/gillarohith)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@data-peek/desktop",
|
||||
"version": "1.0.0",
|
||||
"version": "0.1.0",
|
||||
"description": "A minimal, fast, lightweight PostgreSQL client",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "Rohith Gilla",
|
||||
|
|
|
|||
|
|
@ -282,8 +282,8 @@ export function ConnectionSwitcher() {
|
|||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Delete connection?</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
Are you sure you want to delete "{deletingConnection?.name}"? This action cannot be
|
||||
undone.
|
||||
Are you sure you want to delete "{deletingConnection?.name}"? This action
|
||||
cannot be undone.
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ export function LicenseActivationModal({ open, onOpenChange }: LicenseActivation
|
|||
|
||||
<div className="border-t pt-4">
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Don't have a license?{' '}
|
||||
Don't have a license?{' '}
|
||||
<a
|
||||
href="https://data-peek.dev/pricing"
|
||||
target="_blank"
|
||||
|
|
|
|||
|
|
@ -24,11 +24,7 @@ import {
|
|||
SelectTrigger,
|
||||
SelectValue
|
||||
} from '@/components/ui/select'
|
||||
import {
|
||||
Collapsible,
|
||||
CollapsibleContent,
|
||||
CollapsibleTrigger
|
||||
} from '@/components/ui/collapsible'
|
||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
|
@ -328,7 +324,11 @@ export function TableDesigner({ tabId }: TableDesignerProps) {
|
|||
disabled={isPreviewLoading || hasErrors}
|
||||
className="gap-1.5"
|
||||
>
|
||||
{isPreviewLoading ? <Loader2 className="size-3.5 animate-spin" /> : <Code className="size-3.5" />}
|
||||
{isPreviewLoading ? (
|
||||
<Loader2 className="size-3.5 animate-spin" />
|
||||
) : (
|
||||
<Code className="size-3.5" />
|
||||
)}
|
||||
Preview SQL
|
||||
</Button>
|
||||
<Button
|
||||
|
|
@ -337,7 +337,11 @@ export function TableDesigner({ tabId }: TableDesignerProps) {
|
|||
disabled={state?.isSaving || hasErrors || !dirty}
|
||||
className="gap-1.5"
|
||||
>
|
||||
{state?.isSaving ? <Loader2 className="size-3.5 animate-spin" /> : <Save className="size-3.5" />}
|
||||
{state?.isSaving ? (
|
||||
<Loader2 className="size-3.5 animate-spin" />
|
||||
) : (
|
||||
<Save className="size-3.5" />
|
||||
)}
|
||||
{tab.mode === 'create' ? 'Create Table' : 'Save Changes'}
|
||||
</Button>
|
||||
</div>
|
||||
|
|
@ -422,11 +426,10 @@ export function TableDesigner({ tabId }: TableDesignerProps) {
|
|||
<div></div>
|
||||
</div>
|
||||
{/* Column rows */}
|
||||
{definition.columns.map((col, index) => (
|
||||
{definition.columns.map((col) => (
|
||||
<ColumnRow
|
||||
key={col.id}
|
||||
column={col}
|
||||
index={index}
|
||||
isSelected={state?.selectedColumnId === col.id}
|
||||
validationErrors={validationErrors.filter((e) =>
|
||||
e.field.startsWith(`column.${col.id}`)
|
||||
|
|
@ -552,9 +555,7 @@ export function TableDesigner({ tabId }: TableDesignerProps) {
|
|||
<DialogContent className="max-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>SQL Preview</DialogTitle>
|
||||
<DialogDescription>
|
||||
This SQL will be executed to create the table.
|
||||
</DialogDescription>
|
||||
<DialogDescription>This SQL will be executed to create the table.</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div className="rounded-lg bg-muted/50 p-4 font-mono text-sm overflow-auto max-h-96">
|
||||
<pre className="whitespace-pre-wrap">{previewSql}</pre>
|
||||
|
|
@ -577,7 +578,6 @@ export function TableDesigner({ tabId }: TableDesignerProps) {
|
|||
// Column row component
|
||||
interface ColumnRowProps {
|
||||
column: ColumnDefinition
|
||||
index: number
|
||||
isSelected: boolean
|
||||
validationErrors: ValidationError[]
|
||||
onSelect: () => void
|
||||
|
|
@ -588,7 +588,6 @@ interface ColumnRowProps {
|
|||
|
||||
function ColumnRow({
|
||||
column,
|
||||
index: _index,
|
||||
isSelected,
|
||||
validationErrors,
|
||||
onSelect,
|
||||
|
|
@ -653,7 +652,9 @@ function ColumnRow({
|
|||
<Input
|
||||
type="number"
|
||||
value={column.length ?? ''}
|
||||
onChange={(e) => onChange('length', e.target.value ? parseInt(e.target.value) : undefined)}
|
||||
onChange={(e) =>
|
||||
onChange('length', e.target.value ? parseInt(e.target.value) : undefined)
|
||||
}
|
||||
placeholder="n"
|
||||
className="h-8 w-14 text-center"
|
||||
/>
|
||||
|
|
@ -663,14 +664,18 @@ function ColumnRow({
|
|||
<Input
|
||||
type="number"
|
||||
value={column.precision ?? ''}
|
||||
onChange={(e) => onChange('precision', e.target.value ? parseInt(e.target.value) : undefined)}
|
||||
onChange={(e) =>
|
||||
onChange('precision', e.target.value ? parseInt(e.target.value) : undefined)
|
||||
}
|
||||
placeholder="p"
|
||||
className="h-8 w-12 text-center"
|
||||
/>
|
||||
<Input
|
||||
type="number"
|
||||
value={column.scale ?? ''}
|
||||
onChange={(e) => onChange('scale', e.target.value ? parseInt(e.target.value) : undefined)}
|
||||
onChange={(e) =>
|
||||
onChange('scale', e.target.value ? parseInt(e.target.value) : undefined)
|
||||
}
|
||||
placeholder="s"
|
||||
className="h-8 w-12 text-center"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,36 +1,44 @@
|
|||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||
# data-peek Web
|
||||
|
||||
## Getting Started
|
||||
Marketing website and licensing portal for data-peek.
|
||||
|
||||
First, run the development server:
|
||||
## Tech Stack
|
||||
|
||||
- Next.js 16 (App Router)
|
||||
- Tailwind CSS 4
|
||||
- Clerk (Authentication)
|
||||
- Drizzle ORM + PostgreSQL
|
||||
- DodoPayments (Payments)
|
||||
- Resend (Emails)
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
# From the root directory
|
||||
pnpm dev:web
|
||||
|
||||
# Or from this directory
|
||||
pnpm dev
|
||||
# or
|
||||
bun dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
Open [http://localhost:3000](http://localhost:3000) to view the site.
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
## Environment Variables
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||
Copy `.env.example` to `.env.local` and fill in the values:
|
||||
|
||||
## Learn More
|
||||
```bash
|
||||
cp .env.example .env.local
|
||||
```
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
Required variables:
|
||||
- `DATABASE_URL` - PostgreSQL connection string
|
||||
- `CLERK_SECRET_KEY` - Clerk authentication
|
||||
- `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` - Clerk public key
|
||||
- `DODO_API_KEY` - DodoPayments API key
|
||||
- `DODO_WEBHOOK_SECRET` - DodoPayments webhook secret
|
||||
- `RESEND_API_KEY` - Resend email API key
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
## Deployment
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
||||
The web app is designed to be deployed on Vercel.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "data-peek",
|
||||
"version": "1.0.0",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@data-peek/shared",
|
||||
"version": "0.0.1",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
|
|
|
|||
Loading…
Reference in a new issue