2026-07-26 01:58:22 +02:00
2026-07-30 02:02:26 +02:00
2026-09-07 01:53:49 +02:00
2026-10-29 21:10:10 +01:00
2026-07-30 02:23:38 +02:00
2026-07-30 02:24:11 +02:00
2024-08-12 20:43:10 +02:00
2026-10-29 21:09:52 +01:00
2026-09-07 01:53:49 +02:00
2026-07-30 02:25:29 +02:00
2026-07-30 02:25:29 +02:00
2026-10-29 21:09:52 +01:00

cnapp

The mobile app for Chateau Neuf using React and Expo.

📚 Expo Documentation

Install

Use mise to install Node, Java and the Android SDK command-line tools.

mise trust
mise install
npm install
prek install
cp env-example .env.local

Scripts

  • npm run start - Start Expo development server on port 19001
  • npm run android - Run app in Android emulator
  • npm run ios - Run app in iOS simulator (requires macOS)
  • npm run web - Run app in web browser
  • npm run lint - Check code with ESLint
  • npm run format - Fix code formatting with ESLint
  • npm run check-types - Run TypeScript type checking
  • npm test - Run the test suite
  • npm run test:watch - Run the test suite in watch mode

Development

This app uses native functionality that isn't supported by Expo Go, so you need a development build compiled from source. Follow Expo's local development setup guide for your platform, then build and run once (see below). After that, just start the dev server and open the app on your device or simulator:

npm run start

Remote build caching is enabled (buildCacheProvider in app.json): when you're logged in to EAS (npx eas-cli login) and a member of the neuf organization, npm run android/ios download a cached build if the native fingerprint is unchanged, and upload new local builds for others to reuse. Without a login they just build locally.

Demo users

Dev builds accept three fake users (defined in src/api.ts) so you can preview the membership screens without a real account. They are valid with any password:

Username State
nonmember Not a member, no membership history
member Valid standard membership, expires 2099-08-01
volunteer Same membership as member, but flagged as a volunteer

They only work via npm run start/android/ios, not in EAS preview or production builds. Only login and fetching user data are faked, so buying a membership or deleting the account will fail against the real API.

Android

mise install provides the Android SDK (the android CLI for managing the SDK, emulators and devices).

Next, install platform-tools (required for adb):

android sdk install platform-tools

Enable USB debugging or wireless debugging on a connected device, or start an emulator (android emulator start), then:

npm run android

iOS (requires macOS)

Install Xcode, then run on the Simulator or a connected device:

npm run ios

Upgrading dependencies

Many packages (expo-*, react-native, and more) are versioned in lockstep with the Expo SDK. Check them with npx expo install --check and upgrade with npx expo install --fix instead of npm update.

Pre-commit hooks

Git hooks are managed with prek (installed by mise install) and configured in prek.toml. Enable them with:

prek install

Commits then only succeed if linting, type checking and the related tests pass. Run all hooks against the whole repo with:

prek run --all-files

History

This is a fork of dusken-client with some history, code and binary blobs related to React Native functionality filtered out before commit 7f6b2c21.

S
Description
2024 - d.d Rewrite av Chateau Neuf appen for iOS og Android.
Readme
2.9 MiB
0 Stars 9 Watchers 0 Forks
Languages
TypeScript 96.8%
JavaScript 3.2%