Inspiration
About 3.9 million people from other countries live in Japan, and most official mail still reaches them in dense bureaucratic Japanese: tax notices, health-insurance bills, school letters, disaster information. I study foreign languages at a Japanese university, and I know the feeling of looking up every word in a dictionary and still not understanding what a text wants from me. Machine translation helps, but a translated paragraph does not tell you which sentence is the deadline or what you must bring. A missed payment date or a late response to a city office is a real cost for someone who is already new to the country. I wanted to build something that turns a letter into an action, and that a neighbor can use together with the person who received it.
What it does
Plain Japanese Window is a single web page. You choose your language, take or upload a photo of a letter (or paste its text), and press one button. Three results appear on one screen:
- Plain Japanese (yasashii nihongo): the letter rewritten in short sentences with simple words and mostly hiragana.
- Your language: a natural translation. Eight languages are built in: English, Simplified Chinese, Vietnamese, Korean, Portuguese, Spanish, Filipino and Nepali.
- What to do: at most three actions, each with "by when". If the letter states no deadline, the page says "No deadline stated" instead of guessing one.
Plain Japanese and the reader's language sit side by side. A Japanese coworker, landlord or teacher can look at the same screen and ask "is this the part you mean?", so the tool becomes a shared window between two people rather than a black box. The interface switches between Japanese and English, and without an API key the page runs in a demo mode with a prepared sample letter, so anyone can try it immediately.
How we built it
The whole app is one HTML file with no build step and no server. The page sends the photo (as an inline image) and an instruction to the Gemini API in one request to gemini-3.5-flash, and asks for a JSON response that follows a fixed schema: easy, native, and a todo list of {what, when, note}. Because the model reads the photo directly, there is no separate OCR stage. The page renders the JSON in three panels. The user's API key stays in the browser tab's session storage and goes only to Google's API, so there is nothing for me to host or secure and nobody's letters pass through a server of mine. The code is published under the MIT license with a README, so a city office, a school or an NPO can copy the single file and run it. I wrote the project with Claude Code as a coding assistant and designed the product, the prompt and the screen myself.
Challenges we ran into
The hardest design question was what the tool should refuse to do. A confident answer that is wrong is worse than no answer, so the instruction forbids adding anything that is not in the letter and requires "No deadline stated" when no date is given. Another challenge was keeping it usable by people with no technical background: the page needs only a photo and one button, and the demo mode lets a volunteer show it at a counter without setting anything up. Finally, I had to decide where privacy should live. Putting the key and the processing in the browser means a municipality can adopt the tool without a data-protection review of my server, because there is no server.
Accomplishments that we're proud of
- One screen that answers the question a reader actually has: "what do I have to do, and by when?"
- A tool that two people use together, with the original language and the plain version side by side.
- No backend, no account, no cost beyond the user's own API usage, and a public MIT-licensed repository that others can adapt.
- A demo mode in three languages that works offline, so the idea can be judged without any setup.
What we learned
Translation and understanding are different problems. The most useful output was not the translated paragraph but the extracted action with its date. I also learned that a structured response schema is the simplest way to make a language model's output dependable inside a user interface, and that stating what the model must not invent is as important as stating what it should produce.
What's next
- Add furigana to the plain Japanese panel and read-aloud for each panel.
- Support more languages and let a city office pin its own vocabulary, such as the names of local forms.
- Add a "ask about this letter" follow-up question for the person and their Japanese helper.
- Pilot the page at a municipal international-exchange counter and a school, and improve it from the letters people actually bring.
Built With
- css
- gemini-api
- google-ai-studio
- html
- javascript