# Korea30, a guide app for the first 30 days after arrival

> A PWA in 6 languages that runs entirely on the device, with no server, so foreign workers who just arrived in Korea can follow the order of first-month paperwork and the Korean they need at service counters.

- Published: 2026-11-11
- Client: Personal project
- Role: Planning, design, implementation, testing, deployment
- Period: 2026-10-23 ~ 2026-10-29
- Stack: React, TypeScript, Vite, PWA, IndexedDB, tesseract.js, pdfmake, Playwright, Firebase Hosting
- Outcome: 1,106 unit tests · 230 E2E tests · 11 PWA E2E tests passing
- Tags: pwa, offline, i18n, privacy, ocr

**Why**: The first month in an unfamiliar country is not a lack of information but a problem of order and language. People do not know the order of alien registration, bank account, phone plan and insurance, and the paperwork arrives only in technical Korean.

**Principle**: Neither working hours nor passport photos are sent to a server, and instead of a judgment the app shows only the difference from the calculation.

## Metrics

| Metrics | Value | Scope | Source |
| --- | --- | --- | --- |
| Unit tests | 1,106 passing / 85 files, 3.91 s run | Reproducible measurement | npm test (2026-10-29), Development log (private) |
| E2E (Playwright, Pixel 7 mobile) | 230 passing, 5.1 min | Reproducible measurement | npx playwright test (2026-10-29), Development log (private) |
| OCR, PDF and service worker under enforced CSP | 0 violations | Reproducible measurement | tests/pwa/deploy-headers.spec.ts (2026-10-29) |
| Recorded audio | 337 MP3 files (ko 91 · vi 82 · en 82 · ru 82), 3,756,524 B | Reproducible measurement | public/voice/, README.md |
| Server cost | KRW 0 (static hosting, free plan) | Production measurement | Firebase Hosting static hosting, no server code (2026-10-29) |

## Links

- Demo: https://illy-korea30.web.app
- Repository: https://github.com/ilyos-numon/korea30

## 1. Situation

A manufacturing worker on D+1 after arrival speaks almost no Korean but is comfortable with a smartphone. What this person needs is not more information but order and language. They do not know in what order to handle alien registration, a bank account, a phone plan and insurance; government forms and pay slips come only in technical Korean; and textbook Korean is hard to use on the spot at a bank counter. I picked the languages from the top nationalities of foreign residents in the Ministry of Justice figures for the end of 2025, and added Russian as the common language of the CIS.

## 2. Scoping

The first decision was no server, no accounts, no API keys and no external requests, following the principle that personal data is processed on the device. The cost is that the app cannot send notifications once it is closed, so `.ics` calendar files take their place. I did not build visa or legal advice, job matching, electronic filing on the user's behalf, login or cloud sync, or an app store app. The wage screen shows only the difference from the calculation, without judgment wording such as "illegal" or "unpaid wages".

## 3. Build

| Category | What | Why |
| --- | --- | --- |
| Reused | tesseract.js (passport MRZ OCR), mrz, pdfmake, ics, idb | Proven libraries that can handle OCR, PDF and calendars on the device |
| Fixed | Backup path that falls back to download when the share API rejects | A failure that only showed up on real devices |
| Built myself | 30-day quests, data holding 18 statutory figures with their law, article and verification status, a wording checker, pre-recorded audio | A wrong figure causes real loss for the user |

Phrases to play at the counter were recorded ahead of time during development instead of using live TTS. File names are the language plus a hash of the sentence, so editing a sentence surfaces a missing recording as a test failure, and when no recording exists the app falls back to the device voice.

## 4. What broke

**Backup failing on real devices.** After the public release, "Back up now" did nothing in Chrome and Brave on Android. All 227 E2E tests were passing at the time. Tracing the code path showed that when `navigator.share` rejected for a reason other than user cancellation, it did not fall back to download, and the top notification swallowed the error. Desktop Playwright has no share API, so only the download path was being tested. I made share rejection fall back to download and added 3 E2E tests that inject a share rejection into the browser. I confirmed the behavior on the same device.

**CSP and on-device OCR.** OCR uses WebAssembly and blob workers, so a wrong policy breaks the feature silently. The preview server did not apply headers, so Playwright attached the CSP to responses to enforce it, ran everything from passport OCR to the application PDF, and counted violation events. There were 0 violations. Production stays on Report-Only until it is checked on real devices.

## 5. Results

| Metric | Value | Scope | Source |
| --- | --- | --- | --- |
| Unit tests | 1,106 passing / 85 files, 3.91 s run | Local | Development log (private) |
| E2E | 230 passing, 5.1 min | Pixel 7 mobile emulation | Development log (private) |
| PWA E2E | 11 passing, 14.5 s | Build output + offline | Development log (private) |
| Enforced CSP | 0 violations | OCR, PDF, service worker | `tests/pwa/deploy-headers.spec.ts` |
| Statutory figures | All 18 verified | Statute text, official guidance | `README.md` |
| Server cost | KRW 0 | Static hosting free plan | Deployment config |

Lighthouse scores, first load time and real user counts were not measured.

## 6. If I did it again

The translations and pronunciation guides for the 6 languages have not been reviewed by native speakers, and the deduction rates and 9 contact entries have not been checked against official sources. iPhone installation, offline use and backup were not confirmed on a real device. Backups are not encrypted. Next comes native-speaker review per language, then real-device checks on iPhone, and after that switching CSP to enforced.
