cnapp
The mobile app for Chateau Neuf using React and Expo.
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 19001npm run android- Run app in Android emulatornpm run ios- Run app in iOS simulator (requires macOS)npm run web- Run app in web browsernpm run lint- Check code with ESLintnpm run format- Fix code formatting with ESLintnpm run check-types- Run TypeScript type checkingnpm test- Run the test suitenpm 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
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.
TODO
- add functionality needed to pass new store requirements
- privacy policy
- delete my account
- ???
- upload source maps to Bugsink so release-build stack traces are symbolicated (until then
they're minified): create an auth token in Bugsink and set
SENTRY_AUTH_TOKENas an EAS secret — the Sentry plugin config inapp.json(url/organization/project) is already set up for the upload. Needs Bugsink ≥ 2.0.14; verify the project slug in Bugsink matchescnapp - test in ios emulator? (
npm run ios, requires macOS) - characters in the password input field are invisible
- use Expo Application Services to build and submit app to stores
- follow-ups from the Expo SDK 54 upgrade:
- try the React Compiler (enabled by
default in new SDK 54 projects, opt-in for existing ones via
"experiments": { "reactCompiler": true }inapp.json) - add an iOS 26 liquid glass icon: a
.iconfile made with Apple's Icon Composer, referenced fromios.icon(old icon remains as fallback for older iOS); optionally play withexpo-glass-effect - consider remote build caching
(now stable) so
npm run android/ioscan download a cached build instead of compiling locally when the native fingerprint is unchanged
- try the React Compiler (enabled by
default in new SDK 54 projects, opt-in for existing ones via
- follow-ups from the Expo SDK 56 upgrade:
- try
@expo/ui, production-ready as of SDK 56: real SwiftUI / Jetpack Compose components that could back the homegrown ones insrc/components/and finally retirereact-native-simple-radio-button - verify on iOS: the minimum target jumped to iOS 16.4 (from 15.1), dropping the iPhone 7, 6s and SE (1st gen). Building now requires Xcode 26.4 on macOS 13.4+
- try
- add Apple Pay for membership
payments: either natively in the payment sheet (register the merchant ID
merchant.no.neuf.chateau+ Apple Pay certificate, setmerchantIdentifierin the@stripe/stripe-react-nativeplugin config, passapplePaytoinitPaymentSheet, new iOS build), or for free by moving payment to a Stripe-hosted Checkout page in the browser (needs a backend Checkout Session endpoint and a return deep link) - add Google Pay for
membership payments: either natively in the payment sheet (
enableGooglePay: truein the plugin config, passgooglePaytoinitPaymentSheet, request production access in the Google Pay & Wallet Console, new Android build), or for free via the same Stripe-hosted Checkout page as for Apple Pay