Skip to content

Deploying Dashpress

Dashpress is an innovative no-code admin panel generator that automatically creates fully functional database management interfaces by connecting directly to your databases. Instead of spending weeks building custom admin dashboards, Dashpress introspects your database schema and instantly generates a complete CRUD interface with tables, forms, relationships, and authentication. Built with Next.js and TypeScript, Dashpress provides a modern, responsive interface that adapts to your database structure.

The platform supports multiple database systems including PostgreSQL, MySQL, SQL Server, and SQLite, making it versatile for various deployment scenarios. Dashpress goes beyond basic CRUD operations by offering features like role-based access control, custom actions, data validation rules, computed fields, and dashboard widgets. It’s particularly valuable for internal tools, backoffice systems, customer support portals, and rapid prototyping where you need database management capabilities without building everything from scratch.

Why Deploy Dashpress on Klutch.sh?

Deploying Dashpress on Klutch.sh offers several advantages for hosting your admin panel solution:

  • Automatic Docker Detection: Klutch.sh automatically recognizes your Dockerfile and handles the containerization process without manual configuration
  • Persistent Storage: Built-in volume management ensures your configuration, credentials, and application state persist across deployments
  • Database Connectivity: Connect Dashpress to external databases or co-locate with database containers using TCP traffic routing
  • Simple HTTP Routing: Access your admin panel through HTTPS with automatic SSL certificate provisioning
  • Environment Management: Securely store database credentials and API keys through environment variables
  • Rapid Deployment: Go from code to production in minutes with GitHub integration and automated deployment pipelines
  • Resource Efficiency: Containerized deployment ensures optimal resource utilization for your admin interface

Prerequisites

Before deploying Dashpress to Klutch.sh, ensure you have:

  • A Klutch.sh account (sign up at klutch.sh)
  • A GitHub account with a repository for your Dashpress deployment
  • An existing database (PostgreSQL, MySQL, SQL Server, or SQLite)
  • Database connection credentials (host, port, username, password, database name)
  • Basic understanding of Docker and containerization concepts
  • Familiarity with database concepts and SQL
  • Git installed on your local development machine

Understanding Dashpress Architecture

Dashpress follows a modern web application architecture built on Next.js:

Core Components

Next.js Application Server The core of Dashpress is a Next.js application that serves both the admin interface and API endpoints. Next.js provides server-side rendering for fast initial page loads and client-side navigation for a smooth single-page application experience. The server handles authentication, authorization, and proxies database queries.

Database Connection Layer Dashpress uses a database abstraction layer that supports multiple database systems. The connection layer:

  • Introspects database schemas to discover tables, columns, and relationships
  • Translates UI operations into database-specific SQL queries
  • Manages connection pools for optimal performance
  • Handles transaction management and data integrity
  • Supports read replicas and connection retry logic

Schema Introspection Engine When Dashpress connects to a database, it automatically analyzes the schema to build the admin interface:

  • Discovers all tables, views, and columns
  • Identifies primary keys, foreign keys, and indexes
  • Detects column data types and constraints
  • Maps relationships between tables
  • Generates appropriate form inputs based on data types

Configuration Storage Dashpress stores its configuration (user settings, permissions, custom actions, etc.) in JSON files within the application directory. This includes:

  • User accounts and authentication settings
  • Role-based access control rules
  • Custom field validations
  • Dashboard widget configurations
  • UI customizations and branding

Authentication System The built-in authentication system supports:

  • Local user accounts with encrypted passwords
  • Role-based permissions (admin, editor, viewer)
  • Session management with secure cookies
  • Password reset functionality
  • API token generation for integrations

Form Generation Engine Dashpress automatically generates forms based on database schema:

  • Text inputs for string columns
  • Number inputs for numeric columns
  • Date pickers for date/timestamp columns
  • Dropdowns for foreign key relationships
  • Rich text editors for text columns
  • File upload fields for blob columns

Data Flow

  1. User accesses the Dashpress web interface
  2. Authentication middleware verifies session credentials
  3. User navigates to a table view
  4. Schema introspection retrieves table metadata
  5. UI generates appropriate table view with filters and sorting
  6. User performs CRUD operations
  7. Application validates input against schema constraints
  8. Database connection layer executes SQL queries
  9. Results are returned and rendered in the interface
  10. Configuration changes are persisted to local storage

