Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
68 changes: 0 additions & 68 deletions .easignore

This file was deleted.

22 changes: 14 additions & 8 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
ENV=dev
APP_ENV=development
API_URL=https://dev-api.example.com/v1
GOOGLE_MAPS_API_KEY=dev_maps_key_placeholder
# Application Details
PACKAGE_NAME=com.shivshankartiwari.reactnativeignitekit
TRACK=beta
USER_FRACTION=0.5
# ──────────────────────────────────────────────────────────────
# SnapBiodata — development runtime config
#
# react-native-config BAKES these values into the app binary, so treat
# everything here as PUBLIC (extractable by reverse-engineering the app).
# Put ONLY non-secret app config here.
#
# Secrets never go here → use:
# • Android signing keystore → .env.signing (gitignored) / EAS / GitHub secrets
# • Play service account JSON → GitHub Actions secret (ANDROID_SERVICE_ACCOUNT)
# • App Store / EAS tokens → EAS / GitHub secrets
# ──────────────────────────────────────────────────────────────
ENV=development
API_URL=https://dev.snapbiodata.com
22 changes: 14 additions & 8 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
ENV=prod
APP_ENV=production
API_URL=https://api.example.com/v1
GOOGLE_MAPS_API_KEY=replace_in_.env.production.local_or_EAS_secret
# Application Details
PACKAGE_NAME=com.shivshankartiwari.reactnativeignitekit
TRACK=beta
USER_FRACTION=0.5
# ──────────────────────────────────────────────────────────────
# SnapBiodata — production runtime config
#
# react-native-config BAKES these values into the app binary, so treat
# everything here as PUBLIC (extractable by reverse-engineering the app).
# Put ONLY non-secret app config here.
#
# Secrets never go here → use:
# • Android signing keystore → .env.signing (gitignored) / EAS / GitHub secrets
# • Play service account JSON → GitHub Actions secret (ANDROID_SERVICE_ACCOUNT)
# • App Store / EAS tokens → EAS / GitHub secrets
# ──────────────────────────────────────────────────────────────
ENV=production
API_URL=https://snapbiodata.com
2 changes: 1 addition & 1 deletion .env.signing.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sample signing config for Android release build
KEYSTORE_PATH=android/app/keystore/snapbiodata-release-key.keystore
KEYSTORE_PATH=android/app/keystore/ignitekit-release-key.keystore
KEYSTORE_PASSWORD=your_keystore_password
KEY_ALIAS=your_key_alias
KEY_PASSWORD=your_key_password
20 changes: 13 additions & 7 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# ──────────────────────────────────────────────────────────────
# SnapBiodata — staging runtime config
#
# react-native-config BAKES these values into the app binary, so treat
# everything here as PUBLIC (extractable by reverse-engineering the app).
# Put ONLY non-secret app config here.
#
# Secrets never go here → use:
# • Android signing keystore → .env.signing (gitignored) / EAS / GitHub secrets
# • Play service account JSON → GitHub Actions secret (ANDROID_SERVICE_ACCOUNT)
# • App Store / EAS tokens → EAS / GitHub secrets
# ──────────────────────────────────────────────────────────────
ENV=staging
APP_ENV=staging
API_URL=https://staging-api.example.com/v1
GOOGLE_MAPS_API_KEY=staging_maps_key_placeholder
# Application Details
PACKAGE_NAME=com.shivshankartiwari.reactnativeignitekit
TRACK=beta
USER_FRACTION=0.5
API_URL=https://staging.snapbiodata.com
131 changes: 106 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,127 @@
name: CI
name: Continuous Integration

on:
pull_request:
branches:
- dev
- staging
- sit
- main

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
quality:
name: Lint, Test, Version Checks
test:
name: Run Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Use Node.js version 18.x

- name: Install Yarn
run: npm install --global yarn@1.22.22 # Specify Yarn version 1.22.22

- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install

- name: Run Lefthook CI checks
run: yarn lefthook run ci-hook # Runs Lefthook CI hook defined in .lefthook.yml

- name: Run tests
run: yarn test-ci # Ensure that your package.json has this script defined

# Optional: Add a step for building the project (if applicable)
# - name: Build Project
# run: yarn build

android-build:
name: Build Android and Deploy to Play Store (Beta)
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v4
# Set up Node.js for Yarn and related tasks
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'yarn'
node-version: '18'

- name: Enable Corepack
run: corepack enable
- name: Install Yarn
run: npm install --global yarn@1.22.22

- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --immutable
run: yarn install

- name: Lint
run: yarn lint
# Cache Gradle Wrapper
- name: Cache Gradle Wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Tests
run: yarn test
# Cache Gradle dependencies
- name: Cache Gradle Dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-

- name: Lefthook CI hook
run: yarn lefthook run ci-hook
# Make Gradle Wrapper executable
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew

# Informational version consistency check across package.json + native files.
- name: EAS version consistency
run: yarn eas:version:get
# Build Android App Bundle
- name: Build Android App Bundle
run: cd android && ./gradlew bundleRelease --no-daemon

# Sign the App Bundle
- name: Sign App Bundle
id: sign_app
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: android/app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
alias: ${{ secrets.ANDROID_SIGNING_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}

# Upload the signed App Bundle
- name: Upload Signed App Bundle
uses: actions/upload-artifact@v2
with:
name: Signed App Bundle
path: ${{steps.sign_app.outputs.signedReleaseFile}}

# Deploy to Google Play Store Beta
- name: Deploy to Google Play Store (Beta)
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT }}
packageName: com.snapbiodata.app
releaseFile: ${{steps.sign_app.outputs.signedReleaseFile}}
track: beta
userFraction: 0.5
whatsNewDirectory: android/release-notes/
26 changes: 2 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ local.properties
node_modules/
npm-debug.log
yarn-error.log
package-lock.json

# fastlane
#
Expand Down Expand Up @@ -78,36 +77,15 @@ package-lock.json
# NOTE: These will be removed in production. Do not include real credentials or secrets.
.env*
!.env.signing.example
!.env.development.local.example
!.env.staging.local.example
!.env.production.local.example

# EAS credentials export (keystore + secrets — never commit)
/credentials.json
/credentials/

# Ignore service account credentials
android/fastlane/keys/*.json
android/*.json

# 🔐 Fastlane Play Store JSON key (keep this secret!)
fastlane/keys/*.json

# 🔐 Android keystore files (highly sensitive)
android/keystores/*.jks
android/keystores/*.keystore
!android/keystores/your-app-upload-key.jks
# react-native-config generated build artifact (per-build, may hold env values)
ios/tmp.xcconfig
# Expo
.expo
dist/
web-build/

# Screenshots
ios/simulator-build/
screenshots/
# ASC API key
AuthKey_*.p8
asc-api-key.json

# Fastlane generated
Preview.html
17 changes: 0 additions & 17 deletions .maestro/screenshots.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.4.cjs

# Nested @react-native/* / Babel packages declare peers that are satisfied from the
# workspace root (devDependencies). Yarn 3 still emits YN0002; installs are valid.
# https://yarnpkg.com/configuration/yarnrc#logFilters
logFilters:
- code: YN0002
level: discard
Loading
Loading