$ show byCedric/expo-monorepo-example
A well-structured monorepo for building cross-platform Expo (React Native) applications using pnpm and Turborepo. The repository demonstrates a scalable architecture with three shared packages (eslint configuration, reusable UI components, and a home feature) and a single example Expo app that leverages Expo Router for navigation, react-native-reanimated for animations (parallax scroll, wave animation), expo-haptics for haptic feedback, and expo-symbols/expo-image for platform-adaptive icons and images. The code is organized following modern React Native best practices: typed routes, strict TypeScript, automatic dark/light mode, absolute imports, and Jest + testing-library/react-native tests for components. CI/CD is fully implemented via GitHub Actions with workflows for linting, building, testing, EAS deployments, and preview builds. While the application itself is a simple template (home screen with steps, an explore screen with informational collapsibles, and a modal), the architecture showcases a effective monorepo workflow with Turborepo caching and pnpm workspace protocols. The most notable technical components are a cross-platform icon abstraction (SF Symbols to Material Icons), a standalone parallax scroll view with Reanimated, and an in-app browser link adapterβall of which are modular and easily extracted for other projects.
The LLM identified 3 files worth highlighting for reuse:
A fully contained parallax scrolling view built with react-native-reanimated and useAnimatedScroll. It adjusts the header image's scale and vertical offset based on scroll position, creating classic parallax effect. Accepts custom header image and background color per platform. The implementation demonstrates clean performance idioms, can be extracted as-is into any React Native project with minimal adaptations.
Provides application-level abstraction for cross-platform icons: uses native SF Symbols on iOS via expo-symbols and falls back to MaterialIcons from @expo/vector-icons on Android and web. The component accepts SF Symbol names and maps them to corresponding Material Icons via a static MAPPING object. This decouples platform-specific icon rendering from business logic and is ready to extend with new icon mappings.
A wrapper around expo-router's Link that automatically opens URLs in the expo-web-browser in-app browser on native platforms, while retaining normal web linking on web. It uses openBrowserAsync with AUTOMATIC in modal style and passes the link target along. This component is a common pattern in React Native projects and is extracted as a reusable piece that can be dropped into any application.