Skip to main content

Local Development

compatibility

These steps are optimized for Mac OS and Unix/Linux based systems.

0. Pre-requisites

  • Sign up for Dropbase account following steps in the previous documentation page.
  • Install Docker. We strongly recommend using Docker Desktop, especially if you're on Apple M chips. Alternatively, you can install docker and docker-compose.
  • Have internet access.

1. Clone the dropbase repo


git clone https://github.com/DropbaseHQ/dropbase.git

The dropbase directory (root) will contain the following important subdirectories:

  • demo: Contains docker files to spin up a sample Postgres database with seed data
  • workspace: Your apps code and files

Github repo at Dropbase Worker.

2. Create a .env file

In the root directory (dropbase), create a .env file, paste the following context, then save it:


DROPBASE_TOKEN='YOUR_WORKSPACE_TOKEN'
DROPBASE_API_URL="https://api.dropbase.io"

# DATABASE CREDS OPTIONALLY GO HERE
# More at https://docs.dropbase.io/concepts/data-sources

Where do I get my Dropbase workspace token?

A Dropbase workspace and corresponding token is automatically created when you sign up for a Dropbase account. Log in to Dropbase to get your token. By default, you will be directed to the Welcome to Dropbase page after creating an account. Alternatively, go to Developer Settings (Settings > Developer Settings) and generate a new workspace token. Copy it and activate this token by selecting it.

This is the workspace token value you'll be entering for the DROPBASE_TOKEN variable, replacing the YOUR_WORKSPACE_TOKEN placeholder in the .env file you just created.

note

You can also add database sources via this .env file. To learn more, check out Data Sources and Environment Variables.

3. Install requirements and start servers

In your terminal, run the following commands from the root directory (dropbase)


chmod +x start.sh
./start.sh

4. Create your first Dropbase app

Go to the Dropbase App Dashboard http://localhost:3030/apps from your browser and click on the Create app button to create your first Dropbase app. If you can't you might not have setup the Dropbase Worker correctly. See Troubleshooting Worker Connection for more details.