How expo/examples works
Project Type and Purpose
• This is an open-source monorepo hosting dozens of standalone “Expo Example” projects.
• Its purpose is to provide easy, ready-to-run React Native (Expo) templates demonstrating individual features or integrations (e.g., with-apollo, with-aws-storage-upload, with-nextjs, etc.).
• It also includes CI workflows for previewing examples and automating dependency upgrades.
File-Structure Analysis
• Top-level folders and files:
• .github/: GitHub Actions workflows (preview.yml, upgrade.yml) and issue templates.
• .all-contributorsrc, contributing.md, README.md: repo metadata, contribution guide, central README.
• A set of peer folders at root (blank/, stickersmash/, with-*), each representing one example with its own README.md, package.json, source code and assets.
• Misc scripts: upgrade-dependencies.sh.
• Patterns:
• Monorepo of isolated sample apps (no shared code at runtime).
• Each example is a self-contained Node project using Expo.
• CI is decoupled: GitHub Actions trigger preview deployments and dependency upgrades.
README Insights
• Describes the repo as “Easy example for using features, libraries, and other integrations with the Expo SDK.”
• Shows how to consume an example via the create-expo CLI (e.g., npx create-expo ./my-app --example with-typescript).
a. Main Components
• GitHub Repository (examples monorepo)
• Example Projects (each folder under root)
• Expo CLI (create-expo)
• Node/NPM (package management)
• GitHub Actions (CI workflows: preview, upgrade)
• Contributors & Users (developers)
b. Relationships & Interactions
• User invokes Expo CLI → fetches a specific example folder from the GitHub repo → initializes a new local project.
• CI workflows watch the repo → on PR pushes run preview builds (deploy to Expo Dev) → upgrade workflow runs upgrade-dependencies.sh.
• Contributors fork & clone repo → add/update examples → open PRs → metadata files (contributing.md, .all-contributorsrc) coordinate contributions.
c. Architectural Patterns / Design Principles
• Monorepo structure: independent example modules alongside shared root-level CI and docs.
• Template-driven generation: each example serves as a template for create-expo.
• Minimal coupling: examples do not share runtime code, reducing blast radius when upgrading Expo SDK.
d. Key Technologies
• Expo SDK & CLI
• React / React Native
• Node.js & npm
• GitHub Actions
• YAML for workflows
• Shell scripting (upgrade-dependencies.sh)