Before running the project, make sure you have the following installed:
- Bun (version 1.1.45)
- Node.js (version 22)
- Expo CLI
- Xcode (for iOS development)
- Android Studio (for Android development)
- Act (for local CI testing)
This project uses several tools to maintain code quality:
- Husky: Manages git hooks to run checks before commits(.husky/pre-commit)
- lint-staged: Runs linters on staged git files
- ESLint: Checks code for potential errors and enforces coding standards
- Prettier: Automatically formats code for consistency
- Act: Test GitHub Actions workflows locally
The pre-commit hook will automatically:
- Run ESLint to check code quality
- Run Prettier to format staged files
- Prevent commits if there are any linting errors
- Clone the repository:
git clone https://github.com/NedaaDevs/nedaa
cd nedaa- Install dependencies using Bun:
bun install
# Alternative: Install using Bun with Yarn compatibility
bun install --yarn- Install Act for local CI testing:
# macOS with Homebrew
brew install act
# Or with Bun globally
bun add -g @nektos/act- Make sure you have Xcode installed and set up properly
- Install iOS Simulator (through Xcode)
- Run the following command:
bun run iosAlternatively, you can use:
npx expo run:ios- Make sure you have Android Studio installed
- Set up an Android Virtual Device (AVD) through Android Studio
- Run the following command:
bun run androidAlternatively, you can use:
npx expo run:androidTo start the metro server:
bun startThis will start the Expo development server, and you can choose to run on either iOS or Android from the Expo Developer Tools.
Test GitHub Actions workflows locally using Act:
# Test code quality workflow
act -j quality-checks
# Test with specific triggers
act pull_request -j quality-checks
act push -j quality-checks
# Test with reusable containers (faster)
act -j quality-checks --reuse# List available workflows
act -l
# Dry run (validate without execution)
act -n -j quality-checks
# Verbose output for debugging
act -j quality-checks -v-
Pod installation fails (iOS)
cd ios pod install -
Android build fails
- Clean the Android build:
cd android ./gradlew clean -
Metro bundler issues
- Clear Metro bundler cache:
bun start --clear
-
Act Docker issues
- Clean up Docker containers:
docker system prune -f
- Check Docker is running and accessible
Available scripts in package.json:
bun start: Start the Expo development serverbun run android: Run on Androidbun run ios: Run on iOSbun run lint: Run ESLint checksbun run format: Format code with Prettier
Note: You can add --no-build-cache flag to any run command to execute without using the build cache, e.g.:
bun run ios --no-build-cache