Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
f7bddb9
docs: add SSH implementation progress documentation and connection ty…
Tiagospem May 16, 2025
4dedec8
docs: update SSH implementation progress and complete SSH helper modu…
Tiagospem May 16, 2025
6c3b9c9
docs: complete Step 3 of SSH implementation by adding IPC handlers an…
Tiagospem May 16, 2025
96aad1e
docs: complete Step 4 of SSH implementation by adding SSH tunneling f…
Tiagospem May 16, 2025
471ad2d
feat: implement SSH connection support with UI updates, connection va…
Tiagospem May 16, 2025
fe41798
feat: enhance UI with remote indication badges for SSH connections an…
Tiagospem May 16, 2025
cb6dfa8
feat: add portfinder dependency for improved port management in SSH c…
Tiagospem May 17, 2025
f198a6e
refactor: standardize database configuration property names to camelCase
Tiagospem May 17, 2025
c764d4b
refactor: standardize database configuration property names to camelCase
Tiagospem May 17, 2025
926f1ee
docs: add SSH tunneling support section to README
Tiagospem May 17, 2025
f9e1653
feat: implement SSH connection form with dynamic configuration and va…
Tiagospem May 17, 2025
da1dbe9
refactor: standardize connection configuration properties to camelCase
Tiagospem May 17, 2025
b768d49
refactor: standardize username property to 'user' in documentation an…
Tiagospem May 17, 2025
3e7ca34
refactor: update RemoteBadge component to use props for size and impr…
Tiagospem May 17, 2025
6224b6c
refactor: simplify Electron app startup logic in vite.config.ts
Tiagospem May 17, 2025
7b9afe3
refactor: enable removeComments option in tsconfig.json for cleaner o…
Tiagospem May 17, 2025
8eb5662
refactor: update connection configuration properties to camelCase and…
Tiagospem May 17, 2025
919b85f
refactor: update db_config property to dbConfig for consistency
Tiagospem May 17, 2025
6908af4
refactor: update db_config property to dbConfig for consistency
Tiagospem May 17, 2025
d4c408d
refactor: update db_connection property to dbConfig for consistency
Tiagospem May 17, 2025
779bf44
refactor: update db_connection property to dbConfig for consistency
Tiagospem May 17, 2025
c6d4529
refactor: update db_config property to dbConfig for consistency
Tiagospem May 17, 2025
e4d76c3
refactor: update username property to user for consistency
Tiagospem May 17, 2025
d18498e
refactor: update openConnection function to accept project object for…
Tiagospem May 17, 2025
6c486a6
refactor: enhance connection details handling and improve modal displ…
Tiagospem May 17, 2025
7a8d3a6
refactor: update username property to user for consistency in SSH con…
Tiagospem May 17, 2025
d0dea3b
refactor: add isRemoteConnection prop and update connection handling …
Tiagospem May 17, 2025
fa2035c
refactor: update routes to include isRemote parameter for database an…
Tiagospem May 17, 2025
abe5972
refactor: streamline DatabaseView component and enhance remote connec…
Tiagospem May 17, 2025
c67dd5d
refactor: enhance MainHeader component with additional UI elements an…
Tiagospem May 17, 2025
81153db
refactor: remove RemoteBadge component and related isRemoteConnection…
Tiagospem May 17, 2025
d8ea3f9
refactor: update sidebar logic to handle SSH connection type and impr…
Tiagospem May 17, 2025
be8c638
refactor: enhance MainHeader component with global keydown handling a…
Tiagospem May 18, 2025
54c55e4
refactor: enhance BaseHeader component with connection type color han…
Tiagospem May 18, 2025
cb8dd21
refactor: update ConnectionGuard to utilize AppConnection type for SS…
Tiagospem May 18, 2025
3f6aa91
refactor: update connection validation logic to utilize AppConnection…
Tiagospem May 18, 2025
3d9e240
refactor: update database store to utilize AppConnection type for SSH…
Tiagospem May 18, 2025
45cf9fa
refactor: update database schema handling to utilize AppConnection ty…
Tiagospem May 18, 2025
1723d90
refactor: integrate AppConnection type into DatabaseView for improved…
Tiagospem May 18, 2025
17524e7
refactor: integrate AppConnection type into EditRecordModal for impro…
Tiagospem May 18, 2025
6a187c6
refactor: enhance EnvEditor to support remote .env file handling for …
Tiagospem May 18, 2025
225377c
refactor: update IndexesTab to utilize AppConnection for improved SSH…
Tiagospem May 18, 2025
8c49664
refactor: update LiveUpdates to utilize AppConnection for improved li…
Tiagospem May 18, 2025
599b599
refactor: integrate AppConnection into Migrations for improved projec…
Tiagospem May 18, 2025
3790984
refactor: enhance ProjectLogs to handle SSH connection restrictions f…
Tiagospem May 18, 2025
b5a5d5d
refactor: update RestoreDatabase to use dbConfig for consistent datab…
Tiagospem May 18, 2025
df40070
refactor: update DatabaseSwitcher to use AppConnection for consistent…
Tiagospem May 18, 2025
e1fffc8
refactor: update navigation in SQLEditorView to include remote projec…
Tiagospem May 18, 2025
e151680
refactor: simplify formatting logic in SQLExplainModal and enhance la…
Tiagospem May 18, 2025
f97090a
refactor: extract table structure loading logic into a separate funct…
Tiagospem May 18, 2025
1b186da
refactor: extract table structure loading logic into a separate funct…
Tiagospem May 18, 2025
1fa0f5c
refactor: reorganize style section in UpdateNotifier.vue for better s…
Tiagospem May 18, 2025
6f8c91e
refactor: enhance UpdatePasswordModal to utilize AppConnection for im…
Tiagospem May 18, 2025
af3ed52
refactor: update Sidebar.vue to utilize AppConnection for improved pr…
Tiagospem May 19, 2025
4a823bc
refactor: remove PostgreSQL from connection types and add connection …
Tiagospem May 19, 2025
9c197f0
refactor: update database restore logic to utilize AppConnection for …
Tiagospem May 19, 2025
b49d876
refactor: update dataTable.ts to utilize AppConnection for improved d…
Tiagospem May 19, 2025
10f96b8
refactor: update eslint.config.js to disable 'no-throw-literal' rule …
Tiagospem May 19, 2025
cdc682b
refactor: update index.ts to close all tunnels on application quit fo…
Tiagospem May 19, 2025
1c182c7
refactor: update index.ts to utilize AppConnection for improved type …
Tiagospem May 19, 2025
199cf71
refactor: update migrations.ts to utilize appConnection for improved …
Tiagospem May 19, 2025
652141e
refactor: update monitoring.ts to utilize AppConnection for improved …
Tiagospem May 19, 2025
6bb169f
refactor: update mysql.ts to utilize AppConnection for improved SSH t…
Tiagospem May 19, 2025
b225cd7
refactor: update mysql.ts to utilize AppConnection for improved datab…
Tiagospem May 19, 2025
78f40e7
refactor: update project.d.ts to improve property naming conventions …
Tiagospem May 19, 2025
5265102
refactor: update project.ts to standardize property naming for databa…
Tiagospem May 19, 2025
ccb66c6
refactor: enhance projectLogs.ts for improved remote log handling and…
Tiagospem May 19, 2025
3d388e6
refactor: update redis.ts to standardize property naming for Redis co…
Tiagospem May 19, 2025
5afd1d1
refactor: update sidebar.ts to integrate AppConnection for improved d…
Tiagospem May 19, 2025
00fd1ff
refactor: update sql-executor.ts to integrate AppConnection for SQL q…
Tiagospem May 19, 2025
2629b66
refactor: enhance ssh.ts for improved error handling and connection m…
Tiagospem May 19, 2025
4fddaa8
refactor: streamline ssh.ts by removing commented-out code and enhanc…
Tiagospem May 19, 2025
99eea05
refactor: update ssh-connection.d.ts to improve SshConnection structu…
Tiagospem May 19, 2025
4e35cca
refactor: update table.d.ts to integrate AppConnection for database o…
Tiagospem May 19, 2025
cdede79
refactor: integrate AppConnection into tables.ts and related files fo…
Tiagospem May 19, 2025
f651762
refactor: integrate AppConnection into various modules for improved S…
Tiagospem May 19, 2025
337e339
refactor: integrate AppConnection into tables.ts and related files fo…
Tiagospem May 19, 2025
129f7c3
refactor: enhance SSH handling by integrating AppConnection across mu…
Tiagospem May 19, 2025
931f71f
refactor: integrate AppConnection into useForeignKeyNavigation for im…
Tiagospem May 19, 2025
2334b9b
refactor: enhance SSH handling by creating AppConnection in useSQLEdi…
Tiagospem May 19, 2025
54db84f
refactor: fix formatting in mysql-connection.ts by adding a newline a…
Tiagospem May 19, 2025
9457da7
refactor: enhance SSH command execution in Terminal.vue with improved…
Tiagospem May 19, 2025
48d9db6
refactor: fix formatting in mysql-connection.ts by adding a newline a…
Tiagospem May 19, 2025
276cfb7
refactor: remove unused Docker functions and streamline exec output h…
Tiagospem May 19, 2025
5e344fd
refactor: remove debug logging for connection configuration validatio…
Tiagospem May 19, 2025
be107a7
refactor: update tables.ts to improve type safety and connection hand…
Tiagospem May 19, 2025
61d076a
refactor: enhance database connection handling and transaction manage…
Tiagospem May 19, 2025
e76131b
refactor: enhance type safety and improve file handling in projectLog…
Tiagospem May 19, 2025
97600f3
refactor: improve null safety in database switching logic in Database…
Tiagospem May 19, 2025
c157cbe
refactor: improve type assertion for SSH connection in ProjectLogs.vue
Tiagospem May 19, 2025
fc483cb
refactor: remove unused MysqlConnection import in Sidebar.vue
Tiagospem May 19, 2025
6672aa4
refactor: remove unnecessary entries from tsconfig.node.json include …
Tiagospem May 19, 2025
5a69d02
refactor: restructure data connection handling in ExportDataModal.vue
Tiagospem May 19, 2025
7dd753f
refactor: improve optional chaining for database configuration in pro…
Tiagospem May 19, 2025
25df389
refactor: add conditional rendering for non-remote projects in Sideba…
Tiagospem May 19, 2025
fadeefb
refactor: add isRemoteConnection property to BaseHeader.vue
Tiagospem May 19, 2025
2314ecc
refactor: add isRemote parameter to useDatabaseSchema for conditional…
Tiagospem May 19, 2025
233d3f2
refactor: add isRemoteConnection property to SQLEditor.vue for remote…
Tiagospem May 19, 2025
3bd2b48
refactor: add isRemoteConnection computed property to SQLEditorView.v…
Tiagospem May 19, 2025
889d0c9
refactor: add isRemoteConnection prop to useSQLEditor for conditional…
Tiagospem May 19, 2025
c21fd4d
chore: bump version to 1.1.0 in package.json
Tiagospem May 19, 2025
98e7c3a
refactor: update connection handling to use AppConnection interface f…
Tiagospem May 19, 2025
c747749
refactor: add additional options for row selection in FilterButton an…
Tiagospem May 20, 2025
68b1182
refactor: update card styling and connection status badge in Home.vue
Tiagospem May 20, 2025
4af1306
refactor: disable opening dev tools on initialization and remove alwa…
Tiagospem May 20, 2025
8b85680
refactor: enhance LiveUpdates component with improved loading states …
Tiagospem May 20, 2025
c3dab31
refactor: update SVG icon in MainHeader component for improved clarit…
Tiagospem May 20, 2025
cfa109a
refactor: update SVG icon in MainHeader component for improved clarit…
Tiagospem May 20, 2025
89a1b52
refactor: update SVG icon in MainHeader component for improved clarit…
Tiagospem May 20, 2025
d7cbcaa
refactor: add showBackButton prop to BaseHeader component for improve…
Tiagospem May 20, 2025
18e58cb
refactor: remove unused handleGoBack function from DatabaseView compo…
Tiagospem May 20, 2025
66d81fe
refactor: update openConnection function to handle connection window …
Tiagospem May 20, 2025
3d21324
refactor: enhance window management by introducing connection and SQL…
Tiagospem May 20, 2025
922e523
refactor: implement window management functions for connection and SQ…
Tiagospem May 20, 2025
2a352d9
refactor: update SQL editor navigation and remove unused goBack function
Tiagospem May 20, 2025
fe17a25
refactor: remove PostgreSQL implementation guide and related files
Tiagospem May 20, 2025
233dba7
refactor: streamline SSH connection handling by removing redundant co…
Tiagospem May 20, 2025
0c2b57e
refactor: conditionally manage event listeners for table selection an…
Tiagospem May 20, 2025
905064f
feat: add SQL export functionality with multiple format options
Tiagospem May 20, 2025
dad06cf
feat: add migration badge update functionality in the app
Tiagospem May 21, 2025
e3d2141
feat: implement remote file explorer component and integrate with SSH…
Tiagospem May 21, 2025
f23fa49
feat: enhance modal and remote file explorer with responsive design a…
Tiagospem May 21, 2025
6e7037a
feat: integrate remote file editor into remote file explorer for enha…
Tiagospem May 21, 2025
00b89cb
feat: bump version to 1.2.0 for new release
Tiagospem May 21, 2025
e37e7a5
feat: update SVG path in MainHeader component for improved icon rende…
Tiagospem May 21, 2025
07487c8
feat: cast SSH configuration to SshConnection type in MainHeader comp…
Tiagospem May 21, 2025
80801da
feat: bump version to 1.2.1 and enhance monitoring with window destru…
Tiagospem May 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"permissions": {
"allow": [
"Bash(grep:*)"
],
"deny": []
}
}
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc.js

