FLASHY Architecture
System Overview
FLASHY (Flashcard Learning Automation for Syncing to Higher-level Yield) is an N8N workflow automation that generates technical flashcards from GitHub repositories and creates pull requests to merge them back.High-Level Architecture
Core Components
1. N8N Workflow
The central automation engine containing 20 nodes:| Node | Type | Purpose |
|---|---|---|
| 1 | Webhook | Receive generation requests |
| 2 | Function | Validate input parameters |
| 3 | HTTP Request | Clone repository via GitHub API |
| 4 | Execute Command | Run repo_analyzer.py |
| 5 | Execute Command | Run cost_estimator.py |
| 6 | Switch | Cost gate (approve/reject) |
| 7 | Function | Identify flashcard topics |
| 8 | Split In Batches | Loop through topics |
| 9 | HTTP Request | Call AI API (Claude/GPT) |
| 10 | Function | Rate limit handler |
2. Utility Scripts
Python scripts executed by N8N for complex operations:repo_analyzer.py: Directory traversal, tech detection, metricscost_estimator.py: Token estimation, cost calculationgithub_helper.py: Branch creation, PR operations
3. Prompt Templates
Markdown templates for AI flashcard generation following the CTO-2-TMLI5 format.Data Flow
Performance Characteristics
| Repository Size | Lines of Code | Execution Time |
|---|---|---|
| Small | < 1,000 | 2-5 minutes |
| Medium | 1,000-10,000 | 5-15 minutes |
| Large | 10,000-50,000 | 15-30 minutes |
Source Reference
This documentation is derived fromARCHITECTURE.md.