- Purpose
- Tech Stack
- Prerequisites
- Project Structure
- Scripts
- Linting & Formatting
- Testing
- Environment Variables
- Author
This repository is a bare workflow template for building React Native apps with Expo and TypeScript. It provides a well-structured foundation with:
- Type safety (TypeScript)
- Linting & formatting (ESLint + Prettier)
- Testing (Jest + React Native Testing Library)
- Simple project structure for scalability
- Support for Bun as a fast package manager
It’s designed to help you quickly bootstrap production-ready apps without repeating setup steps.
- React Native (Bare Workflow)
- Expo SDK
- TypeScript
- Bun
- ESLint & Prettier
- Jest & @testing-library/react-native
- (Optional) Redux Toolkit & React Navigation
- Node.js (only for installing Expo CLI globally)
- Bun (v1.0+)
- Expo CLI (for initializing and running projects)
- Xcode / Android Studio for iOS & Android builds
npm install -g expo-cligit clone https://github.com/dainyjose/rn-expo-typescript-bare-template.git
cd rn-expo-typescript-bare-templateRenaming a project during cloning
git clone https://github.com/dainyjose/rn-expo-typescript-bare-template.git new-repo-name
cd new-repo-namebun installbun expo run:android # For Android
bun expo run:ios # For iOS
bun expo start # Metro bundlerIf you see this error when building the Android app: SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file.
follow these steps:
-
Open Android Folder in Android Studio
- Open Android Studio
- Go to File > Open
- Select the
android/folder inside the project root
-
Configure SDK Location
- Go to Android Studio > Preferences > Appearance & Behavior > System Settings > Android SDK
- Copy the SDK path (e.g.
/Users/<your-username>/Library/Android/sdk)
-
Update
local.propertiesInside theandroid/folder, create or update thelocal.propertiesfile:sdk.dir=/Users/<your-username>/Library/Android/sdk
src/
├── __tests__/ # Test component
├── api/ # API calls
├── components/ # Reusable components
├── constants/ # App-wide constants
├── context/ # Global contexts
├── enums/ # TypeScript enums
├── hooks/ # Custom hooks
├── navigation/ # Navigation config
├── redux/ # Redux store and slices
├── screens/ # Screen components
├── theme/ # Theming and styles
├── types/ # Global types
├── utils/ # Utility functions
App.tsx # Entry point
bun run dev # Start Metro bundler
bun run android # Run on Android
bun run ios # Run on iOS
bun run lint # Run ESLint on src/
bun run format # Format code with Prettier
bun run test # Run unit testsRun ESLint:
bun run lintRun Prettier:
bun run formatConfigured to ignore node_modules, android/, ios/, build/, etc.
Unit Testing Setup:
- Framework:
jest - Render tests:
@testing-library/react-native
bun run testCreate a .env file at the root:
API_URL=https://your-api.com
APP_ENV=developmentIn env.d.ts:
declare module '@env' {
export const API_URL: string;
export const APP_ENV: string;
}For full setup instructions and details, check out the Getting Started Guide.