- 新規記事検出システム: 記事の重複チェックと新規記事のみ処理 - 記事単位ポッドキャスト: フィード統合から記事個別エピソードに変更 - 6時間間隔バッチ処理: 自動定期実行スケジュールの改善 - 完全UIリニューアル: ダッシュボード・フィード管理・エピソード管理の3画面構成 - アクセシビリティ強化: ARIA属性、キーボードナビ、高コントラスト対応 - データベース刷新: feeds/articles/episodes階層構造への移行 - 中央集権設定管理: services/config.ts による設定統一 - エラーハンドリング改善: 全モジュールでの堅牢なエラー処理 - TypeScript型安全性向上: null安全性とインターフェース改善 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2.9 KiB
2.9 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Common Development Commands
- Install dependencies:
bun install
- Build frontend:
bun run build:frontend
- Start server:
bun run start
orbun run server.ts
- Frontend development:
bun run dev:frontend
- Manual batch process:
bun run scripts/fetch_and_generate.ts
- Type checking:
bunx tsc --noEmit
Architecture Overview
This is a RSS-to-podcast automation system built with Bun runtime, Hono web framework, React frontend, and SQLite database.
Core Components
- server.ts: Main Hono web server serving both API endpoints and static frontend files
- scripts/fetch_and_generate.ts: Batch processing script that fetches RSS feeds, generates summaries, and creates audio files
- services/: Core business logic modules:
config.ts
: Centralized configuration management with validationdatabase.ts
: SQLite operations for episodes and feed trackingllm.ts
: OpenAI integration for content generation and feed classificationtts.ts
: Text-to-speech via VOICEVOX APIpodcast.ts
: RSS feed generation
- frontend/: Vite React SPA for browsing feeds and episodes
Data Flow
- RSS feeds listed in
feed_urls.txt
are processed daily - Latest articles are classified by category and summarized via OpenAI
- Summaries are converted to audio using VOICEVOX
- Episodes are stored in SQLite (
data/podcast.db
) with audio files inpublic/podcast_audio/
- RSS feed is generated at
/podcast.xml
for podcast clients - Web UI serves the React frontend for browsing content
Key Directories
data/
: SQLite database storagepublic/podcast_audio/
: Generated MP3 filesfrontend/dist/
: Built React application (served statically)
Environment Configuration
The application uses services/config.ts
for centralized configuration management. Required .env
variables include:
OPENAI_API_KEY
: OpenAI API key (required)VOICEVOX_HOST
: VOICEVOX server URL (default: http://localhost:50021)VOICEVOX_STYLE_ID
: Voice style ID (default: 0)- Podcast metadata and other optional settings
Configuration is validated on startup. See README.md for complete list.
Deployment
The application runs as a single server process on port 3000, automatically executing batch processing on startup and daily at midnight.
Recent Improvements
- ES Module Compatibility: Fixed all ES module issues and removed deprecated
__dirname
usage - Centralized Configuration: Added
services/config.ts
for type-safe configuration management - Enhanced Error Handling: Improved error handling and validation throughout the codebase
- Type Safety: Fixed TypeScript errors and added proper null checks
- Code Structure: Simplified RSS generation logic and removed code duplication
- Path Resolution: Standardized path handling using the config module