SQLChef is a powerful, web-based SQL query tool that allows you to effortlessly analyze and manipulate your data. With support for various structured file formats and an intuitive interface, SQLChef makes data querying accessible and efficient for developers, data analysts, and enthusiasts alike.
- Demo
- Features
- Installation
- Usage
- Project Structure
- Technologies Used
- Contributing
- License
- Acknowledgements
- Upload Multiple File Types: Supports CSV, TSV, TXT, JSON, Parquet, Excel, and SQLite databases.
- Interactive Query Editor: Write, format, and execute SQL queries with ease.
- Query History: Keep track of your past queries and results for quick reference and restoration.
- Results Visualization: View query results in a neatly formatted table with options to download as CSV.
- Sidebar with File Details: Inspect uploaded files’ metadata, including columns, data types, and row counts.
- Drag & Drop & URL Upload: Easily upload files via drag-and-drop or by pasting a file URL.
- Local Persistence: History and last query results are saved in local storage for seamless workflow continuity.
- Responsive Design: Optimized for various screen sizes ensuring usability across devices.
-
Clone the Repository
git clone https://github.com/yourusername/sqlchef.git cd sqlchef
-
Install Dependencies
Using npm:
npm install
Or using yarn:
yarn install
-
Run the Development Server
Using npm:
npm run dev
Or using yarn:
yarn dev
-
Build for Production
Using npm:
npm run build
Or using yarn:
yarn build
-
Serve the Production Build
You can use a static server like
serve
to preview the production build.npm install -g serve serve -s dist
Then navigate to the provided URL to access SQLChef.
- Drag & Drop: Drag your structured file onto the uploader area.
- File Select: Click the "Upload File" button to select a file from your device.
- Paste URL: Paste a file URL into the designated input field to load remote data.
- Write SQL Query: Use the query editor to write your SQL statements.
- Execute: Press
Enter
to run the query orShift+Enter
to insert a newline. - View Results: The results will appear in the results section below the editor.
- Download: Click the "Download" button to export results as a CSV file.
Access your past queries by clicking the history icon in the header. From the history modal, you can:
- Restore: Re-execute a previous query.
- Clear History: Remove all past queries from history.
sqlchef/
├── public/
│ └── sqlchef.svg # Application logo
├── src/
│ ├── components/
│ │ ├── HistoryModal.vue # Modal for displaying query history
│ │ ├── Interface.vue # Main interface handling uploads and queries
│ │ ├── Query.vue # SQL query editor component
│ │ ├── Results.vue # Component to display query results
│ │ ├── Sidebar.vue # Sidebar displaying file details
│ │ └── Uploader.vue # File uploader component
│ ├── services/
│ │ └── duckdbService.js # Service for interacting with DuckDB
│ ├── App.vue # Root Vue component
│ ├── main.js # Entry point for the Vue application
│ ├── index.css # Tailwind CSS imports
│ └── style.css # Custom global styles
├── tailwind.config.js # Tailwind CSS configuration
├── package.json # Project metadata and dependencies
└── README.md # Project documentation
- HistoryModal.vue: Displays a modal with the user's query history, allowing them to restore or clear past queries.
- Interface.vue: Handles file uploads, query execution, and displays results. Integrates with the sidebar and uploader components.
- Query.vue: Provides a text area for writing SQL queries with buttons to run or format the query. Shows a loading indicator during query execution.
- Results.vue: Presents the results of executed queries in a table format and offers an option to download the results as a CSV file.
- Sidebar.vue: Shows detailed information about the uploaded file, including columns, data types, and file metadata. Allows re-uploading of files.
- Uploader.vue: Facilitates file uploads through drag-and-drop or by pasting a URL. Handles fetching remote files and emitting selected files for processing.
- duckdbService.js: Manages the initialization and interaction with DuckDB, enabling SQL query execution within the browser.
- Vue.js: Frontend framework for building interactive user interfaces.
- Tailwind CSS: Utility-first CSS framework for rapid UI development.
- DuckDB: In-browser SQL database for executing queries against uploaded data.
- JavaScript (ES6+): Programming language for application logic.
- HTML5 & CSS3: Markup and styling technologies.
Contributions are welcome! Whether it's fixing bugs, improving documentation, or adding new features, your help is appreciated.
-
Fork the Repository
Click the Fork button at the top right of this page to create your own copy of the repository.
-
Clone Your Fork
git clone https://github.com/yourusername/sqlchef.git cd sqlchef
-
Create a New Branch
git checkout -b feature/YourFeature
-
Make Your Changes
Implement your feature or fix the issue.
-
Commit Your Changes
git commit -m "Add some feature"
-
Push to Your Fork
git push origin feature/YourFeature
-
Open a Pull Request
Navigate to your fork on GitHub and click the New Pull Request button.
This project is licensed under the MIT License. You are free to use, modify, and distribute it as per the license terms.
- DuckDB for providing an efficient in-browser SQL engine.
- Tailwind CSS for the utility-first CSS framework.
- Inspired by modern SQL tools and data analysis platforms.
- Thanks to the open-source community for their invaluable contributions.