Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .eas/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build

on:
workflow_dispatch:
inputs:
environment:
type: choice
options:
- development
- preview
- production
required: true

jobs:
build_android:
type: build
params:
profile: ${{ inputs.environment }}
platform: android

build_ios:
type: build
params:
profile: ${{ inputs.environment }}
platform: ios
27 changes: 27 additions & 0 deletions .eas/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Update

on:
workflow_dispatch:
inputs:
environment:
type: choice
options:
- development
- preview
- production
required: true

jobs:
update_android:
type: update
params:
channel: ${{ inputs.environment }}
branch: ${{ inputs.environment }}
platform: android

update_ios:
type: update
params:
channel: ${{ inputs.environment }}
branch: ${{ inputs.environment }}
platform: ios
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
APP_ENV=development
EXPO_PUBLIC_BASE_URL=https://demo.start-ui.com

# OPTIONAL TO OVERRIDE
Expand Down
9 changes: 9 additions & 0 deletions .github/assets/expo-go-main.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: 🔎 Code Quality

env:
EXPO_PUBLIC_API_URL: ${{ vars.API_URL }}
EXPO_PUBLIC_AUTH_URL: ${{ vars.AUTH_URL }}
EXPO_PUBLIC_OPENAPI_URL: ${{ vars.OPENAPI_URL }}
BASE_URL: ${{ vars.BASE_URL }}

on:
push:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/eas-build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: 🔨 EAS build

env:
EXPO_PUBLIC_API_URL: ${{ vars.API_URL }}
EXPO_PUBLIC_AUTH_URL: ${{ vars.AUTH_URL }}
EXPO_PUBLIC_OPENAPI_URL: ${{ vars.OPENAPI_URL }}

on:
push:
branches: [main]
workflow_dispatch:
inputs:
environment:
type: choice
options:
- development
- preview
- production
required: true
description: 'Environment to build'

jobs:
build:
eas-build:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
Expand All @@ -28,8 +31,5 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: 📦 Install dependencies
run: pnpm install

- name: 🚀 Build app
run: eas build --non-interactive
- name: 🚀 Run EAS build
run: pnpm eas:build --environment ${{ inputs.environment }}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: 📱 EAS Preview
name: 📱 EAS PR Preview

env:
EXPO_PUBLIC_API_URL: ${{ vars.API_URL }}
EXPO_PUBLIC_AUTH_URL: ${{ vars.AUTH_URL }}
EXPO_PUBLIC_OPENAPI_URL: ${{ vars.OPENAPI_URL }}
BASE_URL: ${{ vars.BASE_URL }}

on: [pull_request]
jobs:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/eas-update.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: 🚀 EAS update

env:
EXPO_PUBLIC_API_URL: ${{ vars.API_URL }}
EXPO_PUBLIC_AUTH_URL: ${{ vars.AUTH_URL }}
EXPO_PUBLIC_OPENAPI_URL: ${{ vars.OPENAPI_URL }}
name: 🔨 EAS update

on:
push:
branches: [main]
workflow_dispatch:
inputs:
environment:
type: choice
options:
- development
- preview
- production
required: true
description: 'Environment to update'

jobs:
update:
eas-update:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
Expand All @@ -28,8 +31,5 @@ jobs:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: 📦 Install dependencies
run: pnpm install

- name: 🚀 Create update
run: eas update --auto --non-interactive
- name: 🚀 Run EAS update
run: pnpm eas:update --environment ${{ inputs.environment }}
52 changes: 44 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ It represents our team's up-to-date stack that we use when creating native apps

[⚙️ Node.js](https://nodejs.org), [🟦 TypeScript](https://www.typescriptlang.org/), [⚛️ React](https://react.dev/), [📱 React Native](https://reactnative.dev/), [🚀 Expo](https://docs.expo.dev/), [🔐 Better Auth](https://www.better-auth.com/), [🌿 Ficus UI](https://ficus-ui.com/), [🌴 Tanstack Form](https://tanstack.com/form/), [🌴 Tanstack Query](https://tanstack.com/query/), [👋 Hey API](https://heyapi.dev/)


# Test with Expo Go

<p align="center">
<img src=".github/assets/expo-go-main.svg" alt="Expo Go Main" style="max-width: 256px; max-height: 256px;" />
</p>


# Requirements

* [Node.js](https://nodejs.org) >= 22
Expand All @@ -31,13 +39,17 @@ cp .vscode/settings.example.json .vscode/settings.json # (Optionnal) Setup your
pnpm install # Install dependencies
```

> [!TIP]
> If your expo project is setup with Expo environment variables, you can run `eas env:pull {environment}` to generate .env.example with environment configuration

## Environment variables


> [!TIP]
> Using Expo Go, local development urls should not be `localhost`, use public IP instead

```bash
APP_ENV # The key to identify application environment on expo
EXPO_PUBLIC_BASE_URL # Base URL of your server, usefull if you are using Start UI [web]

# OPTIONAL TO OVERRIDE
Expand All @@ -62,13 +74,19 @@ useQuery(api.bookGetByIdOptions({ path: { id: props.bookId } }));

# Run


### Expo Go

```bash
pnpm dev
```

### EAS development build

You should have a development build on Expo, then install it in the wanted device/simulator and run
```bash
pnpm start
```

### Local build

```bash
Expand Down Expand Up @@ -108,22 +126,40 @@ If you want to use the same set of custom duotone icons that Start UI is already
> [!WARNING]
> All svg icons should be svg files prefixed by `icon-` (example: `icon-externel-link`) with **square size** and **filled with `#000` color** (will be replaced by `currentColor`).

# EAS Preview

To be able to use previews on PR, you have to setup your project with EAS
# EAS

## Installation

> [!TIP]
> To be able to use previews on PR, you have to setup your project with EAS

1. Setup Expo access token
* Create it: https://expo.dev/accounts/{account}/settings/access-tokens
* Add it as GitHub repository secrets: https://github.com/xxx/xxx/settings/secrets/actions
2. Add GitHub repository variables: https://github.com/xxx/xxx/settings/variables/actions
* `API_URL`
* `AUTH_URL`
* `OPENAPI_URL`
* `BASE_URL`
3. Setup Expo project: https://expo.dev/
* Create your project
* Get project's id
* Set as `EXPO_PROJECT_ID` in `app.config.ts`
* Set as `EAS_PROJECT_ID` in `app.config.ts`
* Setup environment variables for each environment :
* `APP_ENV`
* `EXPO_PUBLIC_BASE_URL`
4. Setup eas
* `eas login`
* `eas init --id {projectid}`
* `eas update:configure`
* `eas update:configure`

## Build / Update

You may should run locally `eas build --profile development --platform all` first to setup credentials

```bash
pnpm eas:build # Create new build for iOS and Android

pnpm eas:update # Create new update for iOS and Android
```

> [!TIP]
> Each command have a related Github workflow to be run from Github interface
Loading
Loading