Merge pull request #221 from trails-cool/feat/mobile-activities-ui

Configure EAS Build, native deps, and Sentry
This commit is contained in:
Ullrich Schäfer 2026-04-13 02:33:03 +02:00 committed by GitHub
commit fda376267c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 1104 additions and 733 deletions

View file

@ -0,0 +1,9 @@
---
name: EAS build credits
description: Avoid unnecessary EAS cloud builds — they consume limited credits
type: feedback
---
Don't trigger EAS builds casually. They consume limited cloud build credits.
**Why:** Free tier has a monthly cap; each `eas build` / `eas build:dev` costs credits.
**How to apply:** Only suggest or run EAS builds when adding/changing native dependencies. JS-only changes don't need a new build — the dev client hot-reloads via the bundler.

View file

@ -3,7 +3,7 @@ import { ExpoConfig, ConfigContext } from "expo/config";
export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: "trails.cool",
slug: "trails-cool",
slug: "mobile",
version: "0.0.1",
scheme: "trailscool",
orientation: "portrait",
@ -21,6 +21,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
NSAppTransportSecurity: {
NSAllowsLocalNetworking: true,
},
ITSAppUsesNonExemptEncryption: false,
},
},
android: {
@ -33,5 +34,20 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
web: {
favicon: "./assets/favicon.png",
},
plugins: ["expo-router", "expo-secure-store", "expo-web-browser"],
plugins: [
"expo-router",
"expo-secure-store",
"expo-web-browser",
"@maplibre/maplibre-react-native",
["@sentry/react-native", {
organization: "trails-qq",
project: "mobile",
}],
"expo-sqlite",
],
extra: {
eas: {
projectId: "93c75cae-fecf-4ce5-8cd8-c823760b12e2",
},
},
});

View file

@ -1,9 +1,12 @@
import { useEffect, useState } from "react";
import { Stack, router } from "expo-router";
import { Sentry, initSentry } from "../lib/sentry";
import { isAuthenticated } from "../lib/auth";
import { startVersionCheck } from "../lib/version-check";
export default function RootLayout() {
initSentry();
function RootLayout() {
const [checked, setChecked] = useState(false);
useEffect(() => {
@ -21,3 +24,5 @@ export default function RootLayout() {
return <Stack screenOptions={{ headerShown: false }} />;
}
export default Sentry.wrap(RootLayout);

33
apps/mobile/eas.json Normal file
View file

@ -0,0 +1,33 @@
{
"cli": {
"version": ">= 18.0.0",
"appVersionSource": "remote",
"promptToConfigurePushNotifications": false
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
}
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
},
"development-simulator": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
},
"environment": "development"
}
},
"submit": {
"production": {}
}
}

13
apps/mobile/lib/sentry.ts Normal file
View file

@ -0,0 +1,13 @@
import * as Sentry from "@sentry/react-native";
const SENTRY_DSN = "https://af50ac7aea803216adbe21e9dd4b896b@o4509530546634752.ingest.de.sentry.io/4511209742532688";
export function initSentry() {
Sentry.init({
dsn: SENTRY_DSN,
tracesSampleRate: __DEV__ ? 0 : 1.0,
enabled: !__DEV__,
});
}
export { Sentry };

View file

@ -3,6 +3,13 @@
"version": "0.0.1",
"private": true,
"main": "index.ts",
"expo": {
"install": {
"exclude": [
"react"
]
}
},
"scripts": {
"start": "expo start",
"android": "expo start --android",
@ -10,7 +17,9 @@
"web": "expo start --web",
"typecheck": "tsc --noEmit",
"test": "jest",
"lint": "eslint ."
"lint": "eslint .",
"build:dev": "npx eas-cli build:dev --platform ios",
"build:preview": "npx eas-cli build --profile preview --platform all"
},
"jest": {
"preset": "jest-expo",
@ -19,25 +28,36 @@
]
},
"dependencies": {
"@maplibre/maplibre-react-native": "^10.4.2",
"@sentry/cli": "^3.3.5",
"@sentry/react-native": "~7.11.0",
"@trails-cool/api": "workspace:*",
"@trails-cool/gpx": "workspace:*",
"@trails-cool/i18n": "workspace:*",
"@trails-cool/map-core": "workspace:*",
"@trails-cool/types": "workspace:*",
"expo": "~55.0.14",
"expo-constants": "~55.0.13",
"expo-crypto": "~55.0.14",
"expo-dev-client": "~55.0.27",
"expo-linking": "~55.0.12",
"expo-location": "~55.1.8",
"expo-notifications": "~55.0.18",
"expo-router": "~55.0.12",
"expo-secure-store": "~55.0.13",
"expo-sqlite": "~55.0.15",
"expo-status-bar": "~55.0.5",
"expo-web-browser": "~55.0.14",
"react": "19.2.0",
"react": "catalog:",
"react-native": "0.83.4",
"react-native-safe-area-context": "~5.6.2",
"react-native-screens": "~4.23.0",
"use-latest-callback": "^0.3.3",
"zod": "^3.25.76"
},
"devDependencies": {
"@testing-library/react-native": "^13.3.3",
"react-test-renderer": "^19.2.5",
"@types/jest": "^29.5.14",
"@types/react": "~19.2.14",
"jest-expo": "^55.0.15",

View file

@ -6,7 +6,7 @@
- [x] 1.1.2 Configure pnpm workspace to include `apps/mobile` and resolve shared packages (`@trails-cool/types`, `@trails-cool/gpx`, `@trails-cool/i18n`)
- [x] 1.1.3 Set up Expo Router with bottom tab navigation (Map, Routes, Activities, Profile) and placeholder screens
- [x] 1.1.4 Add app icon, splash screen, and `app.config.ts` with bundle identifiers for iOS and Android
- [ ] 1.1.5 Configure EAS Build for development and preview profiles
- [x] 1.1.5 Configure EAS Build for development and preview profiles
### 1.2 API Contract Package

View file

@ -21,9 +21,8 @@
"db:studio": "drizzle-kit studio --config packages/db/drizzle.config.ts",
"dev:services": "docker compose -f docker-compose.dev.yml up -d",
"dev:full": "./scripts/dev.sh",
"dev:mobile": "pnpm --filter @trails-cool/mobile start",
"dev:mobile:ios": "pnpm --filter @trails-cool/mobile ios",
"dev:mobile:android": "pnpm --filter @trails-cool/mobile android"
"dev:ios": "pnpm --filter @trails-cool/mobile build:dev",
"dev:android": "pnpm --filter @trails-cool/mobile build:dev -- --platform android"
},
"pnpm": {
"overrides": {
@ -39,6 +38,7 @@
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@expo/fingerprint": "^0.16.6",
"@playwright/test": "^1.59.1",
"@react-router/dev": "catalog:",
"@react-router/node": "catalog:",

1723
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff