Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,38 @@ jobs:

- name: Run tests (Vitest + PHPUnit)
run: npm test

mobile:
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/mobile
env:
CI: 1
EXPO_NO_TELEMETRY: 1

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: apps/mobile/package-lock.json

- name: Install mobile dependencies
run: npm ci

- name: Run mobile tests
run: npm test

- name: Typecheck mobile app
run: npm run typecheck

- name: Lint mobile app
run: npm run lint

- name: Verify Expo web export
run: npx expo export --platform web
6 changes: 6 additions & 0 deletions apps/mobile/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The iOS simulator can reach a local PHP server with this value.
# Expo web API connectivity is deferred; it requires a same-origin proxy or CORS.
EXPO_PUBLIC_API_BASE_URL=http://127.0.0.1:2461/api

# For a physical device, copy this file to .env.local and use the computer's
# LAN address instead, for example: http://192.168.1.20:2461/api
43 changes: 43 additions & 0 deletions apps/mobile/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/
expo-env.d.ts

# Native
.kotlin/
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local

# typescript
*.tsbuildinfo

example

# generated native folders
/ios
/android
33 changes: 33 additions & 0 deletions apps/mobile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Ranked Choices mobile

Isolated Expo SDK 57 and TypeScript scaffold for the Ranked Choices migration.
The app currently proves routing, responsive layout, and local development
tooling. PHP connectivity and ballot rendering are layered in the next stacked
PR.

## Get started

```bash
npm install
npm start
```

The terminal provides shortcuts for iOS, Android, and web.

## Checks

```bash
npm test
npm run typecheck
npm run lint
```

## Current scope

- Expo Router and TypeScript scaffold
- shortcode lookup and dynamic ballot route
- responsive native/web layout
- unit-test, typecheck, lint, and static-export commands

Voting, API integration, authentication, production deployment, and domain
association files are intentionally deferred.
42 changes: 42 additions & 0 deletions apps/mobile/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"expo": {
"name": "Ranked Choices",
"slug": "ranked-choices",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "rankedchoices",
"userInterfaceStyle": "automatic",
"ios": {
"icon": "./assets/expo.icon"
},
"android": {
"adaptiveIcon": {
"backgroundColor": "#E6F4FE",
"foregroundImage": "./assets/images/android-icon-foreground.png",
"backgroundImage": "./assets/images/android-icon-background.png",
"monochromeImage": "./assets/images/android-icon-monochrome.png"
},
"predictiveBackGestureEnabled": false
},
"web": {
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router",
[
"expo-splash-screen",
{
"backgroundColor": "#208AEF",
"image": "./assets/images/splash-icon.png",
"imageWidth": 76
}
]
],
"experiments": {
"typedRoutes": true,
"reactCompiler": true
}
}
}
3 changes: 3 additions & 0 deletions apps/mobile/assets/expo.icon/Assets/expo-symbol 2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/mobile/assets/expo.icon/Assets/grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions apps/mobile/assets/expo.icon/icon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"fill" : {
"automatic-gradient" : "extended-srgb:0.00000,0.47843,1.00000,1.00000"
},
"groups" : [
{
"layers" : [
{
"image-name" : "expo-symbol 2.svg",
"name" : "expo-symbol 2",
"position" : {
"scale" : 1,
"translation-in-points" : [
1.1008400065293245e-05,
-16.046875
]
}
},
{
"image-name" : "grid.png",
"name" : "grid"
}
],
"shadow" : {
"kind" : "neutral",
"opacity" : 0.5
},
"translucency" : {
"enabled" : true,
"value" : 0.5
}
}
],
"supported-platforms" : {
"circles" : [
"watchOS"
],
"squares" : "shared"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/mobile/assets/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/mobile/assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/mobile/assets/images/splash-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions apps/mobile/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { defineConfig } = require('eslint/config');
const expoConfig = require('eslint-config-expo/flat');

module.exports = defineConfig([
expoConfig,
{
ignores: ['dist/**'],
},
]);
Loading
Loading