Skip to main content

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:
NodeTypePurpose
1WebhookReceive generation requests
2FunctionValidate input parameters
3HTTP RequestClone repository via GitHub API
4Execute CommandRun repo_analyzer.py
5Execute CommandRun cost_estimator.py
6SwitchCost gate (approve/reject)
7FunctionIdentify flashcard topics
8Split In BatchesLoop through topics
9HTTP RequestCall AI API (Claude/GPT)
10FunctionRate limit handler

2. Utility Scripts

Python scripts executed by N8N for complex operations:
  • repo_analyzer.py: Directory traversal, tech detection, metrics
  • cost_estimator.py: Token estimation, cost calculation
  • github_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 SizeLines of CodeExecution Time
Small< 1,0002-5 minutes
Medium1,000-10,0005-15 minutes
Large10,000-50,00015-30 minutes

Source Reference

This documentation is derived from ARCHITECTURE.md.