Skip to content

πŸš€ A simple and user-friendly GUI client for Google Cloud Spanner, built with Next.js and Tauri.

Notifications You must be signed in to change notification settings

esh2n/spanner-gui

Repository files navigation

🌐 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

  1. Enter your Google Cloud Project ID and click "Initialize"
  2. Select a Spanner instance from the dropdown
  3. Choose a database from the selected instance
  4. Write your SQL query in the editor
  5. Click "Execute" to run the query
  6. View results in the table below
  7. 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:

  1. 🍴 Fork the repository
  2. 🌿 Create your feature branch: git checkout -b my-new-feature
  3. πŸ’Ύ Commit your changes: git commit -am 'Add some feature'
  4. πŸš€ Push to the branch: git push origin my-new-feature
  5. πŸŽ‰ 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

About

πŸš€ A simple and user-friendly GUI client for Google Cloud Spanner, built with Next.js and Tauri.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages