Inspiration
Machine-translated (MTL) web novels and fanfiction are a double-edged sword. While they allow readers like myself to consume content that hasn't been officially translated yet, the experience is often exhausting. Character names changes from chapter to chapter, canon terms are translated far too literally, and we have to mentally repair every page to maintain context. Yes, there are dedicated translators who clean up these fictions, but the update cycles can be agonizingly slow and most times it even gets dropped by the translators. For impatient readers like myself, MTL is the only choice but it really is painful to read eve with almost 5 years since i got into it.
Cirin (Clean but japanese intonation Ki-rin but with C instead) was inspired by the need to take back control of the reading experience. I wanted a calm, premium library that preserves a reader's terminology choices locally, applies them consistently, and offers an optional AI-driven cleanup pass to transform jarring MTL into smooth, readable English.
What it does
Cirin is a local-first AI reader designed specifically for web novels and fanfiction.
- Flexible Imports: Import chapters from pasted text, a direct URL, an EPUB, or by scraping a table of contents (TOC) from an MTL site.
- Local-First Privacy: All chapters, custom glossaries, and reading positions are stored entirely on-device using SQLite.
- Personalized Glossary: Users can review suggested glossary mappings and lock in the names/terms that matter to them. The app will consistently apply these fixes before any AI processing.
- AI Prose Cleanup: Readers can read the raw text, the glossary-cleaned text, or run an optional AI "smoothing" pass on individual chapters (or in batches) to rewrite the prose for natural English flow.
- Smart TOC Management: Cirin remembers the source and total discovered chapters, allowing users to resume imports in safe batches without accidental duplicates.
How i built it
I built Cirin using a full-stack architecture optimized for privacy and performance, heavily accelerated by Codex and GPT-5.6.
- Frontend (Mobile App): Built with Expo React Native and styled for a premium reading experience. State management is handled by Zustand, and the local-first database is powered by on-device SQLite.
- Backend: A NestJS backend manages OAuth, a credit system for AI usage, URL extraction, and provider-backed prose cleanup. It uses Postgres for identity/billing metadata and Redis for session management.
- AI Provider Boundary: The backend acts purely as an API conduit. It routes prose cleanup requests to multiple AI providers (OpenAI, OpenRouter, Groq, Cerebras, Gemini) depending on the configuration, but it never stores the fiction library itself.
- Codex & GPT-5.6: The Codex agent was instrumental in building this across the stack. It implemented the UI logic for durable TOC imports, designed the cascade deletion flow in SQLite (ensuring that deleting a fiction locally cleans up everything), and built the NestJS provider factory to smoothly adapt to multiple AI models with fallback logic.
Challenges i ran into
- Privacy vs. AI Capabilities: I wanted powerful AI cleanup, but we didn't want a centralized database reading everyone's private libraries. The biggest architectural challenge was drawing a hard boundary where the backend acts strictly as a stateless proxy for AI requests, returning the cleaned prose directly to the device for local SQLite storage.
- Handling MTL Edge Cases: MTL sites are notoriously messy. Writing the logic to parse different TOC formats, preserve source paragraph breaks, and fall back to readable reflows for older, flattened HTML imports was highly complex.
- Batch Processing State: Managing the state for batch AI cleanup (especially on mobile) required careful handling to ensure failed chapters wouldn't halt the entire queue and that credits were tracked accurately.
Accomplishments that i'm proud of
- Successfully executing a local-first architecture that feels as seamless and fast as a cloud-native app.
- Building a UI/UX that feels genuinely premium and calm. A stark contrast to the ad-cluttered MTL websites readers are used to.
- Designing a robust, cost-effective AI pipeline that supports multiple providers
- Creating a tool that actually solves a massive personal pain point. Reading MTL fiction is finally enjoyable again. For the record it is a huge industry, i made my first bag being an mtl cleaner few years back.
What we learned
- The immense value of local-first architectures. By keeping the heavy data (thousands of chapters) on SQLite, the app feels incredibly snappy and user privacy is guaranteed by default.
- How to effectively use AI to manage complex state and refactoring. Using GPT-5.6 and Codex allowed us to quickly pivot our NestJS backend from a single-provider hardcode to a flexible factory pattern that supports a half-dozen AI endpoints.
What's next for Cirin
- Community Glossaries: Allowing users to opt-in to share and download community-curated glossaries for popular fanfictions or web novels.
- EPUB Export: Allowing users to export their completely cleaned, glossary-fixed fictions as EPUBs to read on e-ink devices like a Kindle.
- Offline LLMs: Exploring small, on-device models that can handle basic prose cleanup without needing an internet connection.
Built With
- codex
- expo.io
- gpt
- nestjs
- openai
- postgresql
- react-native
- redis
- sqlite
- typescript
- zustand
Log in or sign up for Devpost to join the conversation.