v2.0: Major feature update

New Features:
- API key authentication for external access
- Apple Shortcuts integration endpoint (/api/v1/add)
- Full-text search across all articles
- Folders for organizing articles
- Highlights and notes on articles
- Reading stats with streaks
- Reading goals (daily/weekly/monthly)
- Import from Pocket/Instapaper
- RSS feed output
- PWA support for mobile
- Auto theme scheduling (day/night)
- Settings page with all configuration

API Endpoints:
- /api/v1/add - Add articles via API key
- /api/keys - Manage API keys
- /api/search - Full-text search
- /api/folders - Folder management
- /api/highlights - Highlights/notes
- /api/stats - Reading statistics
- /api/goals - Reading goals
- /api/import - Pocket/Instapaper import
- /api/rss - RSS feed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Gemini Agent
2026-01-17 12:19:57 +00:00
parent 27963af055
commit 513576b90e
22 changed files with 2431 additions and 30 deletions

View File

@@ -10,12 +10,36 @@ export interface Article {
leadImage: string | null;
wordCount: number;
readingProgress: number;
readingTimeSeconds: number;
isFavorite: boolean;
isArchived: boolean;
folderId: string | null;
tags: string;
createdAt: string;
updatedAt: string;
readAt: string | null;
finishedAt: string | null;
}
export interface Folder {
id: string;
name: string;
color: string;
icon: string;
parentId: string | null;
sortOrder: number;
createdAt: string;
}
export interface Highlight {
id: string;
articleId: string;
text: string;
note: string | null;
color: string;
startOffset: number | null;
endOffset: number | null;
createdAt: string;
}
export interface ReaderSettings {
@@ -24,6 +48,9 @@ export interface ReaderSettings {
lineHeight: number; // 1.4-2.2
maxWidth: number; // 500-900
theme: "dark" | "light" | "sepia";
autoTheme: boolean;
dayTheme: "dark" | "light" | "sepia";
nightTheme: "dark" | "light" | "sepia";
}
export interface TTSSettings {
@@ -33,12 +60,32 @@ export interface TTSSettings {
kokoroUrl: string;
}
export interface ReadingStats {
date: string;
articlesRead: number;
articlesAdded: number;
wordsRead: number;
timeSpentSeconds: number;
streak: number;
}
export interface ReadingGoal {
id: string;
type: "daily" | "weekly" | "monthly";
metric: "articles" | "words" | "time";
target: number;
isActive: boolean;
}
export const defaultReaderSettings: ReaderSettings = {
fontSize: 18,
fontFamily: "serif",
lineHeight: 1.8,
maxWidth: 700,
theme: "dark",
autoTheme: false,
dayTheme: "light",
nightTheme: "dark",
};
export const defaultTTSSettings: TTSSettings = {