This file was deleted.

112 changes: 112 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

Larabase is an Electron desktop application specifically designed for Laravel developers. It's an opinionated database GUI tool with seamless Laravel integration, providing specialized features for Laravel project development workflows.

## Key Commands

### Development

```bash
# Start development server
npm run dev

# Build for current platform
npm run build

# Platform-specific builds
npm run build:mac-apple # macOS (Apple Silicon)
npm run build:mac-intel # macOS (Intel)
npm run build:win # Windows
npm run build:linux # Linux

# Code Quality
npm run lint # Run ESLint with auto-fix
npm run format # Run Prettier formatter
```

## Architecture Overview

Larabase follows the standard Electron architecture with main and renderer processes:

### Main Process (`electron/`)

- **Main Entry:** `electron/main/index.ts` - Application initialization, window management
- **Modules:** `electron/modules/` - Backend functionality implemented as service modules
- Database operations (`mysql.ts`, `tables.ts`, `sql-executor.ts`)
- SSH tunneling (`ssh.ts`)
- Redis integration (`redis.ts`)
- Project management (`projects.ts`)
- Terminal emulation (`terminal.ts`)
- **Helpers:** `electron/helpers/` - Utility functions for various operations

### Renderer Process (`src/`)

- **Components:** `src/components/` - Vue.js UI components organized by functionality
- **State Management:** `src/store/` - Pinia stores for application state
- **Services:** `src/services/` - API communication and frontend services
- **Types:** `src/types/` - TypeScript interfaces and type definitions

