4.3 KiB
4.3 KiB
cnapp
The mobile app for Chateau Neuf using React and Expo.
Install
Use mise to install Node.
mise trust
mise install
npm install
cp env-example .env.local
Development
Install Expo Go to run the app on your phone.
npm run start
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
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
- ???
- test in android emulator? (
npm run android) - test in ios emulator? (
npm run ios, requires macOS) - use Expo Application Services to build and submit app to stores
- replace redux (
reduxv5 +redux-thunk, hand-written actions and the deprecatedcreateStore): nearly everything in the store is server state (user data) plus one auth token, so drop redux for TanStack Query for fetching/caching, with the token in React context + AsyncStorage — replacessrc/reducers.ts, the fetch thunks insrc/api.tsand theisFetching*/error flags - replace moment (maintenance mode) with
date-fns - replace unmaintained UI packages:
react-native-confetti(last release 2017, mocked out in tests)react-native-simple-radio-button(react-native-ui-lib already ships RadioButton/RadioGroup)
- migrate ESLint 8 + airbnb config (both EOL) to ESLint 9 flat config or eslint-config-expo
- follow-ups from the Expo SDK 54 upgrade:
- decide on Sentry:
@sentry/react-nativeis installed but never initialized (see the commented-out init inindex.ts), and its config plugin (now applied viaapp.json) warns about missingorganization/projectat every build — either finish the setup or drop the dependency - verify Android UI on a device/emulator: edge-to-edge is now always enabled and can no longer be disabled
- 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
- decide on Sentry:
- 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