I created this minimal SQLite online preview and editing project for loading, querying, modifying, and exporting SQLite databases in the browser.
- Authoring agent: Codex
- Model used: GPT-5 (Codex coding agent runtime)
- App runtime: Codex desktop
- Live URL: https://sqlite.acexy.cn
- I implemented importing SQLite files through file selection and drag-and-drop
- I implemented creating a brand-new empty database in the browser
- I implemented running SQL statements directly in the editor
- I implemented table browsing and schema inspection from the left panel
- I moved table preview results into the main result area
- I added SQL syntax highlighting in the editor
- I added a draggable splitter to adjust the SQL and result area ratio
- I added run, format, copy, and clear-editor actions in the SQL editor toolbar, plus a
Cmd/Ctrl + Eshortcut for executing selected SQL - I added database export to
.sqlite - I added a workspace clear action with confirmation for destructive changes
- I added confirmation prompts before replacing existing workspace data
- I added before-unload warnings and local workspace restore after refresh
- I added local storage persistence for theme and editor content
- I added a light/dark theme toggle
- I made the layout responsive for desktop and mobile
- I packaged
sql.jslocally and kept CDN-first loading with automatic fallback
- Open
index.htmldirectly in a browser. - Import a SQLite file or create a new empty database.
- Select the SQL you want to run, then press
Cmd/Ctrl + Eor click the run button in the SQL editor toolbar. - Click the format button to pretty-print the editor SQL; multiple statements are formatted separately.
- View query results, schema details, and table previews in the right panel.
index.html: page skeleton and UI structurebootstrap.js: lightweight runtime bootstrapperstyle.css: layout and visual stylesapp.js: SQLite loading, query execution, preview rendering, persistence, and interactionspublic/vendor/sql.js: localsql.jsruntime and WebAssembly fallback assets
- I built this as a static frontend implementation.
- No build tool or install step is required to run it.
- It tries the CDN runtime first and falls back to the local vendor copy when needed.
- The workspace is restored from local storage after refresh when possible.