Mobile app for TIHLDE built with React Native, Expo, and TypeScript. Supports iOS and Android.
Members can browse and register for events, view career postings, check in via QR codes, see their groups, give and view fines, and submit expenses.
- Framework: React Native + Expo
- Routing: Expo Router (file-based)
- Styling: NativeWind (TailwindCSS for React Native)
- State: React Query for server state, React Context for auth
- Language: TypeScript
- Bun 1.4.2 or newer
- Node.js 22.13+, 24.3+ or 26+ (
.nvmrcpins 24) - iOS (macOS only): Xcode
- Android: Android Studio with an emulator, JDK 17 or 21, and
ANDROID_HOMEandJAVA_HOMEset - Android on Windows: CMake 3.31.6 from the SDK Manager and long paths enabled (
LongPathsEnabledin the registry)
bun installStart the dev server and open the app in Expo Go by scanning the QR code, or press i for the iOS simulator or a for the Android emulator:
bun x expo startexpo-dev-client is installed, so the server targets a development build by default. Press s in the terminal to switch to Expo Go.
Expo Go redirects OAuth through exp:// instead of tihlde://, so the default client does not work there. Create your own public client in Kvark with redirect URI exp://<host>/--/oauth/callback (<host> is the address Expo prints at startup) and set EXPO_PUBLIC_PHOTON_CLIENT_ID (see Local Photon).
Build and install a development build when you need something Expo Go doesn't include, such as push notifications on Android, or the default OAuth client. Rebuild after adding a package with native code, changing app.json, or upgrading the Expo SDK:
bun run ios # Build and run on iOS simulator
bun run android # Build and run on Android emulatorBoth also start the dev server.
bun run test # Jest in watch mode (not `bun test`, which runs Bun's own runner)
bun run lint # ESLint via ExpoThe app uses production Photon by default. To use a local Photon instead:
- Run Photon and Kvark locally, as described in the Photon README. Photon runs on
localhost:4000and Kvark onlocalhost:3000. - In Kvark (Admin → OAuth-klienter), create a client with redirect URI
tihlde://oauth/callbackand "Offentlig klient" checked. - Copy
.env.exampleto.env, uncommentEXPO_PUBLIC_PHOTON_URLandEXPO_PUBLIC_PHOTON_CLIENT_ID, set the client id, and restart withbun x expo start --clear.
Android emulator: localhost points at the emulator itself, so forward the ports after each emulator start:
adb reverse tcp:4000 tcp:4000 && adb reverse tcp:3000 tcp:3000adb reverse can't reach Vite's default IPv6 address, so start Kvark with --host 127.0.0.1. Photon and Kvark have to be started separately for this, not through the combined dev command.
Production builds and store submissions use EAS Build and EAS Submit.
bun install -g eas-cli
eas login # Log in to the TIHLDE Expo accountDefined in eas.json:
| Profile | Purpose | Distribution |
|---|---|---|
development |
Development client for local testing | Internal |
preview |
Release-mode build (no development client) for internal testing outside the stores | Internal |
production |
App Store and Google Play releases. The build number is incremented automatically. | Store |
- Bump
versioninapp.json. - Build:
eas build --platform all --profile production(or--platform ios/--platform android). - Submit:
eas submit --platform iosandeas submit --platform android. Add--auto-submitto the build command to submit when the builds finish. - Test the builds in TestFlight and the Google Play internal testing track.
- iOS: add release notes in App Store Connect and submit for review.
- Android: promote the internal testing release to production in Play Console.
Signing keys, the Google Play service account key (used by eas submit) and the FCM V1 key (push notifications) are stored in EAS under the TIHLDE account, so being logged in with eas login is enough. Manage them with eas credentials.
app/ # Expo Router file-based routes
├── (auth)/ # Login screen
├── (app)/
│ ├── (tabs)/ # Bottom tabs: arrangementer, karriere, bot, grupper, profil
│ └── (modals)/ # Slide-from-right screens: event details, group page,
│ # give-a-fine flow, expenses, notifications, QR
actions/ # API calls and TypeScript types
components/ # UI and feature-specific components
context/ # React Context providers (auth)
lib/ # Hooks, utilities, and storage helpers