Wikipedia KaiOS
The official Wikipedia KaiOS app. KaiOS is a web-based mobile operating system that enables a new category of smart feature phones, a successor of the discontinued Firefox OS.
The Wikipedia KaiOS app is built with Preact, we use Cypress for testing, and Translatewiki for translations. Tasks and issues are tracked on Phabricator.
Installation requirements (for macOS)
- Make sure git is installed:
brew install git
- Make sure node is installed:
node -v
orbrew install node
- Make sure npm is installed:
npm -v
orbrew install npm
- Make sure the Firefox browser is installed
To run this app in Firefox
Clone the repository (only the first time)
- Create a directory for code:
mkdir ~/code && cd ~/code
- Download the app source repository:
git clone https://github.com/wikimedia/wikipedia-kaios.git
Open the app on your computer
- Make sure you are in the source directory:
cd wikipedia-kaios
- Downloading the latest code:
git pull
- Install app dependencies:
npm install
- Build the app:
npm run dev
Now the app is running on your computer at http://127.0.0.1:8080 in Firefox. You can open the Firefox Developer Tools and use the Responsive Design Mode to interact with the app in a more appropiate setting.
To run this app on a device
Clone the repository (if you haven't done this alredy)
- Create a directory for code:
mkdir ~/code && cd ~/code
- Download the app source repository:
git clone https://github.com/wikimedia/wikipedia-kaios.git
- Go to the app source:
cd wikipedia-kaios
Build the app
- Install app dependencies:
npm install
Connect your device
- Connect your device to your computer using a USB cable
- Enable debug mode on the device by typing:
*#*#33284#*#*
- Check that adb is running and sees your device:
adb devices
Deploy the app to the device
- Deploy to device, this will take a few minutes:
npm run deploy
The Wikipedia app should be running on your device now.
To run the Cypress tests
Run a test server in one terminal window or tab
npm install && npm run build && npm run dev
On a different tab: to run headlessly
npm test
On a different tab: to open cypress and run inside cypress
npm run cypress:open
To keep app updated with latest version
- Make sure you are in the source directory:
cd ~/code/wikipedia-kaios
- Pull the latest changes:
git pull
- Install latest dependencies:
npm install
- Rebuild the app:
npm run build
- Redeploy the app:
npm run deploy