Storage Requirements

Dashpress requires persistent storage for:

  • Configuration Files: User accounts, permissions, and settings (typically < 100MB)
  • Session Data: Active user sessions and authentication tokens
  • Upload Storage: If file uploads are enabled (size varies by usage)
  • Logs: Application logs and audit trails

Installation and Setup

Let’s walk through setting up Dashpress for deployment on Klutch.sh.

Step 1: Create the Project Structure

First, create a new directory for your Dashpress deployment:

Terminal window
mkdir dashpress-deployment
cd dashpress-deployment
git init

Step 2: Create the Dockerfile

Create a Dockerfile in the root directory:

FROM node:18-alpine AS base
# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install Dashpress
RUN npm install -g dashpress
# Production image, copy all the files and run
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
# Copy Dashpress from global installation
COPY --from=deps /usr/local/lib/node_modules/dashpress /app
# Create necessary directories
RUN mkdir -p /app/data /app/.dashpress
# Set correct permissions
RUN chown -R nextjs:nodejs /app
USER nextjs
EXPOSE 3000
ENV HOSTNAME="0.0.0.0"
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Start Dashpress
CMD ["npx", "dashpress", "start"]

Step 3: Create Environment Configuration

Create a .env.example file for reference:

# Application Configuration
NODE_ENV=production
PORT=3000
HOSTNAME=0.0.0.0
# Database Configuration (PostgreSQL example)
DATABASE_TYPE=postgres
DATABASE_HOST=your-database-host.com
DATABASE_PORT=5432
DATABASE_NAME=your_database_name
DATABASE_USER=your_database_user
DATABASE_PASSWORD=your_secure_password
DATABASE_SSL=true
# Alternative: SQLite (for development/testing)
# DATABASE_TYPE=sqlite
# DATABASE_PATH=/app/data/dashpress.db
# Authentication
SECRET_KEY=your-secret-key-change-this-in-production
JWT_SECRET=your-jwt-secret-change-this-in-production
# Application Settings
DASHPRESS_DATA_DIR=/app/data
DASHPRESS_CONFIG_DIR=/app/.dashpress
# Optional: Email Configuration
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=your-smtp-user
SMTP_PASSWORD=your-smtp-password
SMTP_FROM=noreply@example.com
# Optional: File Upload Configuration
MAX_FILE_SIZE=10485760
ALLOWED_FILE_TYPES=image/jpeg,image/png,application/pdf
# Optional: API Configuration
API_RATE_LIMIT=100
API_RATE_LIMIT_WINDOW=60000

Step 4: Create Database Connection Configuration

Create a config directory for database-specific configurations:

Terminal window
mkdir -p config

Create config/database.json:

{
"connections": {
"production": {
"type": "postgres",
"host": "${DATABASE_HOST}",
"port": "${DATABASE_PORT}",
"database": "${DATABASE_NAME}",
"username": "${DATABASE_USER}",
"password": "${DATABASE_PASSWORD}",
"ssl": true,
"pool": {
"min": 2,
"max": 10
},
"options": {
"encrypt": true,
"trustServerCertificate": false
}
},
"mysql": {
"type": "mysql",
"host": "${DATABASE_HOST}",
"port": 3306,
"database": "${DATABASE_NAME}",
"username": "${DATABASE_USER}",
"password": "${DATABASE_PASSWORD}",
"ssl": true
},
"sqlite": {
"type": "sqlite",
"database": "/app/data/dashpress.db"
},
"mssql": {
"type": "mssql",
"host": "${DATABASE_HOST}",
"port": 1433,
"database": "${DATABASE_NAME}",
"username": "${DATABASE_USER}",
"password": "${DATABASE_PASSWORD}",
"options": {
"encrypt": true,
"enableArithAbort": true
}
}
}
}

Step 5: Create Initial Configuration

Create config/dashpress.json:

