{"id":49308838,"url":"https://github.com/o6lvl4/memre","last_synced_at":"2026-04-26T11:03:48.633Z","repository":{"id":353928792,"uuid":"1221461755","full_name":"O6lvl4/memre","owner":"O6lvl4","description":"AI-powered spaced repetition flashcards. Native macOS desktop app with multi-provider LLM support (Ollama / Claude / Gemma 4) and 2026 Go DDD architecture.","archived":false,"fork":false,"pushed_at":"2026-04-26T10:11:30.000Z","size":7900,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T10:20:34.375Z","etag":null,"topics":["anthropic","claude","ddd","desktop-app","domain-driven-design","flashcards","gemma","golang","llm","local-first","macos","ollama","react","sm-2","spaced-repetition","sqlite","tailwindcss","wails","wails-v3"],"latest_commit_sha":null,"homepage":"https://github.com/O6lvl4/memre/releases/latest","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/O6lvl4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-26T08:36:28.000Z","updated_at":"2026-04-26T10:11:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/O6lvl4/memre","commit_stats":null,"previous_names":["o6lvl4/memre"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/O6lvl4/memre","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O6lvl4%2Fmemre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O6lvl4%2Fmemre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O6lvl4%2Fmemre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O6lvl4%2Fmemre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/O6lvl4","download_url":"https://codeload.github.com/O6lvl4/memre/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/O6lvl4%2Fmemre/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32294592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude","ddd","desktop-app","domain-driven-design","flashcards","gemma","golang","llm","local-first","macos","ollama","react","sm-2","spaced-repetition","sqlite","tailwindcss","wails","wails-v3"],"created_at":"2026-04-26T11:03:44.128Z","updated_at":"2026-04-26T11:03:48.624Z","avatar_url":"https://github.com/O6lvl4.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"frontend/public/icon.svg\" width=\"120\" height=\"120\" alt=\"MemRE icon\" /\u003e\n\n# MemRE\n\n**AI-powered spaced repetition flashcards as a native macOS desktop app.**\n\n[![CI](https://github.com/O6lvl4/memre/actions/workflows/ci.yml/badge.svg)](https://github.com/O6lvl4/memre/actions/workflows/ci.yml)\n[![Latest release](https://img.shields.io/github/v/release/O6lvl4/memre?display_name=tag\u0026sort=semver)](https://github.com/O6lvl4/memre/releases/latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n\u003c/div\u003e\n\n---\n\n## Features\n\n- **🃏 Spaced repetition** — SM-2 inspired scheduler with continuous retention curve\n- **🧠 Multi-provider AI** — Ollama (Gemma 4), Anthropic API (Claude Sonnet), Claude Code CLI, deterministic offline stub fallback\n- **🎚️ Per-call provider override** — pin Sonnet for one card-generation pass without changing your default\n- **♻️ Hot-reload settings** — switch providers / paste an API key, no restart\n- **📚 Knowledge sources** — paste a study text and have AI extract cards from it (FractoP-comprehensive mode for long content)\n- **🔌 Local-first** — SQLite at `~/Library/Application Support/Memre/memre.db`. API keys never leave the machine\n- **🪟 Native macOS** — single 15 MB `.app` bundle, no Electron, no Chromium\n\n## Install\n\nDownload the latest signed `.app` from **[Releases](https://github.com/O6lvl4/memre/releases/latest)**:\n\n```bash\n# Apple Silicon\ncurl -L -o MemRE.zip https://github.com/O6lvl4/memre/releases/latest/download/memre-v0.1.3-darwin-arm64.zip\nunzip MemRE.zip\nmv memre.app /Applications/\nxattr -dr com.apple.quarantine /Applications/memre.app   # ad-hoc signed only\nopen /Applications/memre.app\n```\n\nThen click the **gear icon** in the header to choose an AI provider.\n\n## AI providers\n\n| Provider | Auth | Default model | Cost |\n|---|---|---|---|\n| **Ollama** | none — local daemon | `gemma4:26b` (or any tag installed) | free, runs on your machine |\n| **Anthropic API** | API key | `claude-sonnet-4-6` | per-token (your account) |\n| **Claude Code CLI** | none — uses existing `claude` session | `claude-sonnet-4-6` | included in your Claude subscription |\n| **Local stub** | n/a | offline fallback | free, low quality (sentence splitter) |\n\nSettings are stored locally in SQLite. The Anthropic key is plain text in the same DB; never sent anywhere except `api.anthropic.com`. Claude Code provider shells out to your `claude` binary so authentication is delegated to that.\n\n## Architecture\n\n```\ninternal/\n├── deck/           bounded context: entity + service + repo + sqlite + Wails handler\n├── card/\n├── knowledge/\n├── ai/             Provider port + Ollama / Anthropic / ClaudeCode / Stub + Registry\n├── settings/       KV store, hot-reload backend\n├── srs/            pure SM-2 / retention math\n├── platform/\n│   ├── sqlite/     shared connection + idempotent migrations\n│   ├── clock/      Clock interface + System + Fake (for tests)\n│   └── idgen/      Generator interface + Crypto + Sequential\n└── composition/    composition root — only place adapters meet ports\n```\n\n**2026 Go DDD** style: vertical slice (one bounded context per directory), consumer-side `Repository` interfaces, `Service` structs with methods, no separate `domain/application/infrastructure/` layer dirs. Tests substitute fakes in-package without any DI framework.\n\n### Context map\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/context-map.png\" alt=\"MemRE bounded contexts\" width=\"640\" /\u003e\n\u003c/p\u003e\n\n\u003csub\u003eSource: [`docs/assets/context-map.mmd`](docs/assets/context-map.mmd) — rendered with [premaid](https://github.com/O6lvl4/premaid) (`pretty` theme).\u003c/sub\u003e\n\n**Bounded context relationships**\n\n| From → To | Relationship | Notes |\n|---|---|---|\n| `deck` ← `card` data | **read model** via `StatsRepository` | deck never imports card; deck-level stats come from a dedicated read-model port computed against the cards table |\n| `card` → `events` | **published events** | `card.Reviewed` lets future gamification / achievement subscribers react without coupling |\n| `card` / `deck` → `srs` | **shared kernel** | pure scheduling math used by both, no state |\n| `ai` → external LLMs | **anti-corruption layer** | `Provider` interface insulates the rest of the app from JSON Schemas, model names, and provider quirks |\n| every slice → `platform` | **infrastructure** | each slice owns its own `Sqlite*` adapter that depends on the shared `Store` |\n| `composition` → all | **composition root** | the only place concrete adapters meet ports |\n\n## Quick start (development)\n\nRequirements: Go 1.25+, Node 20+, Xcode CLT, [`wails3`](https://v3.wails.io) CLI.\n\n```bash\ngit clone https://github.com/O6lvl4/memre\ncd memre\n\n# install deps + generate Wails TS bindings\ncd frontend \u0026\u0026 npm ci \u0026\u0026 cd ..\nwails3 generate bindings -ts\n\n# run with hot reload\nwails3 dev\n\n# or build a production .app bundle\nwails3 task darwin:package\nopen bin/memre.app\n```\n\n### Tests\n\n```bash\ngo test -race -count=1 -cover ./internal/...\n```\n\n| Package | Coverage | Notes |\n|---|---|---|\n| `srs` | 90% | pure SM-2 + retention math, table-driven |\n| `deck` | 85% | entity invariants + service + sqlite roundtrip |\n| `knowledge` | 73% | + ON DELETE CASCADE, FK enforcement |\n| `card` | 66% | + ApplyReview, IsDue, upsert |\n| `ai` | 52% | Ollama/Anthropic via httptest, Registry resolve, Fallback |\n| `settings` | 60% | KV roundtrip, upsert |\n| `platform/clock` | 100% | |\n| `platform/idgen` | 94% | |\n| `platform/sqlite` | 36% | migration + WAL/foreign_keys pragmas + idempotency |\n\n≈110 unit + integration tests, all run on every CI pipeline.\n\n### Custom providers / models\n\n```bash\n# pick a different Ollama model\nMEMRE_OLLAMA_MODEL=gemma4:e4b open bin/memre.app\n\n# point at a remote Ollama\nMEMRE_OLLAMA_URL=http://192.168.1.50:11434 open bin/memre.app\n\n# or set defaults via the in-app gear icon (persists in SQLite)\n```\n\n## Releasing\n\nA `git push` of an annotated tag `vX.Y.Z` triggers `.github/workflows/release.yml`, which builds on `macos-latest`, ad-hoc signs the `.app`, zips it, computes SHA-256, and attaches both to a GitHub Release with auto-generated notes.\n\n```bash\ngit tag -a v0.2.0 -m \"...\"\ngit push origin v0.2.0\n```\n\n## CI\n\n`.github/workflows/ci.yml`:\n- **Linux**: `go vet` + `go test -race -cover` on the pure layer (no Wails GUI deps)\n- **Linux**: frontend `tsc -b \u0026\u0026 vite build` after generating TS bindings\n- **macOS**: full graph `go vet ./...` + `.app` smoke test + binary artifact upload\n\n## Roadmap\n\n- [ ] **Streaming AI responses** (token-by-token rendering for long generations)\n- [ ] **macOS Keychain** for the Anthropic API key (currently SQLite plaintext)\n- [ ] **Apple Developer ID** signing + notarisation (Gatekeeper friction-free install)\n- [ ] **Universal binary** (arm64 + amd64) and **Linux** / **Windows** builds\n- [ ] **Auto-update** (check GitHub Releases on launch)\n- [ ] **Import / export** Anki `.apkg` and CSV\n- [ ] **Slog** structured logging + per-call AI metrics\n\n## License\n\n[MIT](LICENSE) © 2026 MemRE contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo6lvl4%2Fmemre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fo6lvl4%2Fmemre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo6lvl4%2Fmemre/lists"}