Skip to content

About

Local, self-hosted intensive reading app for NL, DE, IT, FR, ES learners.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Linea

Read books in your second language without constantly switching to a dictionary.

Linea is a local-first reading app for advanced L2 learners. Import an ebook (EPUB, TXT), read it in a clean single-column reader, and tap any word to open the chain card — definition, example sentence, and a fill-in-the-blank exercise, with the L1 translation shown only on request. Words you look up are tracked in your vocabulary list.

Linea is monolingual by default: translations are earned one word at a time, three stages deep. There is no translation column. See PRODUCT.md for the full product vision and DESIGN.md for the design system.

Prototype: an experimental implementation of the chain card lives at webapp/src/app/mockup, backed by the /api/chain endpoint. The translation pipeline still runs alongside it.

Quick start (bare metal)

cd webapp
npm install
npm run dev

Open http://localhost:3000. Press Ctrl+C in the terminal to stop it.

You'll need a Groq API key. Set it in webapp/.env.local (see webapp/.env.example) or enter it in the app's Settings, where it's stored in your browser's localStorage.

Your books and vocabulary live in your browser's IndexedDB. There is no server database.

Docker

docker compose up --build

Then open http://localhost:3000. Set GROQ_API_KEY and GROUP_SIDECAR_URL in a root .env file — copy .env.example to .env.

To shut the app down:

docker compose down

Stack

  • Web app — Next.js, type-safe React (webapp/)
  • Storage — IndexedDB in the browser, no server database
  • LLM — Groq for definitions, examples, and exercises
  • Grouping sidecar — optional Python service (sidecar/, port 8001) backing /api/group

Environment variables

Variable Required? Default Description
GROQ_API_KEY Unless set in Settings — Groq API key (can also be entered in Settings).
GROUP_SIDECAR_URL No http://localhost:8001 Grouping sidecar URL used by /api/group.
NEXT_PUBLIC_API_URL No /api API base for client calls. Keep as-is.

Contributing

Work in the webapp/ directory:

cd webapp
npm run lint        # ESLint
npx tsc --noEmit    # type check
npm run test        # Vitest
npm run build       # production build

CI runs: lint → type-check → tests → build.

License

MIT. See LICENSE.

About

Local, self-hosted intensive reading app for NL, DE, IT, FR, ES learners.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages