Building Common Cartridge Import in Tsugi — Start With the Data Model @ChuckSeverance
Building Common Cartridge Import in Tsugi — Start With the Data Model  @ChuckSeverance
Uploaded September 2026 | Updated November 2026, 2 hours ago
In this episode I start building Common Cartridge import support for Tsugi.

I already have a working Common Cartridge export path, so now the problem flips around: how should Tsugi import a cartridge without accidentally duplicating content every time the same package is imported again?

That immediately turns into a data-modeling problem.

Before writing code, I work through questions like:

How do we record that a page, file, quiz, or other object came from a Common Cartridge?
How do we detect a true duplicate?
What happens if an imported object is edited locally and the original cartridge is imported again?
Should Common Cartridge provenance live in the main Tsugi content tables, or in separate import-history tables?
How much of the original cartridge metadata should be preserved for debugging and future reconciliation?

The key design choice is to keep import provenance separate from the live content model rather than polluting every core table with Common Cartridge-specific columns.

Once that model starts to settle down, Cursor begins building the schema and service layer, along with unit tests for duplicate detection and cartridge parsing.

Later in the session, I feed it a real Canvas Common Cartridge export and we start seeing the first actual imports appear: files, lessons, links, and quizzes. The first pass isn't perfect — the quiz itself imports correctly, but one of the lesson links is rendered with the wrong course context — which gives us the next bug to fix.

By the end, this is starting to look like a real minimum viable Common Cartridge importer.

The broader theme of the episode is the workflow I keep coming back to when coding with AI:

brainstorm the problem → design the data model → build services → build tests → build UI → iterate.

The closer you get the data model to correct at the beginning, the less code you have to tear apart later.
Building Common Cartridge Import in Tsugi — Start With the Data ModelBuilding LTI 1.3 Launches with AI – Privacy, Deep Linking, and Resource LinksAI Master Programmer with Dr. Chuck: PY4E Sparkle Feature (a.k.a. Parsons Problems)AI Coding: Sakai iFrame support to allow local-network-access  (SAK-52276)Common Cartridge Import MVP — First Real IMSCC Import in TsugiRefactoring 12-Year-Old Tsugi Code with AI — UI, Controllers, and ServicesWeek 0 - Welcome to CA4E Live 2026-03-11AI Designing with Dr. Chuck:  Sakai LTI Direct ResearchShelby dogcation beach supercut #aussie #spoiledpupAI Master Programmer with Dr. Chuck: Preparing Tsugi Sites for Google OAuth Login with Cursor AIAI Coding with Dr. Chuck: Using AI to Add CSRF Security Across 60 FilesAI Coding: Supporting multiple tenants in LTI 1.3 tools in Sakai using deployment_id - SAK-52559
Chuck Severance |

Building Common Cartridge Import in Tsugi — Start With the Data Model

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER