유대선
프로젝트로
·기술 회고·3

Cross-repo log aggregation: each repo keeps its own, the portfolio pulls

Added `logSourceRepo` to project frontmatter so each project's log timeline can be fetched from its own separate repo. Pull-on-demand with 30s ISR cache, no polling.

What this enables

Up until this commit, the project-log system assumed all logs live in this repo's content/logs/<project>/ directory. Fine for a single-repo portfolio. Not fine for the real situation: I'll have separate repos for crosspost-bot, AI Factory cores, and any other product project. Each of those repos runs its own dual-write log via the install/ spec — but the timeline still needs to surface on this portfolio.

Now: each project's content/projects/<slug>.mdx can declare:

logSourceRepo: "Daeseon-AI-Factory/crosspost-bot"

When the portfolio renders /projects/crosspost-bot, it fetches that repo's content/logs/crosspost-bot/ directory through the GitHub Contents API and renders the entries inline. Identical UI to a repo-local log. The reader sees one continuous timeline; behind the curtain the source can be any repo the portfolio's PAT can read.

Design choices

What changed in code

Trade-offs accepted

What I'd do differently

Skipped admin support for editing log entries directly. Right now mdx is hand-written. The blog post mentions backdating support (set date to a past date), but there's no UI for it. Will revisit when I'm tired of opening text editors.

Pattern

For a multi-repo portfolio, pull-on-demand from the source beats sync into the destination. Sync introduces lag, conflict, and a second source of truth. Pull-on-demand keeps the source canonical and uses caching for performance. The cost is GitHub API quota — bounded by hourly limit — but at portfolio-scale traffic this isn't the constraint.

Commit

3ff7952 — Cross-repo log aggregation + bilingual guide + log entries.