๐ Spanner GUI SQL Client
๐ A simple and user-friendly GUI client for Google Cloud Spanner, built with Next.js and React.
๐ Features
- ๐ Easy navigation of Spanner instances and databases
- โก Execute SQL queries
- ๐ View query results in a clean, tabular format
- ๐ Query history for quick access to past operations
- ๐จ Syntax highlighting and query formatting
- ๐ฑ Responsive design for desktop and mobile use
๐ฆ Installation
git clone https://github.com/esh2n/spanner-gui.git
cd spanner-gui
bun install
bun run dev.tauri
๐ Quick Start
1. Set up Google Cloud credentials
Ensure you have set up your Google Cloud credentials. You can do this by setting the GOOGLE_APPLICATION_CREDENTIALS
environment variable to point to your service account key file.
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-key.json"
2. Run the development server
bun run dev.tauri
๐ฅ Usage
- Enter your Google Cloud Project ID and click "Initialize"
- Select a Spanner instance from the dropdown
- Choose a database from the selected instance
- Write your SQL query in the editor
- Click "Execute" to run the query
- View results in the table below
- Access query history in the "History" tab
๐ API Reference
POST /api/spanner
Handles all Spanner-related operations.
Request Body
{
type: 'instances' | 'databases' | 'query',
projectId: string,
instanceId?: string,
databaseId?: string,
query?: string
}
Response
- For
instances
: Array of instance names
- For
databases
: Array of database names
- For
query
: Array of result rows
๐ค Contributing
We welcome contributions! Here's how you can help:
- ๐ด Fork the repository
- ๐ฟ Create your feature branch:
git checkout -b my-new-feature
- ๐พ Commit your changes:
git commit -am 'Add some feature'
- ๐ Push to the branch:
git push origin my-new-feature
- ๐ Submit a pull request
๐ TODO
- ๐ Implement user authentication
- ๐ Add visual query plan explanation
- ๐ Support for DML operations (INSERT, UPDATE, DELETE)
- ๐ Query performance metrics
- ๐ Dark mode support
- ๐งช Comprehensive unit and integration testing
๐ License
MIT
๐ Acknowledgements