### Communication Pattern

The application follows a communication pattern using Electron's IPC:

1. Front-end requests through `window.electron.ipcRenderer.invoke(channel, ...args)`
2. Backend handles via IPC handlers registered in modules
3. Results returned to front-end asynchronously

## Key Features & Implementation

### Database Connections

- Supports direct MySQL connections and SSH tunneling
- Connection details stored securely via electron-store
- SSH tunneling implemented using ssh2 library and dynamic port forwarding

### Query Management

- Monaco editor for SQL editing with syntax highlighting
- SQL execution handled through mysql2 library
- Results displayed in Vue data table components with sorting/filtering

### Laravel Integration

- Specialized views for Laravel-specific database operations
- Migration management interface
- .env file editor
- Terminal integration for running Artisan commands

### Redis Support

- Redis database browsing and management
- Key-value storage interaction
- Cache management operations

## Data Flow

1. User interacts with Vue UI components
2. Actions trigger state changes in Pinia stores
3. Stores dispatch IPC calls to Electron backend
4. Backend modules execute operations and return results
5. UI updates based on returned data
6. Always use preload file to expose necessary APIs to the renderer process
7. Do not comment on the code unless extremely necessary to avoid polluting the codebase
8. Always create a module in the electron/modules for grouped functionality (e.g., database, SSH, Redis) to maintain organization

