Client side set up is straight forward and standard, i.e clone the repo Resonte Client Side Repo, do flutter pub get
in the root of the project etc so this guide would focus on the backend env set up.
Please strictly stick to the guide do not go off installing stuff on your own
- Docker
Clone the Resonate Backend Repo
The backend initialisation script installs Appwrite locally with additional custom flags to the install command available in the appwrite documentation so if you already have Installed Appwrite locally please delete the image and the container and start fresh
Navigate to the root directory of the project in your terminal (for windows power shell), and run the command
sudo ./init.sh
./init.ps1
The script will identify your Operating System, will start installing the appwrite-cli (will even install brew if not there for macOS)
After installing the appwrite-cli it will start pulling Appwrite's docker image, this may take some time
After a few minutes it will ask you for some inputs let everything be the default and just press enter for it to take the default value, once all inputs are taken it will compose the image into a container this might take a few minutes as well
Now appwrite will be successfully installed locally as a container and will be up for action.
Next you will be asked for login credentials. Go to appwrite localhost, create your account, you will be asked to create a team please do so. Once done fill in the created account creds to the script
After logging in you will be asked for a team ID
For the team Id, while the creation of an appwrite account you must be asked of a team name for your default team. Head over to your appwrite console i.e. Localhost Port 80, and observe the URl in the end of the url, you will see your teamId
Thus my Team Id is 666ce18b003caf6274b6
, enter your team id in the terminal, once this is done the script will create a new project named Resonate in your instace with its id being 'resonate'.
The auth set up is intentially skipped as google Oauth did not allow private IP as allowed redirect URl's so we had to make the script open tunnels and once tunneling was introduced. It brought more complexities and conditions of working which degraded the scripts robustness
So we have decided to create a dedicated script for the rare case of testing the Oauth login buttons ('google', 'github') this script is work in progress and will be out soon. But for now email password signIn should work perfectly fine enabling you to explore full capabilities of the project with a robust script
Now you will be prompted for Collection
Set Up
Press "a" to select all and press enter, same goes for Buckets
set up comming after this. The Functions
will be pushed at then end of the script after the Livekit env vars are pushed as the Function need redeployment after a new env var is pushed in order to read the var.
This completes the Resonate project Set Up (functions will be pushed in the end) in your local Appwrite Instance 🚀🍀
now you will be asked to choose between Livekit Cloud or Livekit Self hosted if you have a have an old laptop that is most likely not able to take up much processing load then opt for cloud else having it locally i.e self hosted is recommended
This would run Livekit locally for you as a container (if you went with self hosted) Now appwrite function pushing will start and just press 'a' char on keyboard to select all and push all functions
You just need to update the baseDomain variable value in the constants.dart on client side based on how you are running the client side app
Platform | Base Domain |
---|---|
Android Simulator | 10.0.2.2 |
iOS Simulator | 127.0.0.1 |
Physical Device | Ensure laptop and phone are on the same Wi-Fi, then use the phone's IP address provided by the Wi-Fi |