Prerequisites
Before you begin, ensure you have the following installed:Node.js
Install Node.js (LTS version recommended). You can download it from nodejs.org or use a version manager like nvm.
Git
Install Git for version control. Download from git-scm.com.
Platform-specific tools
Depending on your target platform:For iOS development:
- macOS is required
- Xcode 14 or later
- CocoaPods (
sudo gem install cocoapods) - iOS Simulator (included with Xcode)
- Android Studio
- Android SDK (API 34 or later)
- Java Development Kit (JDK 11 or later)
- Android Emulator or physical device
Clone the Repository
First, fork and clone the Papillon repository:Replace
YOUR_USERNAME with your GitHub username if you’ve forked the repository.Install Dependencies
Install all project dependencies using npm:package.json, including:
- Expo SDK (~54.0.32) - React Native framework
- React Native (0.81.5) - Mobile app framework
- WatermelonDB - Local database
- Zustand - State management
- Service integration libraries (pawnote, skolengojs, etc.)
The
postinstall script will automatically run patch-package to apply any necessary patches to dependencies.Run the Development Server
Start Expo
Start the Expo development server:- Press
ito open iOS Simulator - Press
ato open Android Emulator - Scan the QR code with Expo Go app on your physical device
Run on iOS
To run directly on iOS Simulator:Run on Android
To run directly on Android Emulator or connected device:Make sure you have an Android emulator running or a physical device connected with USB debugging enabled.
Run on Web
Papillon also supports web development for testing:Development Scripts
Papillon includes several useful npm scripts for development:Configuration Files
App Configuration
The main app configuration is inapp.config.ts:
Papillon uses Expo’s New Architecture for improved performance. This is enabled by default in
app.config.ts.TypeScript Configuration
TypeScript is configured intsconfig.json with strict mode enabled:
@/ alias to import from the project root:
Code Quality Tools
ESLint
Papillon uses ESLint with strict rules configured ineslint.config.mjs:
- Indentation: 2 spaces
- No console statements: Use the logger utility instead
- Camelcase naming: Properties must use camelCase
- Auto-sort imports: Imports are automatically sorted
- Unused imports removal: Automatically removed on lint
Prettier
Code formatting is handled by Prettier with these settings:Most editors can be configured to format on save. Check your editor’s Prettier integration.
Development Environment
Expo Dev Client
Papillon uses Expo Dev Client (not Expo Go) for development. This allows:- Native module development
- Custom native code
- Third-party libraries with native dependencies
Hot Reloading
The development server supports:- Fast Refresh: Instantly see changes without losing state
- Hot Module Replacement: Update modules without full reload
Debugging
You can debug Papillon using:- React Native Debugger: Standalone debugging tool
- Flipper: Facebook’s debugging platform
- Chrome DevTools: For JavaScript debugging
- Expo Dev Tools: Built-in Expo debugging interface
Common Issues
Build fails with 'Metro bundler' error
Build fails with 'Metro bundler' error
Clear the Metro bundler cache:
iOS build fails with pod install errors
iOS build fails with pod install errors
Navigate to the iOS directory and reinstall pods:
Android build fails with Gradle errors
Android build fails with Gradle errors
Clean the Android build:
'Module not found' errors after installing packages
'Module not found' errors after installing packages
Try these steps in order:
- Clear watchman:
watchman watch-del-all - Delete node_modules:
rm -rf node_modules - Clear cache:
npm cache clean --force - Reinstall:
npm install - Reset Metro:
npx expo start --clear
Next Steps
Now that your development environment is set up:- Learn about Papillon’s Architecture
- Read the Contribution Guidelines
- Explore Service Integrations
Join our Discord community if you need help or have questions!