## Technology Stack

- **Electron**: Cross-platform desktop framework
- **Vue.js 3**: Frontend framework with TypeScript
- **Pinia**: State management
- **Tailwind CSS & DaisyUI**: Styling
- **Monaco Editor**: Code editor component
- **MySQL2**: Database connectivity
- **SSH2**: SSH tunneling support
- **IoRedis**: Redis client functionality

## Code Tips and Tricks

- Always use toRaw for reactive objects to avoid errors like "An object could not be cloned."
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,48 @@ npm run build:win # Windows
npm run build:linux # Linux
```

## SSH Tunneling Support

Larabase now supports connecting to MySQL databases through SSH tunnels. This feature allows you to:

1. Connect to remote database servers securely via SSH
2. Work with databases that are not directly accessible from your machine
3. Maintain the same workflow and functionality as with local database connections

### How SSH Tunneling Works

SSH tunneling creates a secure encrypted channel between your local machine and the remote server:

1. An SSH connection is established to the remote server
2. A local port is forwarded to the remote database server port
3. Your connection uses this local port, which securely tunnels traffic to the remote server
4. All database operations work transparently through this tunnel

### Implementation Details

The SSH tunneling implementation uses:

- The `ssh2` library for SSH connections and port forwarding
- The `portfinder` library to dynamically find available local ports
- The existing MySQL connection module, modified to work through SSH tunnels

### Setup

To use SSH tunneling, you need:

1. SSH access to the remote server (user/password or key-based authentication)
2. The remote server needs access to the MySQL database
3. Create a connection in Larabase with SSH tunneling enabled

### Usage

When creating a new connection, select the SSH option and provide:

1. SSH server details (host, port, user, password/private key)
2. Remote database details (host, port, user, password, database name)

Once connected, you can use all Larabase features as you would with a local database.

## License

This project is licensed under the MIT License - see the LICENSE file for details.
Expand Down
37 changes: 0 additions & 37 deletions docs/postgresql-implementation.md

This file was deleted.

64 changes: 0 additions & 64 deletions docs/postgresql-implementation/01-types.md

This file was deleted.

Loading