opencode-skills-collection 4.0.69 → 4.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +39 -1
- package/bundled-skills/api-integration-architect/SKILL.md +241 -0
- package/bundled-skills/apify-generate-output-schema/SKILL.md +438 -0
- package/bundled-skills/apify-integration-development/SKILL.md +168 -0
- package/bundled-skills/apify-integration-development/references/ai-framework-package.md +158 -0
- package/bundled-skills/apify-integration-development/references/ai-harness-plugin.md +192 -0
- package/bundled-skills/apify-integration-development/references/sdk-integration.md +236 -0
- package/bundled-skills/apify-integration-development/references/workflow-automation.md +163 -0
- package/bundled-skills/architecture-review/README.md +42 -0
- package/bundled-skills/architecture-review/SKILL.md +77 -0
- package/bundled-skills/architecture-review/examples.md +11 -0
- package/bundled-skills/architecture-review/reference/best-practices.md +7 -0
- package/bundled-skills/architecture-review/reference/capabilities.md +20 -0
- package/bundled-skills/architecture-review/reference/fallbacks.md +11 -0
- package/bundled-skills/architecture-review/reference/graph.md +15 -0
- package/bundled-skills/architecture-review/reference/mcp.md +14 -0
- package/bundled-skills/architecture-review/reference/workflow.md +15 -0
- package/bundled-skills/architecture-review/templates/architecture-review.md +21 -0
- package/bundled-skills/code-review-sensei/SKILL.md +177 -0
- package/bundled-skills/codebase-onboarding/README.md +42 -0
- package/bundled-skills/codebase-onboarding/SKILL.md +77 -0
- package/bundled-skills/codebase-onboarding/examples.md +11 -0
- package/bundled-skills/codebase-onboarding/reference/best-practices.md +7 -0
- package/bundled-skills/codebase-onboarding/reference/capabilities.md +20 -0
- package/bundled-skills/codebase-onboarding/reference/fallbacks.md +11 -0
- package/bundled-skills/codebase-onboarding/reference/graph.md +15 -0
- package/bundled-skills/codebase-onboarding/reference/mcp.md +14 -0
- package/bundled-skills/codebase-onboarding/reference/workflow.md +15 -0
- package/bundled-skills/codebase-onboarding/templates/repository-onboarding.md +21 -0
- package/bundled-skills/connection-auth-rules/SKILL.md +199 -0
- package/bundled-skills/connection-auth-rules/fetch_schema.py +320 -0
- package/bundled-skills/dependency-analysis/README.md +42 -0
- package/bundled-skills/dependency-analysis/SKILL.md +76 -0
- package/bundled-skills/dependency-analysis/examples.md +11 -0
- package/bundled-skills/dependency-analysis/reference/best-practices.md +7 -0
- package/bundled-skills/dependency-analysis/reference/capabilities.md +20 -0
- package/bundled-skills/dependency-analysis/reference/fallbacks.md +11 -0
- package/bundled-skills/dependency-analysis/reference/graph.md +15 -0
- package/bundled-skills/dependency-analysis/reference/mcp.md +14 -0
- package/bundled-skills/dependency-analysis/reference/workflow.md +15 -0
- package/bundled-skills/dependency-analysis/templates/dependency-review.md +21 -0
- package/bundled-skills/devops-pipeline-builder/SKILL.md +200 -0
- package/bundled-skills/eas-app-stores/SKILL.md +197 -0
- package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
- package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
- package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
- package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
- package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
- package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
- package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
- package/bundled-skills/eas-hosting/SKILL.md +448 -0
- package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/SKILL.md +75 -0
- package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/references/metrics.md +98 -0
- package/bundled-skills/eas-observe/references/queries.md +403 -0
- package/bundled-skills/eas-observe/references/setup.md +476 -0
- package/bundled-skills/eas-observe/references/third-party.md +136 -0
- package/bundled-skills/eas-simulator/SKILL.md +251 -0
- package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
- package/bundled-skills/eas-simulator/references/controllers.md +135 -0
- package/bundled-skills/eas-simulator/references/run-your-app.md +240 -0
- package/bundled-skills/eas-simulator/references/troubleshooting.md +47 -0
- package/bundled-skills/eas-workflows/SKILL.md +119 -0
- package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
- package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
- package/bundled-skills/expo-animation/LICENSE +21 -0
- package/bundled-skills/expo-animation/RECIPES.md +385 -0
- package/bundled-skills/expo-animation/SKILL.md +295 -0
- package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
- package/bundled-skills/fact-check-x-unified/SKILL.md +178 -0
- package/bundled-skills/fact-check-x-unified/agents/openai.yaml +4 -0
- package/bundled-skills/fact-check-x-unified/references/acceptance-criteria.md +44 -0
- package/bundled-skills/fact-check-x-unified/references/contracts.md +39 -0
- package/bundled-skills/fact-check-x-unified/scripts/common.py +31 -0
- package/bundled-skills/fact-check-x-unified/scripts/fact_check_x.py +1832 -0
- package/bundled-skills/fact-check-x-unified/scripts/trusted_search_config.py +324 -0
- package/bundled-skills/fact-check-x-unified/tests/anchor_downgrade_test.py +90 -0
- package/bundled-skills/fact-check-x-unified/tests/multi_platform_test.py +369 -0
- package/bundled-skills/fact-check-x-unified/tests/smoke_test.py +740 -0
- package/bundled-skills/fact-check-x-unified/tests/stage_checkpoint_test.py +103 -0
- package/bundled-skills/fact-check-x-unified/tests/trusted_search_config_test.py +156 -0
- package/bundled-skills/gpt-taste/SKILL.md +8 -1
- package/bundled-skills/hf-cli/SKILL.md +263 -0
- package/bundled-skills/huggingface-community-evals/SKILL.md +228 -0
- package/bundled-skills/huggingface-community-evals/examples/.env.example +3 -0
- package/bundled-skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
- package/bundled-skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
- package/bundled-skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
- package/bundled-skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
- package/bundled-skills/huggingface-datasets/SKILL.md +130 -0
- package/bundled-skills/jev-social/SKILL.md +182 -0
- package/bundled-skills/longbridge-derivatives/SKILL.md +117 -0
- package/bundled-skills/longbridge-derivatives/references/option.md +36 -0
- package/bundled-skills/longbridge-derivatives/references/options-advanced.md +101 -0
- package/bundled-skills/longbridge-derivatives/references/options-pnl.md +74 -0
- package/bundled-skills/longbridge-derivatives/references/options-strategy.md +82 -0
- package/bundled-skills/longbridge-derivatives/references/options-volatility.md +70 -0
- package/bundled-skills/longbridge-derivatives/references/warrant.md +12 -0
- package/bundled-skills/longbridge-quant/SKILL.md +151 -0
- package/bundled-skills/longbridge-quant/references/correlation.md +51 -0
- package/bundled-skills/longbridge-quant/references/execution-model.md +68 -0
- package/bundled-skills/longbridge-quant/references/factor-research.md +95 -0
- package/bundled-skills/longbridge-quant/references/factor-screen.md +101 -0
- package/bundled-skills/longbridge-quant/references/hedging.md +136 -0
- package/bundled-skills/longbridge-quant/references/ml-strategy.md +77 -0
- package/bundled-skills/longbridge-quant/references/multifactor.md +68 -0
- package/bundled-skills/longbridge-quant/references/pairs-trading.md +61 -0
- package/bundled-skills/longbridge-quant/references/quant-cli.md +133 -0
- package/bundled-skills/longbridge-quant/references/quant-stats.md +150 -0
- package/bundled-skills/longbridge-quant/references/seasonality.md +50 -0
- package/bundled-skills/longbridge-quant/references/strategy-optimizer.md +68 -0
- package/bundled-skills/longbridge-quant/references/volatility-strategy.md +52 -0
- package/bundled-skills/longbridge-research/SKILL.md +187 -0
- package/bundled-skills/longbridge-research/references/company-profile.md +96 -0
- package/bundled-skills/longbridge-research/references/company-tearsheet.md +82 -0
- package/bundled-skills/longbridge-research/references/competitive-analysis.md +81 -0
- package/bundled-skills/longbridge-research/references/consensus.md +92 -0
- package/bundled-skills/longbridge-research/references/coverage-initiation.md +76 -0
- package/bundled-skills/longbridge-research/references/defi-yield.md +60 -0
- package/bundled-skills/longbridge-research/references/finance-calendar.md +165 -0
- package/bundled-skills/longbridge-research/references/financial-planning.md +77 -0
- package/bundled-skills/longbridge-research/references/forecast-eps.md +39 -0
- package/bundled-skills/longbridge-research/references/fund-holder.md +44 -0
- package/bundled-skills/longbridge-research/references/hkipo-analysis.md +101 -0
- package/bundled-skills/longbridge-research/references/industry-peers.md +46 -0
- package/bundled-skills/longbridge-research/references/industry-rank.md +62 -0
- package/bundled-skills/longbridge-research/references/insider-trades.md +48 -0
- package/bundled-skills/longbridge-research/references/institution-rating.md +62 -0
- package/bundled-skills/longbridge-research/references/investment-ideas.md +69 -0
- package/bundled-skills/longbridge-research/references/investment-proposal.md +95 -0
- package/bundled-skills/longbridge-research/references/investors.md +87 -0
- package/bundled-skills/longbridge-research/references/onchain.md +70 -0
- package/bundled-skills/longbridge-research/references/post-investment.md +76 -0
- package/bundled-skills/longbridge-research/references/shareholder.md +72 -0
- package/bundled-skills/longbridge-research/references/short-positions.md +50 -0
- package/bundled-skills/longbridge-research/references/short-trades.md +50 -0
- package/bundled-skills/longbridge-research/references/stock-research.md +61 -0
- package/bundled-skills/longbridge-research/references/thesis-tracker.md +64 -0
- package/bundled-skills/makepad-2-0-animation/SKILL.md +318 -0
- package/bundled-skills/makepad-2-0-animation/references/animator-reference.md +433 -0
- package/bundled-skills/makepad-2-0-dsl/SKILL.md +492 -0
- package/bundled-skills/makepad-2-0-dsl/references/dsl-syntax-reference.md +511 -0
- package/bundled-skills/makepad-2-0-dsl/references/extended-guide.md +56 -0
- package/bundled-skills/makepad-2-0-dsl/references/property-system.md +757 -0
- package/bundled-skills/makepad-2-0-events/SKILL.md +497 -0
- package/bundled-skills/makepad-2-0-events/references/event-patterns.md +802 -0
- package/bundled-skills/makepad-2-0-events/references/extended-guide.md +590 -0
- package/bundled-skills/makepad-2-0-layout/SKILL.md +499 -0
- package/bundled-skills/makepad-2-0-layout/references/extended-guide.md +243 -0
- package/bundled-skills/makepad-2-0-layout/references/layout-patterns.md +881 -0
- package/bundled-skills/makepad-2-0-widgets/SKILL.md +261 -0
- package/bundled-skills/makepad-2-0-widgets/references/widget-advanced.md +648 -0
- package/bundled-skills/makepad-2-0-widgets/references/widget-catalog.md +547 -0
- package/bundled-skills/meeting-distiller-pro/SKILL.md +120 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/SKILL.md +12 -1
- package/bundled-skills/monte-carlo-asset-health/SKILL.md +12 -1
- package/bundled-skills/monte-carlo-context-detection/SKILL.md +170 -0
- package/bundled-skills/monte-carlo-context-detection/references/signal-definitions.md +46 -0
- package/bundled-skills/remotion-captions/SKILL.md +57 -0
- package/bundled-skills/remotion-captions/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-captions/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-captions/display-captions.md +190 -0
- package/bundled-skills/remotion-captions/import-srt-captions.md +73 -0
- package/bundled-skills/remotion-captions/transcribe-captions.md +70 -0
- package/bundled-skills/remotion-create/SKILL.md +106 -0
- package/bundled-skills/remotion-create/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-create/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-create/tailwind.md +11 -0
- package/bundled-skills/remotion-create/video-layout.md +9 -0
- package/bundled-skills/remotion-docs/SKILL.md +67 -0
- package/bundled-skills/remotion-docs/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-docs/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-interactivity/SKILL.md +270 -0
- package/bundled-skills/remotion-interactivity/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-interactivity/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-render/SKILL.md +48 -0
- package/bundled-skills/remotion-render/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-render/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-render/transparent-videos.md +106 -0
- package/bundled-skills/saas-pricing-strategist/SKILL.md +169 -0
- package/bundled-skills/score-eval/SKILL.md +35 -0
- package/bundled-skills/writing-guidelines/SKILL.md +60 -0
- package/package.json +1 -1
- package/skills_index.json +980 -3
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Curated upstream guidance for Eas Hosting; use when the workflow matches the user goal.
|
|
3
|
+
name: eas-hosting
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
license: MIT
|
|
6
|
+
source_repo: expo/skills
|
|
7
|
+
source_type: official
|
|
8
|
+
source: expo
|
|
9
|
+
date_added: '2026-09-21'
|
|
10
|
+
risk: unknown
|
|
11
|
+
---
|
|
12
|
+
# EAS Hosting
|
|
13
|
+
|
|
14
|
+
> **EAS service - costs apply.** EAS Hosting is a paid Expo Application Services product with free-tier limits; production deploys use your plan's request and bandwidth allowance. See https://expo.dev/pricing. Authoring API routes and exporting the web bundle are free and open source, and you can self-host the exported server output instead of EAS Hosting.
|
|
15
|
+
|
|
16
|
+
EAS Hosting deploys your Expo **web app and API routes** to Expo's managed edge (Cloudflare Workers). Export the web bundle with `npx expo export -p web` and ship it with `eas deploy` - the same command deploys any Expo Router API routes bundled alongside it. This skill covers deploying a website, authoring API routes, and the hosting runtime; see the Deployment section below for the deploy workflow.
|
|
17
|
+
|
|
18
|
+
## When to Use API Routes
|
|
19
|
+
|
|
20
|
+
Use API routes when you need:
|
|
21
|
+
|
|
22
|
+
- **Server-side secrets** — API keys, database credentials, or tokens that must never reach the client
|
|
23
|
+
- **Database operations** — Direct database queries that shouldn't be exposed
|
|
24
|
+
- **Third-party API proxies** — Hide API keys when calling external services (OpenAI, Stripe, etc.)
|
|
25
|
+
- **Server-side validation** — Validate data before database writes
|
|
26
|
+
- **Webhook endpoints** — Receive callbacks from services like Stripe or GitHub
|
|
27
|
+
- **Rate limiting** — Control access at the server level
|
|
28
|
+
- **Heavy computation** — Offload processing that would be slow on mobile
|
|
29
|
+
|
|
30
|
+
## When NOT to Use API Routes
|
|
31
|
+
|
|
32
|
+
Avoid API routes when:
|
|
33
|
+
|
|
34
|
+
- **Data is already public** — Use direct fetch to public APIs instead
|
|
35
|
+
- **No secrets required** — Static data or client-safe operations
|
|
36
|
+
- **Real-time updates needed** — Use WebSockets or services like Supabase Realtime
|
|
37
|
+
- **Simple CRUD** — Consider Firebase, Supabase, or Convex for managed backends
|
|
38
|
+
- **File uploads** — Use direct-to-storage uploads (S3 presigned URLs, Cloudflare R2)
|
|
39
|
+
- **Authentication only** — Use Clerk, Auth0, or Firebase Auth instead
|
|
40
|
+
|
|
41
|
+
## File Structure
|
|
42
|
+
|
|
43
|
+
API routes live in the `app` directory with `+api.ts` suffix:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
app/
|
|
47
|
+
api/
|
|
48
|
+
hello+api.ts → GET /api/hello
|
|
49
|
+
users+api.ts → /api/users
|
|
50
|
+
users/[id]+api.ts → /api/users/:id
|
|
51
|
+
(tabs)/
|
|
52
|
+
index.tsx
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Basic API Route
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
// app/api/hello+api.ts
|
|
59
|
+
export function GET(request: Request) {
|
|
60
|
+
return Response.json({ message: "Hello from Expo!" });
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## HTTP Methods
|
|
65
|
+
|
|
66
|
+
Export named functions for each HTTP method:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
// app/api/items+api.ts
|
|
70
|
+
export function GET(request: Request) {
|
|
71
|
+
return Response.json({ items: [] });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export async function POST(request: Request) {
|
|
75
|
+
const body = await request.json();
|
|
76
|
+
return Response.json({ created: body }, { status: 201 });
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export async function PUT(request: Request) {
|
|
80
|
+
const body = await request.json();
|
|
81
|
+
return Response.json({ updated: body });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function DELETE(request: Request) {
|
|
85
|
+
return new Response(null, { status: 204 });
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Dynamic Routes
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
// app/api/users/[id]+api.ts
|
|
93
|
+
export function GET(request: Request, { id }: { id: string }) {
|
|
94
|
+
return Response.json({ userId: id });
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Request Handling
|
|
99
|
+
|
|
100
|
+
### Query Parameters
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
export function GET(request: Request) {
|
|
104
|
+
const url = new URL(request.url);
|
|
105
|
+
const page = url.searchParams.get("page") ?? "1";
|
|
106
|
+
const limit = url.searchParams.get("limit") ?? "10";
|
|
107
|
+
|
|
108
|
+
return Response.json({ page, limit });
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Headers
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
export function GET(request: Request) {
|
|
116
|
+
const auth = request.headers.get("Authorization");
|
|
117
|
+
|
|
118
|
+
if (!auth) {
|
|
119
|
+
return Response.json({ error: "Unauthorized" }, { status: 401 });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return Response.json({ authenticated: true });
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### JSON Body
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
export async function POST(request: Request) {
|
|
130
|
+
const { email, password } = await request.json();
|
|
131
|
+
|
|
132
|
+
if (!email || !password) {
|
|
133
|
+
return Response.json({ error: "Missing fields" }, { status: 400 });
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return Response.json({ success: true });
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Environment Variables
|
|
141
|
+
|
|
142
|
+
Use `process.env` for server-side secrets:
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
// app/api/ai+api.ts
|
|
146
|
+
export async function POST(request: Request) {
|
|
147
|
+
const { prompt } = await request.json();
|
|
148
|
+
|
|
149
|
+
const response = await fetch("https://api.openai.com/v1/chat/completions", {
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers: {
|
|
152
|
+
"Content-Type": "application/json",
|
|
153
|
+
Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
|
|
154
|
+
},
|
|
155
|
+
body: JSON.stringify({
|
|
156
|
+
model: "gpt-4",
|
|
157
|
+
messages: [{ role: "user", content: prompt }],
|
|
158
|
+
}),
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const data = await response.json();
|
|
162
|
+
return Response.json(data);
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Set environment variables:
|
|
167
|
+
|
|
168
|
+
- **Local**: Create `.env` file (never commit)
|
|
169
|
+
- **EAS Hosting**: Use `eas env:create` or Expo dashboard
|
|
170
|
+
|
|
171
|
+
## CORS Headers
|
|
172
|
+
|
|
173
|
+
Add CORS for web clients:
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
const corsHeaders = {
|
|
177
|
+
"Access-Control-Allow-Origin": "*",
|
|
178
|
+
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
|
179
|
+
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export function OPTIONS() {
|
|
183
|
+
return new Response(null, { headers: corsHeaders });
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function GET() {
|
|
187
|
+
return Response.json({ data: "value" }, { headers: corsHeaders });
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Error Handling
|
|
192
|
+
|
|
193
|
+
```ts
|
|
194
|
+
export async function POST(request: Request) {
|
|
195
|
+
try {
|
|
196
|
+
const body = await request.json();
|
|
197
|
+
// Process...
|
|
198
|
+
return Response.json({ success: true });
|
|
199
|
+
} catch (error) {
|
|
200
|
+
console.error("API error:", error);
|
|
201
|
+
return Response.json({ error: "Internal server error" }, { status: 500 });
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Testing Locally
|
|
207
|
+
|
|
208
|
+
Start the development server with API routes:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
npx expo serve
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
This starts a local server at `http://localhost:8081` with full API route support.
|
|
215
|
+
|
|
216
|
+
Test with curl:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
curl http://localhost:8081/api/hello
|
|
220
|
+
curl -X POST http://localhost:8081/api/users -H "Content-Type: application/json" -d '{"name":"Test"}'
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Deployment to EAS Hosting
|
|
224
|
+
|
|
225
|
+
### Prerequisites
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
npm install -g eas-cli
|
|
229
|
+
eas login
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Deploy
|
|
233
|
+
|
|
234
|
+
Deploying ships your web bundle and any Expo Router API routes together - `eas deploy` handles both. The export runs whether you have a full website, an API-routes-only backend, or both.
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Export the web bundle (includes any API routes)
|
|
238
|
+
npx expo export -p web
|
|
239
|
+
|
|
240
|
+
# Deploy a preview (PR-style URL)
|
|
241
|
+
npx eas-cli@latest deploy
|
|
242
|
+
|
|
243
|
+
# Deploy to production
|
|
244
|
+
npx eas-cli@latest deploy --prod
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Everything lands on EAS Hosting (Cloudflare Workers).
|
|
248
|
+
|
|
249
|
+
### Environment Variables for Production
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# Create a secret
|
|
253
|
+
eas env:create --name OPENAI_API_KEY --value sk-xxx --environment production
|
|
254
|
+
|
|
255
|
+
# Or use the Expo dashboard
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Custom Domain
|
|
259
|
+
|
|
260
|
+
Configure in `eas.json` or Expo dashboard.
|
|
261
|
+
|
|
262
|
+
### Automate with EAS Workflows
|
|
263
|
+
|
|
264
|
+
Deploy the website (and API routes) on every push to main with a `type: deploy` workflow:
|
|
265
|
+
|
|
266
|
+
`.eas/workflows/deploy.yml`
|
|
267
|
+
|
|
268
|
+
```yaml
|
|
269
|
+
name: Deploy
|
|
270
|
+
|
|
271
|
+
on:
|
|
272
|
+
push:
|
|
273
|
+
branches:
|
|
274
|
+
- main
|
|
275
|
+
|
|
276
|
+
# https://docs.expo.dev/eas/workflows/syntax/#deploy
|
|
277
|
+
jobs:
|
|
278
|
+
deploy_web:
|
|
279
|
+
type: deploy
|
|
280
|
+
params:
|
|
281
|
+
prod: true
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Preview deploys for pull requests use the same job type with `prod: false`:
|
|
285
|
+
|
|
286
|
+
```yaml
|
|
287
|
+
name: Web PR Preview
|
|
288
|
+
|
|
289
|
+
on:
|
|
290
|
+
pull_request:
|
|
291
|
+
types: [opened, synchronize]
|
|
292
|
+
|
|
293
|
+
jobs:
|
|
294
|
+
preview:
|
|
295
|
+
type: deploy
|
|
296
|
+
params:
|
|
297
|
+
prod: false
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
To author or validate workflow YAML beyond these examples, use the `eas-workflows` skill.
|
|
301
|
+
|
|
302
|
+
## EAS Hosting Runtime (Cloudflare Workers)
|
|
303
|
+
|
|
304
|
+
API routes run on Cloudflare Workers. Key limitations:
|
|
305
|
+
|
|
306
|
+
### Missing/Limited APIs
|
|
307
|
+
|
|
308
|
+
- **No Node.js filesystem** — `fs` module unavailable
|
|
309
|
+
- **No native Node modules** — Use Web APIs or polyfills
|
|
310
|
+
- **Limited execution time** — 30 second timeout for CPU-intensive tasks
|
|
311
|
+
- **No persistent connections** — WebSockets require Durable Objects
|
|
312
|
+
- **fetch is available** — Use standard fetch for HTTP requests
|
|
313
|
+
|
|
314
|
+
### Use Web APIs Instead
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
// Use Web Crypto instead of Node crypto
|
|
318
|
+
const hash = await crypto.subtle.digest(
|
|
319
|
+
"SHA-256",
|
|
320
|
+
new TextEncoder().encode("data")
|
|
321
|
+
);
|
|
322
|
+
|
|
323
|
+
// Use fetch instead of node-fetch
|
|
324
|
+
const response = await fetch("https://api.example.com");
|
|
325
|
+
|
|
326
|
+
// Use Response/Request (already available)
|
|
327
|
+
return new Response(JSON.stringify(data), {
|
|
328
|
+
headers: { "Content-Type": "application/json" },
|
|
329
|
+
});
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Database Options
|
|
333
|
+
|
|
334
|
+
Since filesystem is unavailable, use cloud databases:
|
|
335
|
+
|
|
336
|
+
- **Cloudflare D1** — SQLite at the edge
|
|
337
|
+
- **Turso** — Distributed SQLite
|
|
338
|
+
- **PlanetScale** — Serverless MySQL
|
|
339
|
+
- **Supabase** — Postgres with REST API
|
|
340
|
+
- **Neon** — Serverless Postgres
|
|
341
|
+
|
|
342
|
+
Example with Turso:
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
// app/api/users+api.ts
|
|
346
|
+
import { createClient } from "@libsql/client/web";
|
|
347
|
+
|
|
348
|
+
const db = createClient({
|
|
349
|
+
url: process.env.TURSO_URL!,
|
|
350
|
+
authToken: process.env.TURSO_AUTH_TOKEN!,
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
export async function GET() {
|
|
354
|
+
const result = await db.execute("SELECT * FROM users");
|
|
355
|
+
return Response.json(result.rows);
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Calling API Routes from Client
|
|
360
|
+
|
|
361
|
+
```ts
|
|
362
|
+
// From React Native components
|
|
363
|
+
const response = await fetch("/api/hello");
|
|
364
|
+
const data = await response.json();
|
|
365
|
+
|
|
366
|
+
// With body
|
|
367
|
+
const response = await fetch("/api/users", {
|
|
368
|
+
method: "POST",
|
|
369
|
+
headers: { "Content-Type": "application/json" },
|
|
370
|
+
body: JSON.stringify({ name: "John" }),
|
|
371
|
+
});
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
## Common Patterns
|
|
375
|
+
|
|
376
|
+
### Authentication Middleware
|
|
377
|
+
|
|
378
|
+
```ts
|
|
379
|
+
// utils/auth.ts
|
|
380
|
+
export async function requireAuth(request: Request) {
|
|
381
|
+
const token = request.headers.get("Authorization")?.replace("Bearer ", "");
|
|
382
|
+
|
|
383
|
+
if (!token) {
|
|
384
|
+
throw new Response(JSON.stringify({ error: "Unauthorized" }), {
|
|
385
|
+
status: 401,
|
|
386
|
+
headers: { "Content-Type": "application/json" },
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// Verify token...
|
|
391
|
+
return { userId: "123" };
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// app/api/protected+api.ts
|
|
395
|
+
import { requireAuth } from "../../utils/auth";
|
|
396
|
+
|
|
397
|
+
export async function GET(request: Request) {
|
|
398
|
+
const { userId } = await requireAuth(request);
|
|
399
|
+
return Response.json({ userId });
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Proxy External API
|
|
404
|
+
|
|
405
|
+
```ts
|
|
406
|
+
// app/api/weather+api.ts
|
|
407
|
+
export async function GET(request: Request) {
|
|
408
|
+
const url = new URL(request.url);
|
|
409
|
+
const city = url.searchParams.get("city");
|
|
410
|
+
|
|
411
|
+
const response = await fetch(
|
|
412
|
+
`https://api.weather.com/v1/current?city=${city}&key=${process.env.WEATHER_API_KEY}`
|
|
413
|
+
);
|
|
414
|
+
|
|
415
|
+
return Response.json(await response.json());
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
## Rules
|
|
420
|
+
|
|
421
|
+
- NEVER expose API keys or secrets in client code
|
|
422
|
+
- ALWAYS validate and sanitize user input
|
|
423
|
+
- Use proper HTTP status codes (200, 201, 400, 401, 404, 500)
|
|
424
|
+
- Handle errors gracefully with try/catch
|
|
425
|
+
- Keep API routes focused — one responsibility per endpoint
|
|
426
|
+
- Use TypeScript for type safety
|
|
427
|
+
- Log errors server-side for debugging
|
|
428
|
+
|
|
429
|
+
## Submitting Feedback
|
|
430
|
+
If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
|
|
431
|
+
```bash
|
|
432
|
+
npx --yes submit-expo-feedback@latest --category skills --subject "eas-hosting" "<actionable feedback>"
|
|
433
|
+
```
|
|
434
|
+
Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
|
|
435
|
+
If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
## Examples
|
|
439
|
+
|
|
440
|
+
```text
|
|
441
|
+
User: Apply this skill to my current task.
|
|
442
|
+
Assistant: Follow the workflow in this skill, cite limitations, and ask before risky steps.
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
## Limitations
|
|
446
|
+
|
|
447
|
+
- Imported upstream skill; verify credentials, permissions, and safety boundaries before execution.
|
|
448
|
+
- Does not replace environment-specific validation, testing, or maintainer review.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "EAS Hosting"
|
|
3
|
+
short_description: "Paid EAS service. Deploy Expo websites and Expo Router API routes to EAS Hosting, with environment secrets, custom domains, and the Cloudflare Workers runtime"
|
|
4
|
+
default_prompt: "Use $eas-hosting to deploy an Expo web app or Expo Router API routes to EAS Hosting, author +api.ts route handlers, manage hosting environment secrets and custom domains, and work within the Cloudflare Workers runtime."
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Curated upstream guidance for Eas Observe; use when the workflow matches the user goal.
|
|
3
|
+
name: eas-observe
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
license: MIT
|
|
6
|
+
source_repo: expo/skills
|
|
7
|
+
source_type: official
|
|
8
|
+
source: expo
|
|
9
|
+
date_added: '2026-09-21'
|
|
10
|
+
risk: unknown
|
|
11
|
+
---
|
|
12
|
+
## When to Use
|
|
13
|
+
- Use when this upstream workflow matches the user's stated goal.
|
|
14
|
+
- Use when the task requires the procedures documented in this skill.
|
|
15
|
+
|
|
16
|
+
# EAS Observe
|
|
17
|
+
|
|
18
|
+
> **EAS service - costs apply.** EAS Observe is an Expo Application Services product. The free EAS plan allows up to 10,000 monthly active users, with a limited set of features; higher usage requires a paid subscription. For details, see https://expo.dev/pricing#plan-features.
|
|
19
|
+
|
|
20
|
+
EAS Observe tracks startup, navigation, and custom-event performance from production Expo apps. It needs a development or production build — the native library is not in Expo Go.
|
|
21
|
+
|
|
22
|
+
> **Source of truth:** https://docs.expo.dev/eas/observe/ — always consult the canonical docs when API details matter, especially get-started, configuration, integrations, and the metrics reference. EAS Observe is evolving; this skill's references are written to stay accurate but may lag the docs.
|
|
23
|
+
|
|
24
|
+
## Which reference to read
|
|
25
|
+
|
|
26
|
+
The four reference files in `./references/` cover what people typically need this skill for:
|
|
27
|
+
|
|
28
|
+
- **Adding EAS Observe to a project** → [`./references/setup.md`]. Install, wrap the root layout (`AppMetricsRoot` on SDK 55, `ObserveRoot` on SDK 56+), mark the app interactive (global `markInteractive()` on SDK 55, the `useObserve()` hook or `<ObserveInteractiveMarker />` on SDK 56+), optional per-route navigation metrics through the Expo Router / React Navigation integrations, user-defined events via `Observe.logEvent` (SDK 56+), error reporting, and runtime configuration (sampling, dispatch, environments, custom endpoint).
|
|
29
|
+
- **Querying metrics from the terminal** → [`./references/queries.md`]. The six `eas observe:*` commands — `metrics-summary`, `metrics`, `routes`, `events`, `session`, `versions` — with flags, metric aliases, table layouts, JSON shapes, and common workflows.
|
|
30
|
+
- **Reading a dashboard or CLI output** → [`./references/metrics.md`]. Target thresholds per metric, what the automatic TTI params mean (`frameRate.*`, `device.*`, `network.*`), and diagnostic patterns for telling slow-but-smooth startup apart from main-thread contention, hard blocks, or throttled devices.
|
|
31
|
+
- **Shipping an Observe integration in a library** → [`./references/third-party.md`]. For package authors only (SDK 57+): optional peer dependency, config declaration merging, `Observe.registerIntegration()`, and event naming.
|
|
32
|
+
|
|
33
|
+
## Quick links to the docs
|
|
34
|
+
|
|
35
|
+
- Get started: https://docs.expo.dev/eas/observe/get-started/
|
|
36
|
+
- Dashboard guide: https://docs.expo.dev/eas/observe/dashboard/
|
|
37
|
+
- Querying with EAS CLI: https://docs.expo.dev/eas/observe/eas-cli/
|
|
38
|
+
- Metrics reference: https://docs.expo.dev/eas/observe/reference/metrics/
|
|
39
|
+
- Expo Router integration: https://docs.expo.dev/eas/observe/integrations/expo-router/
|
|
40
|
+
- React Navigation integration: https://docs.expo.dev/eas/observe/integrations/react-navigation/
|
|
41
|
+
- User-defined events: https://docs.expo.dev/eas/observe/events/
|
|
42
|
+
- Configuration: https://docs.expo.dev/eas/observe/configuration/
|
|
43
|
+
- Third-party integrations: https://docs.expo.dev/eas/observe/integrations/third-party/
|
|
44
|
+
- EAS Update download performance: https://docs.expo.dev/eas/observe/eas-update/
|
|
45
|
+
- Troubleshooting: https://docs.expo.dev/eas/observe/reference/troubleshooting/
|
|
46
|
+
|
|
47
|
+
## Known gaps between the docs and the shipped code
|
|
48
|
+
|
|
49
|
+
Verified against `eas-cli` 21.8.0 and `expo-observe` 57.0.9. Trust this skill's references over the docs on these points, but re-check with `--help` and the installed package before relying on them:
|
|
50
|
+
|
|
51
|
+
- All six CLI commands are on the [Querying with EAS CLI](https://docs.expo.dev/eas/observe/eas-cli/) page. Older doc builds list only four and omit `observe:routes` and `observe:session`.
|
|
52
|
+
- Navigation metric aliases are `nav_cold_ttr`, `nav_warm_ttr`, and `nav_tti`. There are no bare `cold_ttr` / `warm_ttr` aliases in the CLI.
|
|
53
|
+
- Sorting uses `--sort <slowest|fastest|newest|oldest>`. There is no `--order` flag.
|
|
54
|
+
- `ObserveErrorBoundary`, `Observe.reportError`, and `configure({ errorHandlingEnabled })` are exported but undocumented. Observe still has no crash reporting; use Sentry or BugSnag for that.
|
|
55
|
+
|
|
56
|
+
## Submitting Feedback
|
|
57
|
+
If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
|
|
58
|
+
```bash
|
|
59
|
+
npx --yes submit-expo-feedback@latest --category skills --subject "eas-observe" "<actionable feedback>"
|
|
60
|
+
```
|
|
61
|
+
Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
|
|
62
|
+
If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## Examples
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
User: Apply this skill to my current task.
|
|
69
|
+
Assistant: Follow the workflow in this skill, cite limitations, and ask before risky steps.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Limitations
|
|
73
|
+
|
|
74
|
+
- Imported upstream skill; verify credentials, permissions, and safety boundaries before execution.
|
|
75
|
+
- Does not replace environment-specific validation, testing, or maintainer review.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "EAS Observe"
|
|
3
|
+
short_description: "Paid EAS service. Set up expo-observe app metrics and query launch, route, event, and version performance with the EAS CLI"
|
|
4
|
+
default_prompt: "Use $eas-observe to add expo-observe instrumentation (AppMetricsRoot/ObserveRoot, useObserve, ObserveInteractiveMarker, the router integrations, error reporting), query metrics with eas observe:* commands, and interpret cold/warm launch, TTR, and TTI results."
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# EAS Observe metrics — interpretation cheatsheet
|
|
2
|
+
|
|
3
|
+
Quick reference for reading EAS Observe dashboards and CLI output.
|
|
4
|
+
|
|
5
|
+
> Source: https://docs.expo.dev/eas/observe/reference/metrics/ — this is the canonical reference for metrics. Consult this page for the latest guidance, full prose definitions, optimization tips, and rationale.
|
|
6
|
+
|
|
7
|
+
All durations are in seconds. Metric data is retained for a minimum of 60 days. By default, every installation dispatches all of its events; high-volume apps can sample per installation with `configure({ sampleRate })` — see [Sampling](https://docs.expo.dev/eas/observe/configuration/#sampling).
|
|
8
|
+
|
|
9
|
+
## Target thresholds
|
|
10
|
+
|
|
11
|
+
| Metric | Full name | Target | Auto-collected? |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| Cold launch | `expo.app_startup.cold_launch_time` | **< 1.5s** | Yes (native-only — JS code does not affect it) |
|
|
14
|
+
| Warm launch | `expo.app_startup.warm_launch_time` | **< 0.5s** | Yes (OS decides when warm vs cold happens) |
|
|
15
|
+
| Bundle load | `expo.app_startup.bundle_load_time` | **< 0.3s** | Yes (JS load + evaluation, before `runApplication`) |
|
|
16
|
+
| Time to first render (TTR) | `expo.app_startup.ttr` | **< 2s** incl. cold launch | Yes when root is wrapped with `AppMetricsRoot` (SDK 55) / `ObserveRoot` (SDK 56+) |
|
|
17
|
+
| Time to interactive (TTI) | `expo.app_startup.tti` | **< 3s** incl. cold launch | **No** — call `markInteractive()` once the screen is genuinely usable |
|
|
18
|
+
|
|
19
|
+
Both TTR and TTI are measured *from native launch* through the React render, so the cold-launch portion counts against them.
|
|
20
|
+
|
|
21
|
+
## Interpreting TTI events (automatic params)
|
|
22
|
+
|
|
23
|
+
Every TTI event carries automatic params in three groups: frame rate, device state, and network state. Read the frame-rate group to classify *what kind* of slowness you're seeing, then read the device and network groups to decide whether the cause is the code or the conditions.
|
|
24
|
+
|
|
25
|
+
### Frame rate — what kind of slowness
|
|
26
|
+
|
|
27
|
+
| Param | Definition | What it indicates |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `expo.frameRate.slowFrames` | Count of frames ≥ 17ms | Main thread consistently busy during launch (heavy layout, sync bridge calls, too many components rendering) |
|
|
30
|
+
| `expo.frameRate.frozenFrames` | Count of frames ≥ 700ms | Hard freezes. Even one during startup is a serious issue (sync I/O, large JSON parsing, blocking network) |
|
|
31
|
+
| `expo.frameRate.totalDelay` | Total accumulated time (seconds) frames exceeded their target duration | Best single "smoothness" number — compare to TTI |
|
|
32
|
+
|
|
33
|
+
**Diagnostic patterns:**
|
|
34
|
+
|
|
35
|
+
- **High TTI + low totalDelay** → slow but smooth. The launch sequence itself is long. Optimize bundle size, data-fetch waterfalls, initialization chains.
|
|
36
|
+
- **High TTI + high totalDelay + many slowFrames** → main-thread contention. Offload work, simplify the initial render tree.
|
|
37
|
+
- **High TTI + high totalDelay + any frozenFrames** → something is blocking hard. Look for synchronous I/O, large JSON parsing, or blocking network calls.
|
|
38
|
+
|
|
39
|
+
### Device state — is the regression environmental?
|
|
40
|
+
|
|
41
|
+
| Param | Type | What it indicates |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `expo.device.lowPowerMode` | boolean | OS power saver was active (Low Power Mode on iOS, Battery Saver on Android). It throttles CPU, GPU, and background work. A regression that disappears when you filter this out is environmental, not a code change. |
|
|
44
|
+
| `expo.device.thermalState` | `nominal` \| `fair` \| `serious` \| `critical` \| `unknown` | Sustained `serious`/`critical` means the OS is throttling. Startup slows independently of any app change. |
|
|
45
|
+
| `expo.device.batteryLevel` | number, 0–1 | Fractional charge at TTI. Rules out throttling on devices that manage performance aggressively at low charge. Omitted when the OS reports no value. |
|
|
46
|
+
| `expo.device.batteryCharging` | boolean | Charging raises sustained CPU ceilings on iOS and some Android OEMs. Non-charging samples are the more conservative population. |
|
|
47
|
+
|
|
48
|
+
### Network state — is startup network-bound?
|
|
49
|
+
|
|
50
|
+
| Param | Type | What it indicates |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `expo.network.connected` | boolean | If TTI degrades only when `true`, startup is network-bound. If it degrades when `false`, the app does too much before showing cached content. |
|
|
53
|
+
| `expo.network.type` | `wifi` \| `cellular` \| `ethernet` \| `none` \| `other` \| `unknown` | Compare cellular against Wi-Fi. A large gap points to network-bound startup work. VPN traffic reports the underlying transport. The value set is identical on both platforms, so dashboards need no per-platform branching. |
|
|
54
|
+
| `expo.network.isExpensive` | boolean | Both platforms. The OS considers the connection metered (cellular, hotspot). Present only when a network exists. |
|
|
55
|
+
| `expo.network.isConstrained` | boolean | **iOS only.** Low Data Mode is on for this path, so the system defers background transfers. |
|
|
56
|
+
| `expo.network.dataSaverEnabled` | boolean | **Android only.** Data Saver is on. It is the nearest equivalent of Low Data Mode, but process-wide rather than per-path, hence the separate key. |
|
|
57
|
+
|
|
58
|
+
### Network requests — was the network the cause?
|
|
59
|
+
|
|
60
|
+
TTI events summarize the HTTP requests made during launch, from the end of the native launch to the `markInteractive()` call. Traffic is observed automatically — `URLSession` on iOS, `OkHttpClient` on Android, which covers `fetch` — and Observe's own uploads are excluded. All of these are omitted when the window held no requests.
|
|
61
|
+
|
|
62
|
+
| Param | Unit | What it indicates |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `expo.network.requests.count` | count | Requests that finished in the window. A request still in flight when the app became interactive is not counted anywhere in this table. |
|
|
65
|
+
| `expo.network.requests.failed` | count | Errored, returned 4xx/5xx, never got a response, or broke partway through the body. Redirects are not failures. |
|
|
66
|
+
| `expo.network.requests.bytesReceived` / `.bytesSent` | bytes | On-the-wire totals for the window. |
|
|
67
|
+
| `expo.network.requests.totalDuration` | seconds | Sum of every request duration, failures included. Exceeds wall-clock when requests overlap; one timeout contributes the client's full timeout interval. |
|
|
68
|
+
| `expo.network.requests.throughputBytesPerSecond` | bytes/sec | Received bytes over the time bytes were actually moving (union of transfer windows, measured from each first byte). Excludes DNS, connect, server think time, cache hits, and failures. Requests the OS did not clearly identify as network loads are excluded too. Omitted when nothing was received. |
|
|
69
|
+
| `expo.network.requests.slowest.duration` | seconds | The single longest **completed** request. Requests that never produced a response are excluded, since a timeout measures the client's own setting. |
|
|
70
|
+
| `expo.network.requests.slowest.host` | string | Host of that request. |
|
|
71
|
+
| `expo.network.requests.slowest.statusCode` | number | Explains an empty response: `bytesReceived` of 0 is routine on a 304, a problem on a 200. |
|
|
72
|
+
| `expo.network.requests.slowest.timeToFirstByte` | seconds | Includes server processing, so treat it as a proxy for network quality, not a measurement of it. |
|
|
73
|
+
| `expo.network.requests.slowest.bytesReceived` | bytes | Separates "slow because it moved a lot of data" from "slow while idle". |
|
|
74
|
+
|
|
75
|
+
**Diagnostic patterns:**
|
|
76
|
+
|
|
77
|
+
- **`slowest.duration` mostly `timeToFirstByte`** → the server was slow to answer. Optimize the endpoint, or stop blocking startup on it.
|
|
78
|
+
- **Small `timeToFirstByte` + large `bytesReceived`** → the transfer itself was slow. Shrink the payload or defer it.
|
|
79
|
+
- **High `failed` + high `totalDuration`** → the launch burned time on requests that never arrived. Add timeouts and render cached content first.
|
|
80
|
+
- **Low `throughputBytesPerSecond` on `wifi`** → suspect the population, not the code; cross-check `isExpensive` and `isConstrained` / `dataSaverEnabled`.
|
|
81
|
+
|
|
82
|
+
> The summary is bounded by an in-memory ring buffer of the 200 most recent requests. A launch that makes more undercounts, so read these as a sample of a very busy window.
|
|
83
|
+
|
|
84
|
+
### Custom params
|
|
85
|
+
|
|
86
|
+
You can attach your own params to the TTI event, and override the route name it is tagged with. See [`./setup.md`](./setup.md) for the call syntax.
|
|
87
|
+
|
|
88
|
+
## Dispatch caveats
|
|
89
|
+
|
|
90
|
+
- **Debug builds** (native debug OR JS bundle with `__DEV__` = true) do **not** dispatch metrics unless `configure({ dispatchInDebug: true })` is set.
|
|
91
|
+
- The `environment` tag (defaults to `process.env.NODE_ENV`) is metadata only — it does not gate dispatch by itself.
|
|
92
|
+
- Offline events are buffered on-device and flushed when the app backgrounds or `Observe.dispatchEvents()` is called.
|
|
93
|
+
|
|
94
|
+
## Cross-references
|
|
95
|
+
|
|
96
|
+
- Full metric definitions and optimization guidance: https://docs.expo.dev/eas/observe/reference/metrics/
|
|
97
|
+
- Setup steps (`AppMetricsRoot` / `ObserveRoot`, `markInteractive`): see [`./setup.md`](./setup.md).
|
|
98
|
+
- Querying metrics via the EAS CLI: see [`./queries.md`](./queries.md).
|