Expo + Turborepo + tRPC go brrrrrrr 🚀🔥
-
1.1 Development
1.2 Production
1.3 Test
Setup development environment With Turbo repo.
- 🏗 Setup
.env
files:
cp .env.example .env
- 📦 Install dependencies, inside the root folder run:
pnpm install
- 🚀 Run in development mode, inside the root folder run:
pnpm run dev
For every app, but mobile the process is really straightforward:
- 🏗 Setup
.env
files:
cp .env.example .env
- 📦 Install dependencies, inside the root folder run:
pnpm install
- 📦 Build all apps packages, inside the root folder run:
pnpm run build
- 🚀 Run the production builds, inside the root folder run:
pnpm run start
If you want a preview of the mobile app, in a apk or ipa, you will have to:
cd apps/mobile
eas build -p android --profile development
pnpm run lint
This lints stuff...
If you want to test specifics run inside each app folder.
To run unit and integration tests just run this shit locally:
pnpm run test
It will test every repo, if you want to test specifics run inside each app folder.
End to end test is handled by detox, to run the test first we need to build an release app.
Inside apps/mobile
folder run:
# ios
pnpm run e2e:ios:build
# or
# android
pnpm run e2e:android:build
Next, run the detox test script:
# ios
pnpm run e2e:ios:test
# or
# android
pnpm run e2e:android:test
Both tests will be run in headless
mode, so don't expect the emulator to pop-up.
We are using railway.app to deploy the backend app, and EAS to build, update, and release the mobile app.
animations-record.mp4
This study objective is not to create an application restricted in a stack. But to elaborate and test SOTA tools that enable a stable and productive stack. Or goals with the final product is to find a stack that:
- Improves developer experience;
- Allows fast deploy and development;
- Constructs an app with great performance;
- Defines an architecture to easily componentize and reuse animations;
- Implements code quality tools (e.g. test, static analysis, linting, etc.);
- Target the largest number of devices (e.g. ios, android, and web).
Current stack been used in the challenge:
Workspace
- pnpm
- turborepo
Framework
- react native
- expo
Test & Debug
- flipper
- detox
- jest
Components, Animation & Styling
- nativewind (Tailwind)
- reanimated
- flash list - docs
State Management & Storage
Network & API
Deploy
- github actions
- railway.app
- eas