This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
MrRSS is a modern, cross-platform desktop RSS reader built with Wails v3 (Go backend + Vue.js frontend). It prioritizes privacy, user experience, and performance with features like auto-translation, smart feed discovery, and AI-powered summarization.
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Development server with hot reload
npm run dev
# Build for production
npm run build
# Lint and fix code
npm run lint
# Format code
npm run format
# Run unit tests
npm test
# Run tests with UI
npm run test:ui
# Run E2E tests
npm run test:e2e# Install dependencies
go mod download
# Run backend tests
go test ./...
# Run tests with coverage
go test -v -timeout=5m -coverprofile=coverage.out -covermode=atomic ./internal/...
go tool cover -html=coverage.out -o coverage.html
# Run tests for specific package
go test -v ./internal/database
# Lint backend
go vet ./...
# Format backend code
gofmt -w .
goimports -w .# Development mode with hot reload (recommended)
wails3 dev
# Or using Task runner
task dev
# Build for current platform
wails3 build
# Or
task build
# Package with installer
task package
# Run the built application
task run
# List all available tasks
task --list# Show all available commands
make help
# Full development check (lint + test + build)
make check
# Setup development environment
make setup
# Clean build artifacts
make clean
# Platform-specific builds
make build-windows
make build-linux
make build-darwin# Install hooks
pre-commit install
# Run on all files
pre-commit run --all-files- Backend: Go 1.25+ with Wails v3, SQLite database
- Frontend: Vue 3.5+ Composition API, Pinia state management, TypeScript
- Communication: HTTP API (primary) + Wails bindings (system integration)
- Build System: Wails v3 + Task runner + Vite
MrRSS/
├── main.go # Desktop application entry point
├── main-core.go # Headless server entry point
├── internal/ # Go backend packages
│ ├── ai/ # AI configuration and utilities
│ ├── aiusage/ # AI usage tracking and limits
│ ├── cache/ # Media cache management
│ ├── config/ # Configuration with schema-driven generation
│ ├── database/ # SQLite operations with WAL mode
│ ├── discovery/ # Feed discovery engine
│ ├── feed/ # RSS fetching and processing
│ ├── handlers/ # HTTP API handlers by feature
│ ├── models/ # Core data structures
│ ├── summary/ # TF-IDF + TextRank + AI summarization
│ ├── translation/ # Multi-service translation
│ └── utils/ # Platform utilities
├── frontend/ # Vue.js frontend
│ ├── src/
│ │ ├── components/ # UI components (article/, sidebar/, modals/)
│ │ ├── composables/ # Vue composables (article/, feed/, ui/)
│ │ ├── stores/ # Pinia state management
│ │ ├── types/ # TypeScript definitions
│ │ └── i18n/ # Internationalization (en, zh)
│ └── dist/ # Built assets (embedded)
├── docs/ # Comprehensive documentation
├── tools/ # Development tools (settings generator)
└── scripts/ # Automation scripts
The application uses a hybrid approach:
- HTTP API (
/api/*) - Primary communication for data operations - Wails Bindings - System integration (browser, window management)
- Static Files - Frontend assets served from embedded
frontend/dist
Core tables:
feeds- RSS subscriptions with metadataarticles- Individual feed items with read/favorite statussettings- Key-value configuration storagetranslation_cache- Cached translations for performance
Important: The database uses SQLite with WAL mode for better concurrency.
- Context Usage: Always use
context.Contextfor exported methods - Error Handling: Wrap errors with context:
fmt.Errorf("operation failed: %w", err) - Database Operations: Use prepared statements for all queries
- Input Validation: Validate URLs, file paths, and user inputs
- Resource Cleanup: Use
deferfor proper cleanup
- Vue 3 Composition API: Use
<script setup>syntax - State Management: Access store via
useAppStore() - Internationalization: Always use
t()for user-facing strings - Error Handling: Show toast notifications with
window.showToast() - Type Safety: Use TypeScript with proper type annotations
IMPORTANT: The settings system has been optimized! Adding new settings is now much simpler.
Instead of manually editing 11+ files, you only need to edit 1 file:
- Edit
internal/config/settings_schema.jsonto add your setting (5 lines) - Run
go run tools/settings-generator/main.goto generate all boilerplate code - Add translations and UI (optional but recommended)
See docs/SETTINGS.md for complete guide.
Key Points:
- Frontend uses snake_case (e.g.,
settings.ai_api_key,settings.update_interval) - All generated files are sorted alphabetically for stable diffs
- The generator handles all boilerplate automatically
- Run tests with timeout:
go test -v -timeout=5m ./... - Coverage report:
go test -coverprofile=coverage.out ./... - Single test:
go test -v ./internal/database -run TestSpecificFunction
- Unit tests:
npm test(uses Vitest) - E2E tests:
npm run test:e2e(uses Cypress) - Test UI:
npm run test:ui
- No Wails Bindings for Data: The application primarily uses HTTP API, not Wails bindings for data operations
- Privacy-First: No external analytics, all data stored locally
- Cross-Platform: Build for Windows, macOS, and Linux
- Portable Mode: Supports portable deployment with
portable.txt - Single Instance: Enforced on Windows/macOS, disabled on Linux due to D-Bus issues
- Concurrent Processing: Feed fetching uses goroutines with configurable limits
- Linux D-Bus Issues: Single instance mode disabled on Linux
- Build Requirements: Ensure platform-specific dependencies are installed
- Frontend Hot Reload: Use
wails3 devfor development with hot reload - Database Migrations: Handle schema changes carefully with proper versioning
- Development:
wails3 dev - Production Build:
wails3 build - Important: MrRSS uses HTTP API, not Wails bindings
const store = useAppStore()const { t } = useI18n()- Theme:
store.themereturns'light'or'dark' - Language:
store.i18n.locale.valuereturns'en'or'zh'
- Toast:
window.showToast(message, type) - Confirm:
await window.showConfirm(title, message, isDanger)
- Settings:
GET/POST /api/settings - Articles:
GET /api/articleswith query params - Progress:
GET /api/progressfor async operations
- AGENTS.md - Comprehensive AI agent guidelines
- docs/ARCHITECTURE.md - System architecture
- docs/CODE_PATTERNS.md - Coding patterns
- docs/SETTINGS.md - Settings system
- docs/TESTING.md - Testing guide
- docs/BUILD_REQUIREMENTS.md - Build dependencies