Keeping forks in sync
A fork that never merges upstream rots. The trick is keeping campus changes confined to files upstream rarely touches.
The golden rule
Section titled “The golden rule”Put your campus identity in config files, not scattered edits.
- room-tba:
src/campus.config.ts,src/lib/site.ts,community-links.ts,public/room_info.json, your DB data, yourscripts/import-*.ts - website:
src/data/tools.ts,src/lib/site-meta.ts,src/data/press.ts,public/assets
If your changes live there, git merge upstream/main stays clean. If you
edited the map component itself, every sync is a conflict.
Sync workflow
Section titled “Sync workflow”git remote add upstream git@github.com:uplbtools/room-tba.git # oncegit fetch upstreamgit checkout maingit merge upstream/main # or rebase if you prefer# resolve conflicts (should be few if you followed the rule)bun install # deps may have changedbun run build # verifybun run db:push or drizzle-kit push # if schema changedDo this monthly or before each semester — upstream ships fixes and features you don’t want to miss (room-tba’s fork tooling itself improves over time).
Schema migrations
Section titled “Schema migrations”room-tba uses Drizzle. If upstream adds migrations:
bunx drizzle-kit push # pushes schema to your DB# or apply generated SQL in drizzle/ manuallyAlways snapshot/backup your DB before a sync that touches drizzle/.
Contributing back
Section titled “Contributing back”If you fix something generic (a map bug, an importer edge case, an a11y issue), open a PR to upstream from a branch in your fork — don’t just sit on it. UPLB Tools merges community fixes; that’s how the ecosystem improves. Campus-specific things (your data, your branding) stay in your fork.
When upstream changes break you
Section titled “When upstream changes break you”campus.config.tsshape changes → re-runbun run fork:initor hand-edit- Importer format changes → your
import-classes-genericpath is stable; only the UPLB AMIS importer is campus-specific - Deploy changes → check upstream’s
vercel.json/ workflows diff