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

@@ -0,0 +1,67 @@
CREATE TABLE `api_keys` (
`id` text PRIMARY KEY NOT NULL,
`name` text NOT NULL,
`key` text NOT NULL,
`last_used` integer,
`created_at` integer
);
--> statement-breakpoint
CREATE UNIQUE INDEX `api_keys_key_unique` ON `api_keys` (`key`);--> statement-breakpoint
CREATE TABLE `email_config` (
`id` text PRIMARY KEY NOT NULL,
`inbox_email` text,
`is_active` integer DEFAULT true,
`created_at` integer
);
--> statement-breakpoint
CREATE UNIQUE INDEX `email_config_inbox_email_unique` ON `email_config` (`inbox_email`);--> statement-breakpoint
CREATE TABLE `folders` (
`id` text PRIMARY KEY NOT NULL,
`name` text NOT NULL,
`color` text DEFAULT '#3b82f6',
`icon` text DEFAULT 'folder',
`parent_id` text,
`sort_order` integer DEFAULT 0,
`created_at` integer
);
--> statement-breakpoint
CREATE TABLE `highlights` (
`id` text PRIMARY KEY NOT NULL,
`article_id` text NOT NULL,
`text` text NOT NULL,
`note` text,
`color` text DEFAULT '#fbbf24',
`start_offset` integer,
`end_offset` integer,
`created_at` integer
);
--> statement-breakpoint
CREATE TABLE `reading_goals` (
`id` text PRIMARY KEY NOT NULL,
`type` text NOT NULL,
`metric` text NOT NULL,
`target` integer NOT NULL,
`is_active` integer DEFAULT true,
`created_at` integer
);
--> statement-breakpoint
CREATE TABLE `reading_stats` (
`id` text PRIMARY KEY NOT NULL,
`date` text NOT NULL,
`articles_read` integer DEFAULT 0,
`articles_added` integer DEFAULT 0,
`words_read` integer DEFAULT 0,
`time_spent_seconds` integer DEFAULT 0,
`streak` integer DEFAULT 0
);
--> statement-breakpoint
CREATE UNIQUE INDEX `reading_stats_date_unique` ON `reading_stats` (`date`);--> statement-breakpoint
CREATE TABLE `settings` (
`key` text PRIMARY KEY NOT NULL,
`value` text NOT NULL,
`updated_at` integer
);
--> statement-breakpoint
ALTER TABLE `articles` ADD `reading_time_seconds` integer DEFAULT 0;--> statement-breakpoint
ALTER TABLE `articles` ADD `folder_id` text;--> statement-breakpoint
ALTER TABLE `articles` ADD `finished_at` integer;