From e3738c3e602a1df6f32c58f88eec2ac1bd54e112 Mon Sep 17 00:00:00 2001 From: paribaker <58012003+paribaker@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:03:49 +0000 Subject: [PATCH 1/2] added mobile to docker --- .../clients/mobile/react-native/README.md | 349 ++++-------------- .../clients/mobile/react-native/package.json | 1 + .../compose/mobile/Dockerfile | 10 + .../docker-compose.yaml | 20 + 4 files changed, 111 insertions(+), 269 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/compose/mobile/Dockerfile diff --git a/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md b/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md index e9069cf94..315b9683a 100644 --- a/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md +++ b/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md @@ -1,18 +1,18 @@ ## Getting Started -This app is bootstrapped with the TN-Bootsrapper, it uses Expo as a wrapper framework around React Native. Install and run with **Node v20**. +This app is bootstrapped with the TN-Bootsrapper and uses Expo as a wrapper framework around React Native. Install and run with **Node v20**. ## Installing and Running -FIRST: You must follow ALL of the "Configuration" steps below. Once configured, you can install the NodeJS dependencies and run the app. +**First:** Follow all "Configuration" steps below. Once configured, install NodeJS dependencies and run the app. ```bash cd mobile -node install --include=dev # Install NodeJS dependencies +npm install # Install NodeJS dependencies npm run start # Source env variables and run dev server ``` -Alternatively, if you want to use expo run command: +Alternatively, to use the Expo run command: ```bash source .env && npx expo start @@ -20,313 +20,124 @@ source .env && npx expo start ## Configuration -After running the bootsrapper a mobile directory is created the following steps are needed to run and deploy the app +After running the bootsrapper, a `mobile` directory is created. The following steps are needed to run and deploy the app. -### First, set up an Expo account +### 1. Set up an Expo account -Go to [expo.dev](https://expo.dev/), and set up an Expo organization. +Go to [expo.dev](https://expo.dev/) and set up an Expo organization. -Select "Access Tokens" from the left sidebar: - -1. Create an Expo Robot named, e.g. `CI/CD` -2. Click "+ Creat Token" to create an API key for the robot named e.g. `GH_ACTIONS` -3. Now go to your GitHub repo settings. Create a Repository Secret with the name `EXPO_TOKEN`, paste the API key you generated as the value, and save it. -4. **Create an EAS Project** - -Back in Expo, click on "Projects" in the sidebar and create a new project. Give it the same name as your app. - -You will then be presented with these commands. Copy and run them in the `./mobile` directory: +- Create an Expo Robot (e.g., `CI/CD`) +- Create an API key for the robot (e.g., `GH_ACTIONS`) +- In your GitHub repo, add a Repository Secret named `EXPO_TOKEN` with the API key as the value +- Create an EAS Project in Expo and initialize it in the `./mobile` directory: ```bash npm install --global eas-cli eas init --id {eas_uuid} ``` -NOTE: This may require setting up Rollbar and Sentry first. If so, follow the instructions below and then come back to this. - -### Set Up Error Logging and Crash Analytics - -Set up a [Rollbar](https://rollbar.com/) instance. We recommend setting up a single Heroku Rollbar add-on instance that is attached to the production environment. - -In your Rollbar account, create a project for each environment and retrieve the `post_client_token`. - -Set up [Sentry](https://sentry.io/) for crash analytics and additional error logs. We use Sentry because it is pre-built to integrate with Expo. - -Create a Sentry account and set up the projects for the various environments. This can also be attached to the prod instance on Heroku. - -Then go to `Settings` > `Developer Settings` > `Auth Tokens` and create a new token that you'll use in `Expo` - -Retrieve: - -1. API Key -2. Sentry DSN for each project -3. project-name - -You should set the `SENTRY_AUTH_TOKEN` in Expo under `Secrets`. +### 2. Set Up Error Logging and Crash Analytics -### Set Environment Variables +- Set up [Rollbar](https://rollbar.com/) and [Sentry](https://sentry.io/) for error/crash analytics. +- Retrieve API keys and DSNs for each environment. +- Set the `SENTRY_AUTH_TOKEN` in Expo under `Secrets`. -For local run set environment variables in .env file (from [.env.example](./.env.example)) +### 3. Set Environment Variables -For builds, environment variables should be set in [eas.json](./eas.json) +- For local runs, set environment variables in the `.env` file (see `.env.example`). +- For builds, set environment variables in [eas.json](./eas.json). -#### Use the helper script to enter variables +#### Helper Script -You can fill in `eas.json` and `app.config.js` by hand, but we have also written a script to make it easier to quickly update those files with your variable values. - -Fill in [eas.vars.template.txt](./resources/eas.vars.template.txt) and [app.config.vars.template.txt](./resources/app.config.vars.template.txt). - -Then run these commands using the `setup_mobile_config.sh` helper script: +Fill in the provided templates and run: ```bash . scripts/setup_mobile_config.sh eas.json /resources/eas.vars.txt - . scripts/setup_mobile_config.sh app.config.js /resources/app.config.vars.txt ``` -### EAS Project Configuration - -In [app.config.js](./app.config.js) set the configuration variables - -- owner: this should match the organization in expo -- slug: this should match the slug in expo -- add expo id to the extras obj -- updates: the url should contain the id of the expo app -- ios: bundleIdentifier: this should be created in the apple developer account -- android: package: this should be created in the google play developer console - -To configure non-interactive builds for the CI/CD pipeline you must run BUT you will be doing that after the next step: - -`eas credentials` - -The recommended approach for managing credentials is through Expo, in the selections you should see this as an option - -| Build Credentials: Manage everything needed to build your project -| All: Set up all the required credentials to build your project - -### Connecting to a Backend in Development - -Since Expo runs on a separate device, it cannot reach localhost on your computer, so you must use your computer's LAN **IP address** instead of localhost. - -OR, you can use a web proxy like [ngrok](https://ngrok.com/): - -1. Download and install ngrok -2. Set up ngrok auth token (request an account from William Huster) -3. run ngrok `~/.ngrok http 8000 --subdomain ` -4. add your new subomain to the `.env` IN MOBILE DIR as BACKEND_DEV_SERVER -5. append your new subdomain to the `.env` in ROOT DIR to ALLOW_HOSTS e.g `ALLOW_HOSTS=[localhost:8080,.ngrok.io]` - -## Set Up for the Apple App Store - -Head over to the (apple developer account)[https://developer.apple.com/account/resources/identifiers/bundleId/add/bundle] and set up a new bundle identifier <-- Only set up the bundle identifier not a complete app yet - -`eas credentials` - -| Build Credentials: Manage everything needed to build your project -| All: Set up all the required credentials to build your project - -Return to the menu and also set up AppStore Connect API Key - -| App Store Connect: Manage your API Key - -If you need Push Notifications as well - -| Push Notifications: Manage your Apple Push Notifications Key - -Configure the submit environment in the [eas.json](./eas.json) - -- ascAppId: this is a random uid that you will set when creating the app - -For internal builds to pass you must first register at least one testing device using - -`eas device:create` - -Select the option for URL and send the URL to each user who wants to test a build. - -Recreate the provisioning profile <- **this step is required in order for the user to be able to install the app** - -`eas credentials` - -Rebuild the app <- **this step is required in order for the user to be able to install the app** - -You must run a first time production build to set up appstore connect keys to be managed by Expo - -## Set Up for the Google Play Store - -There is no required configuration for google in the eas.json however you must build and upload the apk for the first time before being able to automate. - -### Deployments, Environments & Submissions +### 4. EAS Project Configuration -- Each PR will create a new _review_ app both in **expo** & **heroku** -- Mobile _review_ app will automatically have the backend url set to its own backend-url in the form of `https://app-name-prnumber.herokuapp.com` -- Each merge into main will trigger a release in the staging channel of expo & automatically deploy a new staging backend to heroku. +Edit [app.config.js](./app.config.js) with your Expo organization, slug, app IDs, and bundle identifiers. -#### Setting Env Vars +### 5. Apple App Store & Google Play Store Setup -**Local** +- Follow Expo and EAS documentation for credentials and provisioning profiles. +- Use `eas device:create` to register testing devices for internal builds. -_expo go_ -To set env variables locally you may use the .env file and import the variables using `@env` eg in [Config.js](./Config.js), these variables are sourced in the npm run script -If you need to use environment variables in the app.config.js you must declare the variables in the npm run script as well as the expo run occurs in a separate process +### 6. Connecting to a Backend in Development -_development build_ -the variables for this environment are set up in the eas.json under the development profile +- Use your computer's LAN IP address in `.env` for `EXPO_PUBLIC_BACKEND_SERVER_URL`. +- Or use a tool like [ngrok](https://ngrok.com/) to expose your backend. -**Staging** +--- -To set env variables you should use the [eas.json](./eas.json) and [app.config.js](./app.config.js) although it is possible to define variables in a .env (eg in the CI yaml files) due to inconsistencies while testing I consider this to be the best approach. -Staging builds are created automatically when merging into the main branch you can also build manually +## Running the Mobile App in Docker -`eas build --platform all --profile staging --non-interactive` +When running the Expo mobile app inside Docker, the Metro bundler and development server will be started for you by Docker. However, **starting the iOS Simulator or Android Emulator is a separate step** and must be done on your host machine. -**Prod** +### iOS Simulator -Prod includes testflight and teststore testing on these should not pollute the prod environment and should not be treated as an internal testing env. +1. **Start the iOS Simulator** + Open Xcode, or run: + ```sh + open -a Simulator + ``` -To deploy to the test stores you can use the two GH actions: -You must remember to update the version number in [app.config.js](./app.config.js) +2. **Install the app** + If you are using a custom dev client, run: + ```sh + npx expo run:ios + ``` + This will build and install the app on the simulator. -[expo-teststore-build-android.yml](/{{ cookiecutter.project_slug }}/.github/workflows/expo-teststore-build-android.yml) -[expo-teststore-build-ios.yml](/{{ cookiecutter.project_slug }}/.github/workflows/expo-teststore-build-ios.yml) +### Android Emulator -In case of a bug you can also use expo-updates to quickly push a temporary fix using: +1. **Start the Android Emulator** + Open Android Studio and start an emulator, or run: + ```sh + emulator -avd + ``` -[expo-teststore-build-ios.yml](/{{ cookiecutter.project_slug }}/.github/workflows/expo-teststore-build-ios.yml) +2. **Install the app** + If you are using a custom dev client, run: + ```sh + npx expo run:android + ``` + This will build and install the app on the emulator. -This is only temporary and should be resolved as soon as possible, the update is only available to users with the app already any new downloads will need another push to update (users will also have to close and reopen the app). +### Connecting to the Metro Bundler -#### Native Builds VS Expo Runs +- The Metro bundler runs inside Docker and is exposed on port `8081`. +- The simulator/emulator must be able to access your host's IP address on port `8081`. +- When prompted for a Metro server address in Expo Go or your dev client, use your host machine's IP address (e.g., `http://:8081`). -##### Expo Runs +**Notes:** +- Expo cannot start the simulator/emulator for you when running in Docker. You must start it manually as described above. +- If you encounter connection issues, ensure your firewall allows traffic on port `8081` and that you are using the correct network mode (LAN or Tunnel) for your development setup. -There are two types of expo runs, the first is during local development, when we start our app with `npm run start` this will run the app in expo go, the second is when we release an update with `eas update`. - -We currently use `expo update` when building our staging app to get a quick and easy to use link for testing _review apps_ - -There are certain situations when this may not be possible for example we are installing a package that does not currently have an expo extension (revenue cat for in-app purchases) or we are using a native package that expo does not have access to (face id) - -When merging into main we deploy a new staging version that can be run in expo we also build a staging version of the app as a stand-alone native build that can be ran on a device. Staging versions will point to he staging backend defined in the [eas.json](./eas.json) - -Most internal testing should be sufficient on the expo staging build however you can also provide the link for testing with the native build. When installed this build will replace the version on your device. - -To test on expo users must be invited to the expo organization -To test a native staging build users will have to install a developer profile that registers their device UUID (this is only for apple devices) - -Expo makes it easy to register UUID's by following this step: - -`eas device:create` - -Select the option for URL and send the URL to each user who wants to test a staging build. Because the UUID is stored in the staging build the user must register before the build, otherwise you will have to rebuild the staging env. - -Lastly you can test any of the internal distribution builds (in other words development, staging) directly on browserstack - -### Update certificates (IOS yearly) - -This needs to be done yearly or builds will fail (live apps would be fine). -We should get an email from Apple when this is coming up - -From the `mobile/` folder run: - -`eas credentials` - -1. select platform (probably IOS) -1. select `production` -1. log in -1. `Build Credentials` -1. `Distribution Certificate: Add a new one to your account` -1. New? `yes` -1. Use? `yes` -1. New Profile? Optional, but `yes` -1. visit the project dashboard at `https://expo.dev/` -1. Go to `Credentials` in the nav and see that you now have two, the old and the new. -1. Download the old one before deleting -1. Once you verify that builds are still working, you can delete your backup copy - -#### Design system - -Use `tailwind.config.js` to define the styles you're going to use in the app. - -#### Important info & resources - -- iOS Appstore connect api key, signing cert and provisioning profiles are managed via expo (with fastlane) - -When running locally NODE_ENV='development' -When a version is published or updated NODE_ENV='production' - -### Configuration and env variables - -All config variables for the various environments come from .env file in mobile directory -Env variables defined in eas.json are not available to npx run start (local) -When using environment variables that need to be initialized as part of the app.config.js you must add them to the .env file and the run command in the package.json (see sentry for an example) - -### Running the project - -1. Install deps with `yarn` - -```bash -cd app && yarn -``` - -3. Run the project and pick your platform from the console options - -```bash -yarn start -``` +--- ## Tech Stack -- [Expo SDK](https://github.com/expo/expo) - a set of tools and services built around React Native and native platforms. -- [React Navigation (v6)](https://github.com/react-navigation/react-navigation) - routing and navigation for React Native apps. -- [Navio](https://github.com/kanzitelli/rn-navio) - universal navigation library for React Native. Built on top of [React Navigation](https://github.com/react-navigation/react-navigation). -- [NativeWind](https://www.nativewind.dev/) - Bring Tailwindcss syntax to React Native -- [Reanimated 2](https://github.com/software-mansion/react-native-reanimated) - React Native's Animated library reimplemented. -- [Zustand](https://github.com/pmndrs/zustand) - Bear necessities for state management in React -- [Flash List](https://github.com/Shopify/flash-list) - a better list for React Native (by Shopify). -- [React Native Gesture Handler](https://github.com/kmagiera/react-native-gesture-handler) - native touches and gesture system for React Native. -- [TN Models FP](https://github.com/thinknimble/tn-models-fp) - package developed specially to work with TN python backends from a client. -- [Tanstack Query](https://github.com/TanStack/query) - server state management - -#### Process Testing & Development - -- Each PR will create a new _review_ app both in **expo** & **heroku** -- Mobile _review_ app will automatically have the backend url set to its own backend-url in the form of `https://app-name-prnumber.herokuapp.com` -- Each merge into main will trigger a release in the staging channel of expo & automatically deploy a new staging backend to heroku. - -#### Installing the staging build - -Each merge to main builds a new staging app that you may install, to do so you must make sure all testing devices are registerted - -`eas device:create` - -will create a new link to register a device - -#### Appstores - -At the moment we only have one application in the future we will add a separate staging application - -- To deploy to each store you have to manually run the GH release action (for each platform) -- Each deploy to test flight and android test store will auto increment the version (patch version for iOS) we can decide how that will work later. - -Run these workflow's manually to deploy and submit the app to the appstore - -_expo-teststore-build-android.yml_ -_expo-teststore-build-ios.yml_ - -Run this workflow to deploy an emergency code related bugfix - -expo-emergency-prod-update.yml - -#### Important note about custom native modules and expo eject - -We can easily use our own native or non supported RN pacakges by checking if we are running an expo build or not, these will only work in expo builds not expo go. -When building for local testing/development we use the alternative builds in our eas.json -Recently Expo has changed the `expo eject` command for `expo pre-build` this will create the iOS and Android folders and allow you to run your project in xcode or android studio as well you will need to activate your .env file since some vars are supplied from there. +- [Expo SDK](https://github.com/expo/expo) +- [React Navigation (v6)](https://github.com/react-navigation/react-navigation) +- [Navio](https://github.com/kanzitelli/rn-navio) +- [NativeWind](https://www.nativewind.dev/) +- [Reanimated 2](https://github.com/software-mansion/react-native-reanimated) +- [Zustand](https://github.com/pmndrs/zustand) +- [Flash List](https://github.com/Shopify/flash-list) +- [React Native Gesture Handler](https://github.com/kmagiera/react-native-gesture-handler) +- [TN Models FP](https://github.com/thinknimble/tn-models-fp) +- [Tanstack Query](https://github.com/TanStack/query) -You can accomplish this with `npm run prebuild:local` this will ensure that your `.env` file is sourced! +--- -Expo will automatically change your package.json and add/remove/change the following +## Additional Notes -- `"main"` entry will be removed -- `"start"`: `"expo start --dev-client"` will change to this <---- +- Use `tailwind.config.js` to define app styles. +- iOS Appstore connect API key, signing cert, and provisioning profiles are managed via Expo. +- All config variables for the various environments come from the `.env` file in the mobile directory. +- For native builds, use `npm run prebuild:local` to ensure your `.env` file is sourced. -therefore when running prebuild ensure not to commit these changes! +--- \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/clients/mobile/react-native/package.json b/{{cookiecutter.project_slug}}/clients/mobile/react-native/package.json index 9114f5803..6a7de01ce 100644 --- a/{{cookiecutter.project_slug}}/clients/mobile/react-native/package.json +++ b/{{cookiecutter.project_slug}}/clients/mobile/react-native/package.json @@ -7,6 +7,7 @@ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "npm run start:nc", + "start:docker": "expo start -c --lan --dev-client", "start:nc": "expo start -c --go", "start:prod": "expo start --no-dev --minify", "start:android": "expo start --android", diff --git a/{{cookiecutter.project_slug}}/compose/mobile/Dockerfile b/{{cookiecutter.project_slug}}/compose/mobile/Dockerfile new file mode 100644 index 000000000..d22d2625e --- /dev/null +++ b/{{cookiecutter.project_slug}}/compose/mobile/Dockerfile @@ -0,0 +1,10 @@ +FROM node:18-alpine + +WORKDIR /app/mobile + + +COPY ./mobile/package.json /app/mobile/package.json +RUN npm i + +CMD ["npm", "run", "start:docker"] + diff --git a/{{cookiecutter.project_slug}}/docker-compose.yaml b/{{cookiecutter.project_slug}}/docker-compose.yaml index 9d838f18c..8130e0656 100644 --- a/{{cookiecutter.project_slug}}/docker-compose.yaml +++ b/{{cookiecutter.project_slug}}/docker-compose.yaml @@ -58,3 +58,23 @@ services: {% if cookiecutter.client_app == 'React' %} - VITE_CACHE_DIR=./vite {% endif %} + + {% if cookiecutter.include_mobile %} + mobile: + container_name: mobile + build: + context: . + dockerfile: ./compose/mobile/Dockerfile + volumes: + - ".:/app" + # This line avoids copying local node_modules folder to the Docker container, and uses the ones installed during build + - "/app/mobile/node_modules" + ports: + - "8081:8081" + #- "49153:49153" + environment: + - CHOKIDAR_USEPOLLING=true + - EXPO_TOKEN=true + - VITE_CACHE_DIR=./vite + {% endif %} + From b3fb9d427dca399e59ee393450c478e9185280f6 Mon Sep 17 00:00:00 2001 From: William Huster Date: Wed, 18 Feb 2026 22:18:10 +0000 Subject: [PATCH 2/2] Align node versions to 22.x (#462) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem `feature/docker-mobile` introduced a mobile Docker image pinned to Node 18, while most of the repository and template CI paths were already on Node 22 and mobile docs referenced Node 20. This created version drift across local development, Docker, CI, and generated template projects. From a developer perspective, this mismatch can produce inconsistent install/lint/build behavior depending on where commands run (host machine vs Docker vs GitHub Actions), and it increases maintenance cost when troubleshooting environment-specific issues. ## Root Cause Node runtime declarations were maintained in multiple places (Dockerfiles, GitHub workflows, docs, template engine constraints, and local GitHub action runtime metadata), and those references evolved independently over time. ## Fix This PR aligns runtime declarations to a single canonical target of **Node 22.x** for project/tooling execution, and removes stale/deprecated runtime references: - Updated mobile Docker image to `node:22-alpine`. - Standardized `actions/setup-node` references to `22.x` where mixed formats (`22`, `'22'`, `22.x`) were present. - Updated template mobile README from Node 20 guidance to Node 22 guidance. - Normalized template root engine constraints from `22.*.*`/`10.*.*` to `22.x`/`10.x`. - Updated local JavaScript GitHub Action runtime from `node16` to `node20` (required because GitHub Actions JS runtimes are versioned separately from project runtime and `node16` is deprecated). ## Validation Ran the following checks in the worktree: - `UV_CACHE_DIR=.uv-cache uv run ruff check .` ✅ - `UV_CACHE_DIR=.uv-cache uv run pytest tests/test_cookiecutter_generation.py` ✅ (`7 passed, 1 skipped`) - Repo-wide grep audit for stale references (`node:18`, `node-version: 18/20`, `Node v20`, `using: 'node16'`) ✅ no matches ## Compatibility Notes / Risks The template web lockfile currently includes at least one dependency constraint requiring `^20.19.0 || >=22.12.0`. Using `22.x` remains correct, but CI/dev images should not pin to early Node 22 patch versions lower than `22.12.0`. ## Scope Only Node version alignment files were changed (9 files total), with no application logic changes. --- .github/actions/upload-to-google-docs/action.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/linting.yml | 2 +- .github/workflows/summary.yml | 2 +- .../.github/workflows/linting.yml | 2 +- .../.github/workflows/playwright.yml | 2 +- .../clients/mobile/react-native/README.md | 12 ++++++------ .../compose/mobile/Dockerfile | 3 +-- {{cookiecutter.project_slug}}/package.json | 4 ++-- 9 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/actions/upload-to-google-docs/action.yml b/.github/actions/upload-to-google-docs/action.yml index e56a0144b..d4c2ea436 100644 --- a/.github/actions/upload-to-google-docs/action.yml +++ b/.github/actions/upload-to-google-docs/action.yml @@ -22,5 +22,5 @@ outputs: webViewLink: description: 'A link to view the document in the browser.' runs: - using: 'node16' + using: 'node20' main: 'index.js' diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ae0aa52cd..05629e031 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -57,7 +57,7 @@ jobs: path: my_project/ - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 22.x cache: 'npm' cache-dependency-path: ./my_project/client/package-lock.json - name: 📦 Install frontend dependencies diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 6753ea3d0..4c289379f 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -84,7 +84,7 @@ jobs: uv run cookiecutter . --config-file $config_file --no-input -f - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 22.x - name: 📦 Install dependencies env: NPM_CONFIG_PRODUCTION: false diff --git a/.github/workflows/summary.yml b/.github/workflows/summary.yml index 438c5102d..b57169a27 100644 --- a/.github/workflows/summary.yml +++ b/.github/workflows/summary.yml @@ -53,7 +53,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '22' + node-version: 22.x - name: Install dependencies run: npm install @actions/core googleapis diff --git a/{{cookiecutter.project_slug}}/.github/workflows/linting.yml b/{{cookiecutter.project_slug}}/.github/workflows/linting.yml index ffdba8093..a7eac2f6d 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/linting.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/linting.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 22.x - name: 📦 Install dependencies env: NPM_CONFIG_PRODUCTION: false diff --git a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml index 6d707a915..8e13acfa0 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml @@ -21,7 +21,7 @@ jobs: ref: {{ "${{ github.event.deployment.sha || github.ref }}" }} - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 22.x cache: 'npm' cache-dependency-path: ./client/package-lock.json - name: Install dependencies diff --git a/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md b/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md index 315b9683a..12b7e6f93 100644 --- a/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md +++ b/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md @@ -1,6 +1,6 @@ ## Getting Started -This app is bootstrapped with the TN-Bootsrapper and uses Expo as a wrapper framework around React Native. Install and run with **Node v20**. +This app is bootstrapped with the TN-Bootsrapper and uses Expo as a wrapper framework around React Native. Install and run with **Node v22**. ## Installing and Running @@ -78,13 +78,13 @@ When running the Expo mobile app inside Docker, the Metro bundler and developmen ### iOS Simulator -1. **Start the iOS Simulator** +1. **Start the iOS Simulator** Open Xcode, or run: ```sh open -a Simulator ``` -2. **Install the app** +2. **Install the app** If you are using a custom dev client, run: ```sh npx expo run:ios @@ -93,13 +93,13 @@ When running the Expo mobile app inside Docker, the Metro bundler and developmen ### Android Emulator -1. **Start the Android Emulator** +1. **Start the Android Emulator** Open Android Studio and start an emulator, or run: ```sh emulator -avd ``` -2. **Install the app** +2. **Install the app** If you are using a custom dev client, run: ```sh npx expo run:android @@ -140,4 +140,4 @@ When running the Expo mobile app inside Docker, the Metro bundler and developmen - All config variables for the various environments come from the `.env` file in the mobile directory. - For native builds, use `npm run prebuild:local` to ensure your `.env` file is sourced. ---- \ No newline at end of file +--- diff --git a/{{cookiecutter.project_slug}}/compose/mobile/Dockerfile b/{{cookiecutter.project_slug}}/compose/mobile/Dockerfile index d22d2625e..e64402fe2 100644 --- a/{{cookiecutter.project_slug}}/compose/mobile/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/mobile/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:22-alpine WORKDIR /app/mobile @@ -7,4 +7,3 @@ COPY ./mobile/package.json /app/mobile/package.json RUN npm i CMD ["npm", "run", "start:docker"] - diff --git a/{{cookiecutter.project_slug}}/package.json b/{{cookiecutter.project_slug}}/package.json index ddee92190..775e505bf 100644 --- a/{{cookiecutter.project_slug}}/package.json +++ b/{{cookiecutter.project_slug}}/package.json @@ -4,8 +4,8 @@ "heroku-postbuild": "cd client && npm run build" }, "engines": { - "node": "22.*.*", - "npm": "10.*.*" + "node": "22.x", + "npm": "10.x" }, "cacheDirectories": [ "client/node_modules",