SurfDB Docs

Quick Start

Get started with the surfDB
Caution: We are still in very early stage so things can break and change. The docs will be updated frequently.

Install the binary

We need to first install the surf server binary, currently only supported on linux and macos
# download binary and add it to path
curl -L -o surf
chmod +x surf
sudo cp ./surf /usr/local/bin
curl -L -o surf
The binary has not been tested on macOS.

Nextjs & Rainbow-kit starter app

You can scaffold a new next.js + Rainbow Kit + wagmi + surfDB using just a single command
Then cd into the app folder and get the mongo and redis database up
docker-compose up -d
Run the binary
# you can provide the following env variables to change the default values
# MONGO_URL="mongodb://root:[email protected]:27017/"
# REDIS_HOST="localhost"
# SURF_PORT="4200"
You should see the following output
Now we can run the app
yarn dev

Next Steps

Authenticate yourself with the surf client by clicking on connect wallet.
Then open console and click on create data to create an entry in the database and check the result, then click on get data and see the data you created. You can even check the ceramic streamId given in the result on
Check the api folder to see the api's we have created for data and auth.
Head over to Surf Client page now to check what you can do with the surf client.