Cross-platform monorepo for EasyBoard, based on Solito, Expo and Next.js
├── apps/
│ ├── web/ # Next.js web application
│ ├── native/ # Expo/React Native app
│ └── functions/ # Firebase Cloud Functions
├── packages/
│ ├── common/ # Core business logic, shared UI, and services
│ │ ├── src/
│ │ │ ├── components/ # Core UI components (NativeWind)
│ │ │ ├── contexts/ # React Contexts for global state
│ │ │ ├── helpers/ # Utility functions
│ │ │ ├── hooks/ # Shared React Hooks
│ │ │ ├── pages/ # Shared pages (platform agnostic)
│ │ │ ├── provider/ # App level providers (Theme, Auth, etc.)
│ │ │ ├── services/ # Firebase and Google API abstractions
│ │ │ ├── stores/ # State management stores
│ │ │ └── types/ # Shared TypeScript interfaces
│ ├── eslint-config/ # Shared ESLint configuration
│ └── typescript-config/ # Shared TypeScript configuration
└── package.json # Root package.json with workspaces
- Node.js >= 20
- Yarn 4.11.0
# this should be sufficient to enable yarn in most Node.js installations
corepack enableClone the repository and install dependencies:
bash yarn install
Refer to the .env.example files and create corresponding .env files with the required values.
If you are developing for Android or iOS locally, ensure you have the following prerequisites installed (refer to the most updated instructions here):
Install Watchman and JDK
brew install watchman
brew install openjdk@17For openjdk@17, you may need to add it to your PATH and JAVA_HOME. Add the following to your shell config file (e.g., ~/.zshrc or ~/.bash_profile):
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
export JAVA_HOME="/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home"Install Xcode Command Line Tools
xcode-select --installIf you are on Windows, follow these steps to set up the Android development environment:
- Install OpenJDK 17: You can use Chocolatey:
choco install openjdk17. - Install Android Studio: Download and install from official site.
- Configure SDK: Ensure "Android SDK Platform" and "Android Virtual Device" are installed.
- Environment Variables: Set
JAVA_HOMEto your JDK path andANDROID_HOMEto your Android SDK location. Add theplatform-toolsandemulatordirectories to yourPATH.
Run the following to create a development build. Typically you would only need to run these commands once unless you are making changes to the native configs (note that MacOS is required for iOS build/development):
# in the monorepo root
yarn native:prebuild
yarn native:android # For Android
# and/or
yarn native:ios # For iOS (macOS only)If you are running the above commands for the first time, the dev server will automatically start after the build is completed. For subsequent runs, you can simply run yarn dev
For more detailed instructions (Android Studio, iOS Simulator, etc.), refer to the official Expo Environment Setup Guide.
To run all services (Functions, Native dev server, and Web dev server):
yarn dev- Web only:
yarn web:dev - Native iOS:
yarn native:ios - Native Android:
yarn native:android - Native Dev Server:
yarn native:dev
- Build all:
yarn build - Build specific:
yarn turbo build --filter=<app-name>
- Lint:
yarn lint - Format:
yarn format
Many errors (especially Typescript/import errors) an be resolved by deleting node_modules and running yarn install. There is a convenience script to delete the various node_modules folder:
yarn cleanFor React Native/Expo specific errors, it might be worth doing the above and then generating a new build
yarn native:prebuild
yarn native:android # For Android
# and/or
yarn native:ios # For iOS (macOS only)- Gneneral workflow:
- Create primitive UI in
packages/common/src/components. - Compose pages in
packages/common/src/pages. - Register routes in
apps/native/appandapps/web/app(Next.js App Router).
- Create primitive UI in
- Business logic should reside in
packages/common/src/services. - Use NativeWind for styling across both platforms.
- Shared UI/UX: Over 90% code sharing between Web and Native using Solito.
- NativeWind: Tailwind CSS for universal styling.
- Firebase Integration: Unified services for Auth, Database, and Functions.
- Type Safety: Full-stack TypeScript support.