The following steps assume you're using a terminal.
If you want to build Clerotri for web, you'll need:
- Node (22+) and
- Yarn Berry.
If you want to build Clerotri for Android, you'll also need:
- JDK 17 (Microsoft's build works well) and
- the latest Android SDK (preferably via Android Studio's SDK Manager).
If you want to run/work on the analytics server, you'll need:
- the latest version of Deno, and
- PostgreSQL.
Clone the repository, then open the project folder:
git clone https://github.com/upryzing/clerotri
cd clerotriOnce you've opened the folder, run the following:
# install the dependencies...
yarn install
# ...then copy the font files into the native folder:
npx react-native-assetTo run the development version of Clerotri for web, run:
yarn webTo build an optimised release version, run:
yarn web-releaseTo run the development version of Clerotri for Android, run:
# build and install the native app...
yarn android
# ...then run Metro (the JS dev server):
yarn startTo build an optimised release version, run:
yarn android-releaseTip
You can run the JS bundling step separately from the actual app compilation/bundling step - for example, if you only need to rebuild the native code - by running yarn android-release:bundle and yarn android-release:apk respectively. Make sure you've built the JS bundle first, or the app won't run!
| Command | Description |
|---|---|
yarn start |
Starts Metro (the JS dev server). |
yarn web |
Runs the web app. |
yarn android |
Runs the Android app. |
yarn ios |
Runs the iOS app (broken, requires a Mac). |
yarn format |
Formats the code using Prettier. |
yarn lint |
Checks the code syntax using ESLint. |
yarn test |
Runs the tests in the __tests__ folder with Vitest. |
For more information, see a list of react-native's commands here. You can access them by running yarn react-native.
Note that the app uses rnx-bundle, which has extra features (and will produce a smaller bundle) compared to the default bundle command.
Before running the server, you'll need to set up the database.
Connect to Postgres:
sudo -u postgres psqlOnce you've connected to Postgres, create a user and a database for the analytics server:
-- RUN THESE INDIVIDUALLY!
-- create the user:
CREATE USER clerotri WITH PASSWORD 'flower31!';
-- create the database:
CREATE DATABASE clerotri_analytics;
-- grrant all privileges on the database to the user:
GRANT ALL PRIVILEGES ON DATABASE clerotri_analytics TO clerotri;
-- switch to the database:
\c clerotri_analytics
-- grant all privileges on the public schema too:
GRANT all ON SCHEMA public TO clerotri;
-- once you're done, exit Postgres:
\qEnter the analytics server's folder:
cd external/analytics-serverCopy the .env.example file and fill it out as needed:
# copy the file...
cp .env.example .env
# ...then edit it (feel free to use any text editor here):
nano .envOnce you've filled out the .env file, install the dependencies:
deno installIf you're working on the server, run the following:
deno task devIf you're not working on the server, run the following:
deno run --allow-env --allow-net --allow-read main.ts