{
"app": {
"name": "Dashpress Admin",
"description": "Database Admin Panel",
"logo": null,
"favicon": null,
"primaryColor": "#3b82f6",
"locale": "en"
},
"security": {
"sessionTimeout": 3600,
"passwordPolicy": {
"minLength": 8,
"requireUppercase": true,
"requireLowercase": true,
"requireNumbers": true,
"requireSpecialChars": false
},
"enableTwoFactor": false,
"enableIpWhitelist": false,
"ipWhitelist": []
},
"features": {
"enableFileUploads": true,
"enableExport": true,
"enableImport": true,
"enableAuditLog": true,
"enableApiAccess": true
},
"ui": {
"itemsPerPage": 25,
"enableDarkMode": true,
"dateFormat": "YYYY-MM-DD",
"timeFormat": "HH:mm:ss",
"timezone": "UTC"
},
"permissions": {
"defaultRole": "viewer",
"roles": {
"admin": {
"read": true,
"create": true,
"update": true,
"delete": true,
"export": true,
"import": true
},
"editor": {
"read": true,
"create": true,
"update": true,
"delete": false,
"export": true,
"import": false
},
"viewer": {
"read": true,
"create": false,
"update": false,
"delete": false,
"export": false,
"import": false
}
}
}
}

Step 6: Create Docker Compose for Local Development

Create docker-compose.yml for local testing:

version: '3.8'
services:
dashpress:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- DATABASE_TYPE=postgres
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_NAME=dashpress_dev
- DATABASE_USER=dashpress
- DATABASE_PASSWORD=dashpress_password
- SECRET_KEY=dev-secret-key-change-in-production
- JWT_SECRET=dev-jwt-secret-change-in-production
volumes:
- ./data:/app/data
- ./config:/app/.dashpress
depends_on:
- postgres
restart: unless-stopped
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_DB=dashpress_dev
- POSTGRES_USER=dashpress
- POSTGRES_PASSWORD=dashpress_password
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
volumes:
postgres_data:

Step 7: Create .dockerignore

Create a .dockerignore file to optimize the build:

node_modules
npm-debug.log
.git
.gitignore
README.md
.env
.env.local
*.md
docker-compose.yml
data/
.dashpress/
.DS_Store
Thumbs.db

Step 8: Create Initialization Script

Create a scripts directory with setup helpers:

Terminal window
mkdir scripts

Create scripts/init-database.sql:

-- Example database schema for testing Dashpress
-- This creates a sample e-commerce database structure
-- Users table
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
first_name VARCHAR(100),
last_name VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Products table
CREATE TABLE IF NOT EXISTS products (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT,
price DECIMAL(10, 2) NOT NULL,
stock_quantity INTEGER DEFAULT 0,
category VARCHAR(100),
is_active BOOLEAN DEFAULT true,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Orders table
CREATE TABLE IF NOT EXISTS orders (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
order_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
total_amount DECIMAL(10, 2) NOT NULL,
status VARCHAR(50) DEFAULT 'pending',
shipping_address TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Order items table
CREATE TABLE IF NOT EXISTS order_items (
id SERIAL PRIMARY KEY,
order_id INTEGER REFERENCES orders(id) ON DELETE CASCADE,
product_id INTEGER REFERENCES products(id) ON DELETE CASCADE,
quantity INTEGER NOT NULL,
unit_price DECIMAL(10, 2) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Insert sample data
INSERT INTO users (email, first_name, last_name) VALUES
('john.doe@example.com', 'John', 'Doe'),
('jane.smith@example.com', 'Jane', 'Smith'),
('bob.johnson@example.com', 'Bob', 'Johnson');
INSERT INTO products (name, description, price, stock_quantity, category) VALUES
('Laptop', 'High-performance laptop', 999.99, 50, 'Electronics'),
('Mouse', 'Wireless mouse', 29.99, 200, 'Electronics'),
('Keyboard', 'Mechanical keyboard', 79.99, 100, 'Electronics'),
('Monitor', '27-inch 4K monitor', 399.99, 75, 'Electronics');
INSERT INTO orders (user_id, total_amount, status, shipping_address) VALUES
(1, 1029.98, 'completed', '123 Main St, City, State 12345'),
(2, 479.98, 'pending', '456 Oak Ave, Town, State 67890');
INSERT INTO order_items (order_id, product_id, quantity, unit_price) VALUES
(1, 1, 1, 999.99),
(1, 2, 1, 29.99),
(2, 3, 2, 79.99),
(2, 4, 1, 399.99);

Step 9: Create README

Create README.md with deployment information:

# Dashpress Deployment
This repository contains the configuration for deploying Dashpress on Klutch.sh.
## Features
- Automatic admin panel generation from database schema
- Support for PostgreSQL, MySQL, SQL Server, and SQLite
- Role-based access control
- CRUD operations with relationships
- Data validation and computed fields
- Export and import functionality
- Custom actions and workflows
## Database Configuration
Dashpress requires a connection to an existing database. Configure your database credentials in the environment variables.
## Environment Variables
See `.env.example` for all configuration options.
## Deployment
This application is configured to deploy on Klutch.sh with automatic Docker detection.

Step 10: Initialize Git Repository

Terminal window
git add .
git commit -m "Initial Dashpress setup for Klutch.sh deployment"
git branch -M master
git remote add origin https://github.com/yourusername/dashpress-deployment.git
git push -u origin master

Deploying to Klutch.sh

Now that your Dashpress application is configured, let’s deploy it to Klutch.sh.

  1. Log in to Klutch.sh

    Navigate to klutch.sh/app and sign in with your GitHub account.

  2. Create a New Project

    Click “New Project” and select “Import from GitHub”. Choose the repository containing your Dashpress deployment.

  3. Configure Build Settings

    Klutch.sh will automatically detect the Dockerfile in your repository. The platform will use this for building your container.

  4. Configure Traffic Settings

    Select “HTTP” as the traffic type. Dashpress serves its web interface on port 3000, and Klutch.sh will route HTTPS traffic to this port.

  5. Set Environment Variables

    In the project settings, add the following environment variables for your database connection:

    • NODE_ENV: production
    • PORT: 3000
    • DATABASE_TYPE: postgres (or mysql, mssql, sqlite)
    • DATABASE_HOST: Your database host address
    • DATABASE_PORT: Database port (5432 for PostgreSQL, 3306 for MySQL)
    • DATABASE_NAME: Your database name
    • DATABASE_USER: Database username
    • DATABASE_PASSWORD: Database password (keep secure!)
    • DATABASE_SSL: true (recommended for production)
    • SECRET_KEY: Generate a strong random string for sessions
    • JWT_SECRET: Generate a strong random string for JWT tokens

    Generate secure keys:

    Terminal window
    # Generate SECRET_KEY
    openssl rand -base64 32
    # Generate JWT_SECRET
    openssl rand -base64 32
  6. Configure Persistent Storage

    Dashpress requires persistent storage for configuration and application data:

    • Data Volume:
      • Mount path: /app/data
      • Size: 1GB (sufficient for configuration and uploads)
    • Configuration Volume:
      • Mount path: /app/.dashpress
      • Size: 500MB (for settings and user data)

    These volumes ensure your Dashpress configuration and user settings persist across deployments.

  7. Deploy the Application

    Click “Deploy” to start the build process. Klutch.sh will:

    • Clone your repository
    • Build the Docker image using your Dockerfile
    • Deploy the container with the specified configuration
    • Provision an HTTPS endpoint

    The initial deployment may take several minutes as the container downloads dependencies and builds the Next.js application.

  8. Access Your Admin Panel

    Once deployment completes, Klutch.sh will provide a URL like example-app.klutch.sh. Visit this URL to access your Dashpress instance.

  9. Complete Initial Setup

    On first access, Dashpress will:

    • Test the database connection
    • Introspect your database schema
    • Prompt you to create an admin account
    • Generate the admin interface based on your tables

    This process takes a few seconds depending on your database size.

  10. Create Admin User

    After database introspection completes, create your first admin user:

    • Enter your email address
    • Set a strong password
    • Confirm the password
    • Click "Create Admin Account"

Getting Started with Dashpress

Once your Dashpress instance is deployed and connected to your database, here’s how to use it effectively:

Initial Configuration

  1. Database Connection Verification

    • Dashpress automatically tests the connection on startup
    • Check the connection status in Settings → Database
    • Verify all tables are discovered and accessible
  2. User Account Setup

    • Create additional user accounts from Settings → Users
    • Assign appropriate roles (admin, editor, viewer)
    • Configure email notifications if SMTP is set up
  3. Interface Customization

    • Navigate to Settings → Appearance
    • Upload your logo and favicon
    • Set primary color to match your branding
    • Choose default theme (light/dark)

Working with Tables

Viewing Data Dashpress automatically generates table views for all database tables:

  • Browse data in paginated grid views
  • Sort by any column (click column header)
  • Filter data using the search bar
  • Apply advanced filters by column
  • Select visible columns from the column picker

Creating Records

  1. Navigate to any table view
  2. Click “New Record” button
  3. Fill in the auto-generated form
  4. Required fields are marked with asterisks
  5. Foreign key fields show dropdowns with related data
  6. Click “Save” to create the record

Editing Records

  1. Click any row to open the detail view
  2. Click “Edit” button
  3. Modify fields as needed
  4. Related data is accessible through tabs
  5. Click “Save” to persist changes

Deleting Records

  1. Select one or more records using checkboxes
  2. Click “Delete” button in the toolbar
  3. Confirm the deletion
  4. Records with foreign key constraints show warnings

Understanding Relationships

Dashpress automatically detects and visualizes database relationships:

One-to-Many Relationships

  • Parent records show tabs for related children
  • Example: A user record shows all their orders
  • Click the tab to view and manage related records

Many-to-One Relationships

  • Foreign key fields render as searchable dropdowns
  • Shows display values from the related table
  • Click to navigate to the related record

Many-to-Many Relationships

  • Junction tables are detected automatically
  • Shows related records in dedicated tabs
  • Add/remove relationships with checkboxes

Filtering and Searching

Quick Search Type in the search bar to find records:

john@example.com

Searches across all text columns.

Column Filters Click the filter icon next to any column:

  • Text columns: Contains, equals, starts with, ends with
  • Number columns: Equals, greater than, less than, between
  • Date columns: Equals, before, after, between
  • Boolean columns: True/false toggle
  • Foreign keys: Select from related records

Advanced Filter Combinations

  1. Apply multiple filters simultaneously
  2. Filters are combined with AND logic
  3. Click “Clear Filters” to reset
  4. Saved filters are available in the dropdown

Exporting Data

Single Table Export

  1. Navigate to a table view
  2. Apply any filters to narrow results
  3. Click “Export” button
  4. Choose format (CSV, Excel, JSON)
  5. Download the file

Custom Export

  1. Select specific records using checkboxes
  2. Click “Export Selected”
  3. Choose columns to include
  4. Select format and download

Importing Data

Bulk Import

  1. Navigate to a table view
  2. Click “Import” button
  3. Upload CSV or Excel file
  4. Map columns to database fields
  5. Preview and validate data
  6. Click “Import” to insert records

Update Existing Records

  1. Include primary key column in import file
  2. Dashpress will update matching records
  3. Missing records can be created or skipped
  4. Review import summary after completion

Custom Actions

Create custom actions for common workflows:

  1. Navigate to Settings → Actions
  2. Click “New Action”
  3. Configure:
    • Name: Action button label
    • Table: Target table
    • Type: Update, delete, or custom SQL
    • Conditions: When action is available
    • Confirmation: Optional confirmation message
  4. Actions appear in table toolbars and detail views

Role-Based Access Control

Configuring Roles

  1. Navigate to Settings → Permissions
  2. Dashpress includes three default roles:
    • Admin: Full access to all operations
    • Editor: Read, create, update (no delete)
    • Viewer: Read-only access
  3. Create custom roles with specific permissions

Table-Level Permissions

  1. Select a role to configure
  2. Set permissions per table:
    • Read, Create, Update, Delete
    • Export, Import
  3. Hide sensitive tables from certain roles

Column-Level Permissions

  1. Navigate to table settings
  2. Select columns to hide from specific roles
  3. Useful for PII or sensitive data

Dashboard Widgets

Customize the dashboard with data widgets:

  1. Navigate to Settings → Dashboard
  2. Click “Add Widget”
  3. Choose widget type:
    • Count: Display record counts
    • Sum: Aggregate numeric columns
    • Chart: Visualize data with bar/line/pie charts
    • Recent Records: Show latest entries
  4. Configure data source and filters
  5. Arrange widgets by dragging

Production Best Practices

To run Dashpress effectively in production on Klutch.sh, follow these recommendations:

Database Connection Security

Use SSL Connections Always enable SSL for database connections in production:

DATABASE_SSL=true

Connection Pooling Configure appropriate pool sizes based on expected load:

{
"pool": {
"min": 2,
"max": 10,
"acquireTimeoutMillis": 30000,
"idleTimeoutMillis": 30000
}
}

Read Replicas For high-traffic deployments, use read replicas:

DATABASE_READ_HOST=read-replica.example.com
DATABASE_READ_PORT=5432

Secret Management

Rotate Secrets Regularly Change authentication secrets periodically:

Terminal window
# Generate new secrets
NEW_SECRET=$(openssl rand -base64 32)
NEW_JWT=$(openssl rand -base64 32)
# Update environment variables in Klutch.sh dashboard

Use Strong Passwords Enforce password policies in configuration:

{
"passwordPolicy": {
"minLength": 12,
"requireUppercase": true,
"requireLowercase": true,
"requireNumbers": true,
"requireSpecialChars": true,
"preventReuse": 5
}
}

Secure Database Credentials

  • Never commit credentials to Git
  • Use environment variables exclusively
  • Restrict database user to necessary permissions
  • Use separate credentials for read-only users

Performance Optimization

Enable Caching Configure caching to reduce database queries:

{
"cache": {
"enabled": true,
"ttl": 300,
"maxSize": 100
}
}

Pagination Settings Adjust page sizes based on data complexity:

{
"ui": {
"itemsPerPage": 25,
"maxItemsPerPage": 100
}
}

Index Optimization Ensure your database has appropriate indexes:

-- Add indexes for frequently filtered columns
CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_orders_status ON orders(status);
CREATE INDEX idx_orders_created_at ON orders(created_at DESC);
-- Add indexes for foreign keys
CREATE INDEX idx_orders_user_id ON orders(user_id);
CREATE INDEX idx_order_items_order_id ON order_items(order_id);

Monitoring and Logging

Enable Audit Logging Track all data modifications:

{
"features": {
"enableAuditLog": true
},
"auditLog": {
"events": ["create", "update", "delete"],
"includeFieldChanges": true,
"retention": 90
}
}

Health Checks Monitor application health through the endpoint:

Terminal window
curl https://example-app.klutch.sh/api/health

Application Logs Configure logging levels:

LOG_LEVEL=info
LOG_FORMAT=json

Monitor logs through the Klutch.sh dashboard for:

  • Database connection errors
  • Authentication failures
  • Slow queries
  • Application errors

Backup Strategy

Configuration Backups Regularly backup your Dashpress configuration:

Terminal window
# Backup configuration files
tar -czf dashpress-config-$(date +%Y%m%d).tar.gz /app/.dashpress

Database Backups Implement database backup procedures:

#!/bin/bash
# PostgreSQL backup example
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_FILE="backup_${DATE}.sql"
pg_dump -h $DATABASE_HOST \
-U $DATABASE_USER \
-d $DATABASE_NAME \
-F c -b -v -f "/backups/${BACKUP_FILE}"
# Compress and upload to cloud storage
gzip "/backups/${BACKUP_FILE}"

Restore Procedures Test restoration regularly:

Terminal window
# Restore PostgreSQL backup
pg_restore -h $DATABASE_HOST \
-U $DATABASE_USER \
-d $DATABASE_NAME \
-v "/backups/backup_20250101.sql.gz"

Security Hardening

IP Whitelisting Restrict access to specific IP ranges:

{
"security": {
"enableIpWhitelist": true,
"ipWhitelist": [
"192.168.1.0/24",
"10.0.0.0/8"
]
}
}

Rate Limiting Prevent abuse with rate limiting:

{
"rateLimit": {
"enabled": true,
"maxRequests": 100,
"windowMs": 60000,
"blockDuration": 300000
}
}

Two-Factor Authentication Enable 2FA for additional security:

{
"security": {
"enableTwoFactor": true,
"requireTwoFactorForAdmin": true
}
}

Resource Management

Container Resources Monitor and adjust resource allocation:

  • Memory: 1GB minimum, 2GB recommended
  • CPU: 1 core minimum, 2 cores for better performance
  • Storage: Based on upload requirements

Query Timeouts Prevent long-running queries:

{
"database": {
"queryTimeout": 30000,
"maxExecutionTime": 60000
}
}

Troubleshooting

Here are solutions to common issues you might encounter with Dashpress:

Database Connection Issues

Problem: Cannot connect to database

Solutions:

  • Verify database credentials are correct
  • Check database host is accessible from Klutch.sh
  • Ensure database accepts connections from external IPs
  • Verify SSL settings match database requirements
  • Check firewall rules allow traffic on database port
  • Test connection using psql/mysql client

Problem: Connection timeouts

Solutions:

  • Increase connection timeout in configuration
  • Check database server load and performance
  • Verify network connectivity and latency
  • Adjust connection pool settings
  • Consider using connection proxy for stability

Problem: SSL certificate errors

Solutions:

  • Set DATABASE_SSL=true for SSL connections
  • Configure trustServerCertificate: false for secure validation
  • Provide custom CA certificate if using self-signed certs
  • Verify SSL is enabled on database server

Schema Introspection Problems

Problem: Tables not appearing in Dashpress

Solutions:

  • Verify database user has SELECT permissions on tables
  • Check schema/database name is correct
  • Ensure tables are in default schema (public for PostgreSQL)
  • Refresh schema from Settings → Database → Rescan
  • Review logs for introspection errors

Problem: Relationships not detected

Solutions:

  • Verify foreign key constraints exist in database
  • Check constraint names follow conventions
  • Manually define relationships in configuration
  • Ensure referential integrity is enforced
  • Recreate foreign keys if necessary

Authentication Issues

Problem: Cannot log in with admin account

Solutions:

  • Verify SECRET_KEY and JWT_SECRET are set
  • Check password meets policy requirements
  • Clear browser cookies and cache
  • Reset admin password using database
  • Review authentication logs for errors

Problem: Session expires too quickly

Solutions:

  • Increase session timeout in configuration
  • Check for clock skew between server and client
  • Verify JWT_SECRET hasn’t changed
  • Clear old sessions from storage

Performance Problems

Problem: Slow page loads

Solutions:

  • Enable caching in configuration
  • Add database indexes on filtered columns
  • Reduce items per page setting
  • Optimize complex queries
  • Check database query performance
  • Increase container resources

Problem: High memory usage

Solutions:

  • Reduce connection pool size
  • Lower cache size settings
  • Limit concurrent operations
  • Check for memory leaks in logs
  • Restart container to clear memory

File Upload Issues

Problem: File uploads failing

Solutions:

  • Verify MAX_FILE_SIZE setting
  • Check persistent volume has sufficient space
  • Ensure correct permissions on /app/data
  • Validate file type against ALLOWED_FILE_TYPES
  • Review upload logs for errors

Problem: Uploaded files not accessible

Solutions:

  • Verify volume mount is configured correctly
  • Check file permissions on uploaded files
  • Ensure static file serving is enabled
  • Review file path configuration

Data Import/Export Problems

Problem: Import fails with validation errors

Solutions:

  • Check CSV/Excel format matches expected structure
  • Verify column names match database fields
  • Validate data types are correct
  • Handle null values appropriately
  • Check for duplicate primary keys

Problem: Export incomplete or corrupted

Solutions:

  • Increase query timeout for large datasets
  • Export in smaller batches
  • Check for special characters in data
  • Verify encoding settings (UTF-8)
  • Use JSON format for complex data

Advanced Configuration

Take your Dashpress deployment further with these advanced customization options:

Custom Computed Fields

Add virtual fields that calculate values from existing data:

{
"tables": {
"users": {
"computedFields": {
"full_name": {
"type": "string",
"expression": "CONCAT(first_name, ' ', last_name)",
"label": "Full Name"
},
"order_count": {
"type": "number",
"expression": "SELECT COUNT(*) FROM orders WHERE user_id = users.id",
"label": "Total Orders"
}
}
}
}
}

Custom Validation Rules

Define validation beyond database constraints:

{
"tables": {
"products": {
"validations": {
"price": {
"min": 0.01,
"max": 999999.99,
"message": "Price must be between $0.01 and $999,999.99"
},
"stock_quantity": {
"min": 0,
"custom": "stock_quantity >= reorder_level || is_active = false",
"message": "Active products must have stock above reorder level"
}
}
}
}
}

Custom Actions and Workflows

Create complex workflows with custom actions:

{
"actions": {
"approve_order": {
"label": "Approve Order",
"table": "orders",
"type": "update",
"condition": "status = 'pending'",
"fields": {
"status": "approved",
"approved_at": "CURRENT_TIMESTAMP",
"approved_by": "${current_user_id}"
},
"notification": {
"type": "email",
"to": "${user.email}",
"subject": "Order Approved",
"template": "order_approved"
}
},
"bulk_discount": {
"label": "Apply Bulk Discount",
"table": "products",
"type": "update",
"confirmation": "Apply 10% discount to selected products?",
"fields": {
"price": "price * 0.9"
}
}
}
}

Webhook Integration

Send data to external services on events:

{
"webhooks": {
"order_created": {
"event": "after_create",
"table": "orders",
"url": "https://api.example.com/webhooks/order",
"method": "POST",
"headers": {
"Authorization": "Bearer ${WEBHOOK_TOKEN}",
"Content-Type": "application/json"
},
"payload": {
"order_id": "${id}",
"user_id": "${user_id}",
"total": "${total_amount}",
"timestamp": "${created_at}"
},
"retry": {
"enabled": true,
"maxAttempts": 3,
"backoff": "exponential"
}
}
}
}

Custom SQL Queries

Create custom views and reports:

{
"customQueries": {
"sales_summary": {
"label": "Sales Summary",
"query": "SELECT DATE_TRUNC('day', order_date) as date, COUNT(*) as orders, SUM(total_amount) as revenue FROM orders WHERE order_date >= CURRENT_DATE - INTERVAL '30 days' GROUP BY DATE_TRUNC('day', order_date) ORDER BY date DESC",
"parameters": [],
"cacheTtl": 300
},
"top_customers": {
"label": "Top Customers",
"query": "SELECT u.id, u.email, u.first_name, u.last_name, COUNT(o.id) as order_count, SUM(o.total_amount) as total_spent FROM users u JOIN orders o ON u.id = o.user_id WHERE o.order_date >= $1 GROUP BY u.id ORDER BY total_spent DESC LIMIT $2",
"parameters": [
{ "name": "start_date", "type": "date", "default": "CURRENT_DATE - INTERVAL '90 days'" },
{ "name": "limit", "type": "number", "default": 10 }
]
}
}
}

API Access Configuration

Enable programmatic access to Dashpress:

{
"api": {
"enabled": true,
"version": "v1",
"authentication": "bearer",
"rateLimit": {
"enabled": true,
"maxRequests": 1000,
"windowMs": 3600000
},
"endpoints": {
"users": {
"enabled": true,
"methods": ["GET", "POST", "PUT", "DELETE"],
"permissions": ["admin", "api_user"]
},
"products": {
"enabled": true,
"methods": ["GET"],
"permissions": ["*"]
}
},
"documentation": {
"enabled": true,
"path": "/api/docs"
}
}
}

Email Templates

Customize email notifications:

{
"emailTemplates": {
"order_approved": {
"subject": "Your Order #{{order_id}} Has Been Approved",
"body": "Hello {{user.first_name}},\n\nYour order #{{order_id}} for ${{total_amount}} has been approved and is being processed.\n\nThank you for your business!",
"html": true
},
"password_reset": {
"subject": "Password Reset Request",
"body": "Click the following link to reset your password: {{reset_link}}\n\nThis link expires in 1 hour."
}
}
}

Multi-Database Support

Connect to multiple databases:

{
"databases": {
"primary": {
"type": "postgres",
"host": "primary-db.example.com",
"database": "main_db",
"default": true
},
"analytics": {
"type": "postgres",
"host": "analytics-db.example.com",
"database": "analytics_db",
"readonly": true
},
"legacy": {
"type": "mysql",
"host": "legacy-db.example.com",
"database": "legacy_system"
}
}
}

Additional Resources

Enhance your Dashpress knowledge with these helpful resources:

Conclusion

Dashpress provides a powerful no-code solution for generating database admin panels that saves countless hours of development time. By automatically introspecting your database schema and creating a complete CRUD interface with relationships, authentication, and role-based access control, Dashpress eliminates the need to build custom admin tools from scratch.

Deploying on Klutch.sh gives you the benefits of containerized hosting with automatic HTTPS, persistent storage for configuration, and straightforward deployment workflows. The combination of Dashpress’s automatic interface generation and Klutch.sh’s deployment automation creates a seamless path from database to production-ready admin panel.

Whether you’re building internal tools for your team, creating customer support dashboards, managing e-commerce backends, or prototyping new applications, Dashpress on Klutch.sh offers a fast, maintainable solution that grows with your needs. Connect your database today and have a fully functional admin interface running in minutes.