Connections

Connections

Connections

Connections are either SQL databases or APIs that are used to create pages
image

You can connect an SQL database to Basedash as well as define what APIs will be used for actions.

SQL databases

Currently, Basedash supports the following SQL databases:

  • PostgreSQL
  • MySQL
  • MariaDB
  • SQL Server
  • Redshift

Database connection guides

We’ve created guides for various hosting providers on how to find the necessary information about your database so that you can connect it to Basedash.

DigitalOcean
DigitalOcean
AWS
AWS
GCP
GCP
Heroku
Heroku
Azure
Azure
Supabase
Supabase
PlanetScale
PlanetScale
Fly.io
Fly.io
Render
Render
Railway
Railway

Note that you will likely have to configure your database server to allow connections from our app’s IP address: 138.197.164.114.

Editing your data

In order to view and edit your data, you must create a view or query page.

Configuration

image

Display name

You can set a display name for your database, tables, and attributes which will be used when displaying the names in the user interface. Useful in the event you want to make names more human-friendly.

There are three levels of configuration within a database connection: connection, table, and attribute level configurations.

Connected

You are able to disconnect databases, tables, and attributes if you don’t want to be able to use them in Basedash. You might want to disconnect a connection if you aren’t using it, but want to keep the credentials saved in Basedash.

Editable

Determines if data can be changed. Can be set at the connection, table, and attribute level. If an entire connection is marked as non-editable, then all the tables and attributes will also be non-editable. Same idea when you mark a table as non-editable: all corresponding attributes will be made non-editable.

Primary attribute (table configuration only)

Allows you to specify which column should act as the primary attribute. By default, the primary key column is used as the primary attribute.

Description (attribute configuration only)

Used to provide better context about the purpose for an attribute. Attribute descriptions are viewable when hovering over the attribute name in a table header.

image

Obscured (attribute configuration only)

Obscured attributes will not show their true value in the user interface. Our own “Basehash” font will be used to display the values in the user interface. The values are hashed on the server so you can rest assured you cannot access the original values from the browser.

image

Allowed values (attribute configuration only) Allows you to specify a list of available options that can be used when setting a value for the attribute. When editing the attribute value, a dropdown will appear with the available options. Only available for text column types.

image
image

Connecting via SSH

It’s possible to connect a database that requires SSH access. SSH authentication can be done with a password or via an SSH key. If using an SSH key, you must save your SSH public key on your database server and then upload your SSH private key to Basedash. Don’t worry, Basedash saves your SSH private key as an encrypted value in our database.

image
Troubleshooting

Could not connect to the SSH server. Check your credentials and ensure your firewall is set to allow Basedash.

If you get this message, it could be that you need to tweak your server’s SSH configuration to allow Basedash to properly connect. If your database server is on a linux OS, add the following line to your /etc/ssh/sshd_config file:

PubkeyAcceptedKeyTypes=+ssh-rsa

Local databases

Users may want to be able to use Basedash with their local database since Basedash is a pleasant way to manage and view data. This is currently not something that is natively supported by Basedash. However, it is possible to use a third party service like ngrok or localhost.run to expose your local database to the internet and use it within Basedash.

You should be aware that there are several drawbacks to using local databases with Basedash:

  • Must have an always-on process running on the computer that has the running database
  • Unless the third party service provides you with a reserved domain (which is a paid ngrok feature), then you will need to update your database credentials in Basedash anytime the third party process restarts on the local computer

Given the above limitations of using Basedash with local databases, we recommend using a different app to manage you local database that doesn’t have the limitations that Basedash does. Two of our favorites are TablePlus and Postico.

Synchronizing database columns and tables

Basedash synchronizes your database columns and tables with Basedash every 24 hours. If you’ve modified your database schema and want to force a synchronization with Basedash right away, it’s possible to do so from the connection details page.

image

Timezone used for dates and times

By default, we will display dates in the user’s local timezone for database columns that are timezone aware. If you would like your dates and times to be represented the same way for all your users, you can toggle the workspace-level setting for displaying dates in the user’s local timezone and then dates and times will show up as UTC time for everyone.

Here is a list of timezone aware database columns:

  • timestamp with time zone (Postgres)
  • timestamp (MySQL)
  • datetimeoffset (SQL Server)

