A comprehensive content pipeline and streaming platform for crypto/macro economics educational content
From Fed to Chain is a dual-platform system that combines a powerful Node.js CLI pipeline for content management with a modern Flutter mobile/web app for audio streaming. The platform creates conversational Chinese explainers about cryptocurrency and macro economics in the style of premium educational platforms.
The project consists of two main components working in harmony:
A modern cross-platform app (Web/iOS/Android) featuring:
- Background Audio Playback with media controls and lock screen support
- Multi-language Content (Traditional Chinese, English, Japanese)
- HLS Streaming for optimized audio delivery
- Advanced Playback Features including speed control, seeking, and autoplay
- Modern UI with dark theme and smooth animations
A powerful content management system featuring:
- Interactive Content Review workflow with feedback collection
- Automated Translation using Google Translate API
- Text-to-Speech Generation with Google Cloud TTS
- Social Media Hook Generation for content promotion
- Cloudflare R2 Integration for M3U8 streaming file delivery
- Node.js (v18+)
- Flutter (3.22.2+, Dart 3.0+)
- FFmpeg (for audio processing)
- rclone (for cloud uploads)
# Clone the repository
git clone <your-repo-url>
cd FromFedToChain
# Install Node.js dependencies
npm install
# Install Flutter dependencies
npm run install:flutter
# Check pipeline dependencies
npm run check-deps# Run Flutter app in Chrome (with CORS disabled for development)
flutter run -d chrome --web-browser-flag="--disable-web-security"
# For mobile development
flutter run# Start interactive content review
npm run review
# Process content through full pipeline
npm run pipeline <content-id>
# Run comprehensive tests
npm run test- Human-First Review Workflow - Interactive CLI for content quality assurance
- Multi-language Support - Automatic translation to English and Japanese
- Flexible Content Schema - Structured JSON with metadata and status tracking
- Nested File Organization - Content organized by language and category
- Modern Flutter UI - Responsive design with smooth animations
- Background Playback - Continue listening while using other apps
- Media Session Integration - Lock screen controls and system notifications
- Playlist Management - Organize content by categories and completion status
- Playback Controls - Speed adjustment, seeking, and autoplay features
- Comprehensive Testing - 174+ Node.js tests, Flutter widget tests with coverage
- CI/CD Pipeline - GitHub Actions with automated testing and formatting
- Code Quality - ESLint, Prettier, Flutter analyze with pre-commit hooks
- Cross-Platform - Web, iOS, and Android support from single codebase
FromFedToChain/
βββ src/ # Node.js CLI Pipeline
β βββ cli.js # Interactive CLI interface
β βββ ContentManager.js # Content CRUD operations
β βββ ContentSchema.js # Schema validation
β βββ services/ # Pipeline services (TTS, Translation, etc.)
βββ app/ # Flutter Streaming App
β βββ lib/
β β βββ models/ # Data models
β β βββ services/ # Audio & content services
β β βββ screens/ # App screens
β β βββ widgets/ # UI components
β βββ pubspec.yaml # Flutter dependencies
βββ content/ # Content files (nested by language/category)
βββ audio/ # Generated audio files
βββ tests/ # Comprehensive test suite
βββ .github/workflows/ # CI/CD configuration
# Create source content in Traditional Chinese
content/zh-TW/daily-news/2025-01-15-bitcoin-analysis.jsonnpm run review
# Review content with feedback collection
# [a]ccept, [r]eject, [s]kip, [q]uit optionsnpm run pipeline 2025-01-15-bitcoin-analysis
# Translation β TTS β Social Hooks β M3U8 Generationflutter run -d chrome
# Launch Flutter app to stream generated content- Node.js: 174 passing tests (12 skipped)
- Flutter: 16 widget tests with coverage reporting
- CI/CD: Automated testing on every commit
# Run all tests
npm run test
# Format all code
npm run format
# Lint and analyze
npm run lintEach content file follows a structured schema:
{
"id": "2025-01-15-bitcoin-analysis",
"status": "reviewed",
"category": "daily-news",
"date": "2025-01-15",
"language": "zh-TW",
"title": "ζ―ηΉεΉ£εΈε ΄εζ...",
"content": "δ½ ζζ²ζζ³ι...",
"references": ["θ³ζδΎζΊ"],
"audio_file": "audio/zh-TW/2025-01-15-bitcoin-analysis.wav",
"social_hook": "π ζ―ηΉεΉ£ηͺη ΄ζ°ι«...",
"streaming_urls": {
"m3u8": "https://cdn.example.com/audio.m3u8"
},
"feedback": {
"content_review": "Approved for publication"
}
}# Copy example files
cp .env.sample .env
cp app/.env.example app/.env
# Configure required services:
# - Google Cloud TTS credentials
# - Cloudflare R2 storage
# - API endpoints# macOS setup
brew install ffmpeg
# Install and configure rclone
curl https://rclone.org/install.sh | sudo bash
rclone config create r2 s3 provider=Cloudflare ...npm run build:flutter
# Builds optimized web versioncd app
flutter build appbundle --release
flutter build ios # iOS (requires Xcode)Pipeline fails with "remote not configured"
- Solution: Configure rclone with
npm run check-deps
Flutter app CORS issues
- Solution: Use
--web-browser-flag="--disable-web-security"for development
Audio streaming not working
- Solution: Ensure content has
streaming_urlsgenerated by pipeline
See CLAUDE.md for comprehensive troubleshooting guide.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Run tests (
npm run test) - Format code (
npm run format) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
All commits trigger automated CI testing and formatting checks.
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Cloud - Text-to-Speech and Translation APIs
- Cloudflare R2 - Audio streaming infrastructure
- Flutter Community - Exceptional audio playback packages
- Open Source - Built on the shoulders of giants
Built with β€οΈ for educational content creators and crypto enthusiasts