Getting Started with DBGlass: Installation to First DashboardDBGlass is a lightweight, fast data visualization tool designed to help teams turn raw data into interactive dashboards with minimal setup. This guide walks you from installation to creating your first dashboard, covering system requirements, connection options, basic transformations, visualization types, dashboard layout, and best practices for sharing and maintenance.
What You’ll Need
- A machine running Linux, macOS, or Windows (64-bit recommended)
- Node.js 18+ and npm (for local install) or Docker (for containerized deployment)
- Access credentials to your data source (database, CSV, or API)
- A modern browser (Chrome, Firefox, Edge) for the DBGlass UI
Installation
There are two common installation methods: Docker (recommended for production) and local install (quick start / development).
Docker (recommended)
- Pull the latest image:
docker pull dbglass/dbglass:latest
- Run the container (example with ports and persistent storage):
docker run -d --name dbglass -p 8080:8080 -v dbglass_data:/var/lib/dbglass -e DBGLASS_ADMIN_PASSWORD='YourStrongPass' dbglass/dbglass:latest
- Open http://localhost:8080 in your browser and log in with the admin password you set.
Local install (development)
- Clone the repo and install:
git clone https://github.com/dbglass/dbglass.git cd dbglass npm install npm run build npm start
- Open http://localhost:8080 and sign in using the prompted setup flow.
Initial Setup and Security
- Create an admin user during first-run setup. Use a strong password.
- Configure TLS in production by terminating TLS at a reverse proxy (NGINX, Caddy) or enable TLS in your container/orchestrator.
- Secure your data source credentials; prefer environment variables or a secrets manager.
Connecting Data Sources
DBGlass supports SQL databases, CSV uploads, and REST API sources.
Connecting a SQL database:
- In the UI, go to Settings → Data Sources → Add New.
- Choose your database type (Postgres, MySQL, SQLite, etc.).
- Enter hostname, port, database name, username, and password. Test the connection.
- Save.
CSV upload:
- Use the “Upload Data” option to load CSV files. DBGlass will infer column types and allow you to adjust them.
REST API:
- Define an API endpoint, set HTTP method, headers, and authentication (API key, Basic Auth, OAuth). Map JSON fields to table-like structures.
Exploring and Preparing Data
- Use the built-in query editor for SQL sources. It supports syntax highlighting and query history.
- For non-SQL sources, use the Transform tab to define field mappings, filters, and simple computed columns (e.g., concatenation, date parsing).
- Save often: DBGlass supports versioning for datasets and queries.
Quick tips:
- Use LIMIT during exploration to speed up queries.
- Create views for common joins and aggregations to simplify dashboard panels.
Visualizations: Types & When to Use Them
- Table — raw rows, best for detailed records.
- Line chart — time series and trends.
- Bar chart — categorical comparisons.
- Pie/Donut — share of total for a small number of categories.
- Scatter — correlations between two numeric fields.
- Heatmap — density across two dimensions.
- KPI/Big Number — single metrics (sum, average, count).
Each visualization has settings for axes, grouping, aggregation, filters, color scales, and tooltips.
Building Your First Dashboard
- Create a new dashboard: Dashboards → New Dashboard. Give it a name and optional description.
- Add Panels: Click “Add Panel” → choose a data source/query or saved query.
- Configure visualization: Select type, set axes/metrics/aggregations, and preview.
- Arrange panels: Drag to resize and reposition. Use column/grid settings for responsive layout.
- Add filters and variables:
- Create dashboard-level filters (date range, category selector) to apply across panels.
- Use variables for reusability (e.g., select which region or product to show).
Example panel: Monthly revenue line chart
- Data source: sales_db.orders
- Query:
SELECT date_trunc('month', order_date) AS month, SUM(total_amount) AS revenue FROM orders WHERE order_date >= current_date - interval '12 months' GROUP BY 1 ORDER BY 1;
- Visualization: Line chart, X-axis = month, Y-axis = revenue, display points and smooth lines.
Interactivity & Drilldowns
- Enable drilldowns on charts: clicking a point can open a detailed table or another dashboard with the clicked filter applied.
- Tooltips can show multiple fields and mini-aggregates.
- Cross-panel interactions: enable “Link filters” to propagate selections between panels.
Sharing and Access Control
- Dashboards can be exported as JSON and imported elsewhere.
- Share via link: public (no auth) or team-only (requires login). For public sharing, set an expiration if needed.
- Role-based access: Admin, Editor, Viewer. Assign roles per user or team. Integrate with SSO (OAuth, SAML) for enterprise setups.
Maintenance & Performance Tips
- Cache frequent queries and use materialized views for expensive aggregations.
- Monitor query performance via the Query Log. Index database columns used for joins and filters.
- Archive old data to improve responsiveness for recent-focused dashboards.
- Back up DBGlass config and storage (volume mount used in Docker example).
Troubleshooting Common Issues
- Can’t connect to DB: verify host/port, firewall rules, and credentials. Check DBGlass logs for error messages.
- Slow dashboards: add LIMITs, enable caching, or pre-aggregate.
- Incorrect date parsing: check timezone settings in DBGlass and your database.
Useful Example: Sales Overview Dashboard Layout
- Top row: KPI tiles — Total Revenue, Orders, Avg Order Value, Conversion Rate.
- Second row: Line chart — Revenue (12 months), Area chart — Orders by day.
- Third row: Bar chart — Revenue by Region, Pie — Revenue by Product Category.
- Bottom: Table — Top 50 orders (click to drill into order details).
Next Steps
- Explore advanced features: alerting on metric thresholds, scheduled reports, embedding dashboards in other apps.
- Automate backups and monitoring for production deployments.
- Join the DBGlass community or consult documentation for plugins and integrations.
If you want, I can convert this into a step-by-step checklist, produce the SQL queries for specific databases, or create screenshots/mockups for the example dashboard.
Leave a Reply