This guide describes how to run the Supabase CLI for StudyU for development purposes. It assumes that you have already cloned the StudyU repository and are familiar with the process of how to run command line instructions.
It is strongly advised that the following instructions should only be followed for developing and testing the StudyU platform and not for running live studies with actual participants. The setup should only be run on a local machine and the containers from the Supabase CLI is not meant to be exposed to a network or the Internet, as no means of security measurements are implemented.
Interested in running a study in a live and secure setting with StudyU? Head to the Contact page of our website and send us a message. We are looking forward to support your research.
- Install Docker.
- Follow the Supabase CLI Getting Started installation instructions.
- Open a command line and
cd
to the root directory of the studyu repository. - Prepare the local environment by executing
cp flutter_common/lib/envs/.env.local.example flutter_common/lib/envs/.env.local
- Run
supabase start
.
This will spin up a local environment of Supabase for development. Run supabase stop
to stop the
Supabase stack.
Run melos run local:designer_v2
or melos run local:app
to launch the respective StudyU
component with the self-hosted environment of the Supabase CLI. The database will come seeded
with testing data. You can log into the StudyU Designer by using the credentials
[email protected]
and user1pass
.
Open Supabase Studio to access the graphical interface of Supabase to manage the local instance.
Run supabase db reset
to revert to the default database state. Find out more commands and
features of the Supabase CLI on the CLI reference
pages.