For all other date/time related database columns, we don’t do any sort of automatic conversion to local time.

image

Third party data with Sequin

Basedash supports connecting the following third party data via Sequin. Here’s a list of some of the third parties supported by Sequin:

  • Stripe
  • Airtable
  • GitHub
  • Hubspot
  • Salesforce
ℹ️
Sequin is a paid third party service.

Sequin works by synchronizing data from third party APIs such, as Airtable, into a Postgres database. This is what allows Sequin connections to be connected to Basedash. Connections connected with Sequin are still able to have read AND write operations since Sequin has a syncing mechanism that reads data from APIs and will also see what data needs to be updated and make the corresponding API calls to update this data.

Sequin has a guide on how to set things up with Basedash here.

APIs

APIs are used for Basedash actions, which is Basedash’s main mechanism for writing data to external APIs. See our action docs for more details on creating an API connection that can be used for actions.

File storage

You are able to add an S3-compatible connection to your workspace which will allow you to setup attributes used in your views to be hooked up to an S3 bucket. Linking an attribute to S3 will allow you to upload files to an S3 storage bucket and display a link (or image) to the file in Basedash.

image

Setup a file storage connection

image

Connection name: Determines the display name used for your file storage connection in Basedash.

Bucket name: The name of you S3 bucket

Access control list (ACL): The ACL that should be assigned to your upload files that will determine the permission level for the file. This must be set to public-read if you want to allow you images to be viewable within Basedash.

S3 compatible endpoint: If using a storage provider that is S3 compatible, such as DigitalOcean, you can provide the endpoint to that provider here. For example, DigitalOcean’s endpoint is https://nyc3.digitaloceanspaces.com.

Access key ID & Secret key ID: Credentials provided by your S3 compatible provider to allow uploading of your files. Once these values are set, they are encrypted in our database and cannot be seen again via the Basedash user interface.

AWS S3 configuration

In order for all the file upload/storage functionality to work in Basedash, you will need to setup the following permissions in your AWS S3 bucket.

Public access

The following public access settings must be applied.

image

CORS

Your S3 bucket should have the following CORS policy.

[
    {
        "AllowedHeaders": [
            "Content-Type"
        ],
        "AllowedMethods": [
            "PUT"
        ],
        "AllowedOrigins": [
            "https://app.basedash.com"
        ],
        "ExposeHeaders": []
    }
]

IAM user policy

The IAM user that has access to your bucket (via the access key and secret you’ve used for the file storage connection in Basedash), should have the following policy that gives them access to use your S3 bucket.

{
			"Effect": "Allow",
			"Action": [
				"s3:PutObject",
				"s3:PutObjectAcl",
				"s3:GetBucketAcl"
			],
			"Resource": [
				"arn:aws:s3:::bucket-name",
				"arn:aws:s3:::bucket-name/*"
			]
		}

Replace bucket-name with the name of your bucket.

View attribute configuration

Once you’ve setup an S3 connection, you will have a new “Display as” option called “S3 File” show up when configuring an attribute on a view. Here, you can select the file storage connection you want to associate with your attribute and other configuration parameters.

⚠️
Make sure to set the “Display as” option on a Record attribute so that you will be able to see the file upload form in the record sidebar.
image

Display as image: used if you want you S3 file to display as an image in Basedash.

Path prefix: used to determine where in S3 your file should be saved.

Database format: this is the value that will be saved in your database. Perhaps your database only saves the file name of the S3 file instead of the URL to the file. In either case, this allows you to configure that.

Display value: determines what value appears in Basedash. Useful if your database only saves the file name and you want to display the value of the URL pointing to your S3 file so that it can be displayed as an image in Basedash.

File upload

Once you’ve setup your view attribute to be linked to you file upload connection, you will see a button that lets you upload a file and you will be able to do so within a modal.

image

DigitalOcean

For DigitalOcean, here is the CORS config you will need to enable:

image

Frequently Asked Questions (FAQ)

What about deleting files in my bucket? Can I do that through Basedash.

Currently, we do not have any functionality for deleting files in your bucket from Basedash, but let us know if that is something that would interest you.

💠
https://www.basedash.com

© BaseDash Inc.