Skip to content

Latest commit

 

History

History
111 lines (84 loc) · 2.77 KB

File metadata and controls

111 lines (84 loc) · 2.77 KB

Getting Started

Prerequisites

  • Node.js 22+nodejs.org
  • iOS: Xcode 15+ and CocoaPods (sudo gem install cocoapods)
  • Android: Android Studio with Android SDK and JDK 17+

Setup

git clone https://github.com/mulkatz/cap2cal.git
cd cap2cal

Mobile App

cd app
npm install
cp .env.example .env   # fill in Firebase config + API URLs

Web preview (fastest way to develop):

npm run dev            # opens at http://localhost:5173

Run on device:

npm run build
npx cap run ios        # or: npx cap run android

Backend

cd backend/functions
npm install
npm run serve          # starts Firebase emulator

For production deployment:

firebase deploy --only functions

Landing Page

cd web
npm install
cp .env.example .env   # fill in Firebase + PostHog config
npm run dev

Environment Variables

Each subproject has a .env.example file. Copy it to .env and fill in the values:

Variable Where Description
VITE_FIREBASE_* app/.env Firebase project config
VITE_ANALYSE_API_URL app/.env URL of the analyse Cloud Function
VITE_FIND_TICKETS_API_URL app/.env URL of the findTickets Cloud Function
VITE_FEATURE_FLAGS_API_URL app/.env URL of the featureFlags Cloud Function
VITE_REVENUECAT_* app/.env RevenueCat API keys (optional, see RevenueCat Setup)
VITE_DEVELOPER_MODE_ENABLED app/.env Enable dev tools like crash testing (false in production)
VITE_FIREBASE_* web/.env Firebase config for the landing page
VITE_PUBLIC_POSTHOG_* web/.env PostHog analytics config

The backend uses Firebase Secret Manager instead of .env files. See backend/functions/.env.example for the required secrets and set them with:

firebase functions:secrets:set SECRET_NAME

Building for Production

# Build web assets
cd app && npm run build

# Sync and open native projects
npx cap sync
npx cap open ios       # Archive in Xcode → Product → Archive
npx cap open android   # Build → Generate Signed Bundle/APK

Troubleshooting

iOS pod install fails:

cd app/native/ios/App && rm -rf Pods Podfile.lock && pod install

Android build fails:

cd app/native/android && ./gradlew clean

Port 5173 in use:

npm run dev -- --port 3000

Next Steps