Internxt
- React Native 0.81.5 · Expo 54 · React 19 · TypeScript 5.9
- State management: Redux Toolkit
- Navigation: React Navigation 6
- Styling: tailwind-rn
- Node version: ≥ 20
- JDK version: 17+
- SDK version: 34+
In case that you open the project in Android Studio:
- NDK version: 23.1.7779620
- CMake version: 3.22.1
Follow these steps before running the project.
- Create a
.npmrcfile from the.npmrc.templateexample provided in the repo. - Replace
TOKENwith your own Github Personal Access Token withread:packagespermission ONLY - Use
yarnto install project dependencies.
In order to configure the environment, you have to create /env/.env.development.json and /env/.env.production.json files.
Take a look to /env/.env.example.json file to know the required environment variables.
Remember to run the tailwind command during development to dynamically add and remove styles from src/styles/tailwind.json depending on the used classes:
yarn tailwind:devOther useful commands:
yarn check-ts # TypeScript type check (run before committing)
yarn lint # type check + ESLint
yarn lint:fix # lint with auto-fix
yarn test:unit # run Jest unit tests
yarn test:unit:watch # run Jest in watch modeWe can run the android application in any operating system, although for each one we will have to follow some different steps
In order to connect a real device or an emulator to localhost interface, we have to map used ports in our computer with the device ports.
First list the connected devices:
adb devicesThen use the following command to map DEVICE_ID device PORT to your localhost PORT:
adb -s DEVICE_ID reverse tcp:PORT tcp:PORTTo install the ADB in Mac OS or Linux, execute the following command:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)Opening the project with Android Studio will install the necessary dependencies to start the application.
Configure a virtual device in Android Studio or connect by USB a real device with ADB to run the Android application with the following command using the Expo CLI:
yarn androidYou can only run the iOS application on a Mac OS computer.
yarn iosThis is what you should know about project testing.
Take a look to this official article about testing in React Native.
yarn test:unit
# or a single file:
jest path/to/file.spec.tsyarn test:e2e:build:ios.debug
yarn test:e2e:test:ios.debug
yarn test:e2e:build:android.debug
yarn test:e2e:test:android.debug