This repository is the AfriBit mobile application. The goal is to make a mobile application compatible with Galoy's backend that is tailored to the specific region of Kibera, Kenya. It is built with React Native, and runs on both iOS and Android.
Prerequisite -- Set up React Native by following the instructions in the React Native CLI Quickstart tab
Clone into the project
cd into the directory
type yarn install
type yarn start
In another window
type yarn ios
or yarn android
to run locally.
This guide serves as an overview of the steps needed to get set up with the repository on Windows. Run the following commands in powershell with admin privileges in the given order to install WSL2 for your Windows installation:
wsl --install
wsl --set-default-version 2
wsl --list --online
The above command gives you a list of available distros. We strongly recommend to install ubuntu because its the simplest:
wsl --install -d Ubuntu
If you would like to install a different distro, use the following command:
wsl --install -d <DistroName>
Once your distribution is installed open a new terminal of the installed distribution (in example open an Ubuntu terminal). Then update your distro:
sudo apt update && sudo apt upgrade -y && sudo apt autoremove && sudo apt autoclean
Before installing the dependencies for the AfriBit wallet, we must ensure that your WSL installation has the necessary configuration.
Therefore run the three commands below to
-
allow virtualization
-
increase the filewatcher limits
-
prepare .bashrc for directory environment
sudo gpasswd -a $USER kvm
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
!
!
Last two steps to run in WSL2, ubuntu terminal, are to install both the nix package manager and the directory environment package we have added to .bashrc before.
The first command will prompt you to install, just accept everything with typing Yes and then pressing enter.
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install --determinate
nix profile install nixpkgs#direnv
you can then clone the repository with
git clone git@github.com:AfriBit-wallet/AfriBit-wallet.git
and cd into the folder (again with distro terminal).
It could be that direnv prompts you permission to read folder contents, simply run
direnv allow
if this is the case. Nix will then setup everything automatically for you :)=
If you experience an issue about syntax of the .envrc file, delete the .envrc file with
rm .envrc
create a new .envrc with
nano .envrc
and paste
if [ -f ".env.local" ]; then
dotenv .env.local
fi
use flake .
in the file. Close and save the file, leave the folder with cd .. and then cd back into the folder and then wait a few minutes while everything is being installed