branch | build | coverage | quality |
---|---|---|---|
main | |||
develop |
For rapid development environment setup, use this prompt with Claude or other AI assistants:
I need to set up the development environment for the Numbers Protocol Capture Cam mobile app from scratch. This is an Angular/Ionic mobile application with the following requirements:
- Node.js v20.11.1+ (v20.11.1 or higher)
- NPM (comes with Node.js)
- Git for cloning the repository
Setup steps needed:
1. Clone the repository: git clone https://github.com/numbersprotocol/capture-lite.git
2. Navigate to project directory: cd capture-lite
**Important Note**: Some commands require environment-specific configurations and commercial package licenses that may not be available locally:
3. Install dependencies: npm install --legacy-peer-deps
*Note: Requires commercial package authentication for some dependencies*
4. Start development server: npm run serve
*Note: Limited functionality without full environment setup*
5. Run tests: npm run test
*Note: Works with dependencies installed*
6. Run linting: npm run lint
*Note: Works with dependencies installed*
**Alternative for environments without full setup:**
- Edit source code directly using your preferred IDE/editor
- Use GitHub Actions (Firebase Release) for testing with full dependencies
- Download builds via Firebase App Distribution for device testing
Please help me:
1. Verify/install the correct Node.js version (v20.11.1+)
2. Clone the repository and set up code editing environment
3. Understand the codebase structure for effective development
4. Guide me through the GitHub Actions testing workflow
5. Help me with specific development tasks I want to accomplish
Node.js v20.11.1+ is required (v20.11.1 or higher recommended).
Clone the repository:
git clone https://github.com/numbersprotocol/capture-lite.git
cd capture-lite
Install the dependencies:
npm install --legacy-peer-deps
# Note: Requires commercial package authentication
Start the development server:
npm run serve
# Note: Limited functionality without full environment setup
Run linting and tests:
npm run lint # Requires dependencies installed
npm run test # Requires dependencies installed
Alternative Development Approach: If dependencies can't be installed due to missing environment variables, you can still:
- Edit source code directly using your IDE/editor
- Use GitHub Actions workflows for testing (see Development Workflow)
- Test builds via Firebase App Distribution
npm run serve # Start development server
npm run test # Run unit tests
npm run test.ci # Run tests in headless mode
npm run lint # Run linting (required before commit)
npm run build # Build for production
npm run build.android # Build and sync for Android
npm run build.ios # Build and sync for iOS
npx cap open android # Open in Android Studio
npx cap open ios # Open in Xcode
- Run
npm run lint
before each commit. - The committed codes should pass all GitHub checks.
- Use Visual Studio Code with workspace settings for consistent coding style.
- Use Prettier extension to auto format on save.
- Prefer
Promise
thanObservable
when only emitting one value. See issue #233. - Avoid using
toPromise()
to convertObservable
toPromise
as it is an anti-pattern.
If your operating system is Linux, set the environment variable CAPACITOR_ANDROID_STUDIO_PATH
for your Android Studio. The default value is /usr/local/android-studio/bin/studio.sh
.
export CAPACITOR_ANDROID_STUDIO_PATH="/home/username/android-studio/bin/studio.sh"
Before running the app with Android Studio, build and sync the dependencies and web assets.
npm run build
npx cap sync android
Open the project in Android Studio.
npx cap open android
The script does the same thing for you.
npm run build.android
- This app is still in the experimental stage.
- This app uses raw file system to save proofs, and thus the performance is not optimized.
Due to local environment limitations, the recommended development flow uses GitHub Actions for testing:
- Make code changes and ensure local build/tests pass
- Deploy for testing using GitHub Actions:
- Android APK Build: For Android device testing
- Firebase Release: For distributing to test groups (Android & iOS)
- Test your implementation using the deployed build
- Request code review from senior developers after confirming changes work
After code review approval:
- Bump version numbers (see DEPLOYMENT.md)
- Trigger pre-release GitHub Action for Play Store (alpha) and TestFlight
- QA team handles promotion to production
See DEPLOYMENT.md for detailed instructions.