Skip to content

Latest commit

 

History

515 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Flutter Dart SQLite Android

CI Coverage very_good_analysis MIT License

English · Español · Português (BR)

SQL Studio

An Android app to practice SQL on local, editable, fully offline SQLite databases.
Explore the docs »

Report Bug · Request Feature

Table of Contents

About the Project

SQL Studio is a mobile SQL playground: a set of ready-made SQLite databases you can query, edit, and reset, right on your phone, with no server or account required.

Each database ships with a predefined schema and seed data. You write and run real SQL against it in a code editor with syntax highlighting, inspect results in a console, and can always reset the database back to its original state. A visual schema view lets you inspect tables, columns, and relationships without writing a query.

Preview

Home / SQL editor Databases SQL editor with an active database Navigation drawer Database visualizer Settings Language selector Theme selector SQL suggestions settings Workspace layout settings

Features

  • Offline SQLite Databases: A catalog of local databases, each with its own schema and seed data, ready to query immediately.
  • SQL Editor: Write and run SQL with syntax highlighting, a fullscreen mode, and a console showing query results and errors.
  • Database Visualizer: Inspect a database's tables, columns, and structure visually, without writing SQL.
  • Reset Database: Restore any database to its original schema and seed data at any time.
  • Copy Schema & Seed: Copy a database's schema, seed data, or both to the clipboard.
  • SQL Suggestions: Basic and advanced SQL snippets to speed up writing common queries, toggled from Settings.
  • Configurable Workspace Layout: Choose how the editor, console, and visualizer are arranged on screen.
  • Multiple Languages: Full app UI in English, Portuguese (Brazil), and Spanish.
  • Theme Selection: Light, dark, or system theme.
  • Database Search: Filter the databases list by name.

Tech Stack

  • Flutter: Google's UI toolkit for building natively compiled applications from a single codebase.
  • Dart: The programming language behind Flutter.
  • Riverpod: State management and dependency injection.
  • go_router: Declarative routing.
  • sqflite: SQLite database engine for Flutter.
  • flutter_code_editor & flutter_highlight: The code editor and syntax highlighting used for the SQL editor.

Architecture

The app is organized by feature (lib/src/features/), each with its own data, domain, and presentation layers, following a simplified Clean Architecture and MVVM:

  • database: the database catalog, creation, deletion, favoriting, and search.
  • database-visualizer: the visual schema view of a database's tables, columns, and relationships.
  • sql-editor: the code editor, its console, and running queries.
  • sql-suggestions: the basic and advanced SQL snippets shown while writing a query.
  • workspace-layout: how the editor, console, and visualizer are arranged on screen.
  • app-version: the app's own version info shown in Settings.

State is managed with Riverpod (Notifier/AsyncNotifier classes exposed through providers), routing with go_router, and persistence through sqflite and shared_preferences. Cross-cutting concerns (navigation, logging, error handling) live under lib/src/core; widgets and utilities shared by more than one feature, but still coupled to this app, live under lib/src/shared. Presentation-agnostic design tokens and components (buttons, cards, dialogs, states) live in their own local package, packages/app_ui. See docs/architecture.md for the full breakdown.

Getting Started

The project pins its Flutter SDK version via FVM, so all commands below use fvm flutter rather than a bare flutter install.

git clone https://github.com/dariomatias-dev/sql_studio_app.git
cd sql_studio_app
fvm install
fvm flutter pub get

Then run the app on a connected device or emulator:

fvm flutter run

Scripts

Utility scripts live under scripts/.

Script Command Description
screenshot scripts/screenshot.sh [device-id] Drives the app through its main screens on a connected device or emulator and saves a screenshot of each one into screenshots/<locale>/, used for the README, Play Store listing, and official website.
verify scripts/verify.sh [--skip-tests] The full local quality gate, mirroring CI: regenerates localizations, checks ARB key parity, formatting, analysis, tests, and the coverage threshold, for the app and packages/app_ui.
check_l10n scripts/check_l10n.sh Compares the message keys of every app_*.arb against the English template and fails on a missing or extra key.
check_coverage scripts/check_coverage.sh <lcov> <minimum> Parses an lcov report, excludes lib/l10n/, and fails below the given minimum.

Testing

The project has 91 test files covering repositories, view models, and widgets, plus 15 in packages/app_ui for its own components, and 9 integration_test/ suites covering first run and seeding, database creation and deletion, editing and resetting the default database, favoriting, theme and workspace layout persistence, and language switching. CI enforces a minimum line coverage of 91% for the app and its own floor for packages/app_ui, alongside the strict very_good_analysis lint set and dart format.

Every CI run uploads its lcov reports to Codecov as two flags, app and app_ui, which comment the coverage delta on each pull request. For a line-by-line report locally, generate one from the same file:

fvm flutter test --coverage
genhtml coverage/lcov.info -o coverage/html   # needs lcov installed

Documentation

Contributing

Contributions make the open-source community an amazing place to learn and create. Any contributions you make are greatly appreciated.

Before opening a pull request, see docs/contributing.md for the local setup, commit message convention (Conventional Commits), and what CI checks.

Security

Please do not open a public issue to report a security vulnerability; see docs/security.md for how to report one.

License

Distributed under the MIT License. See the LICENSE file for more information.

Author

Developed by Dário Matias Sales:

About

Android app for practicing SQL against local, offline SQLite databases: editable schema, syntax-highlighted editor, results console, and a visual database inspector. Built with Flutter.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages