Architecture Decision: Open Paws Platform Sync — API Gateway vs Sync vs Divergence #146
LarytheLord
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
The Open Paws Platform (Astro + Supabase) has reimplemented AG's guild functionality independently:
guild_queststable (separate from ourquests)guild_quest_assignmentstable (separate from ourquest_assignments)src/lib/services/guild/guild-quest-service.ts'applied'vs our'assigned')quest_idsnake_case vs our PrismaquestId)Our AG platform (Next.js + Neon/Prisma) is the authoritative system — Phase 0-2 is complete with QuestTrack, Party system, QA mediation, BootcampLink, and now Guild Card.
The two systems have diverged. Quest data is duplicated, not synced.
Options
Option A: API Gateway (Recommended)
OP Platform calls AG's API instead of maintaining its own DB tables.
How:
guild-quest-service.tscallshttps://adventurersguild.space/api/...endpoints instead of SupabasePros: Single source of truth. No sync lag. All new features (parties, QA mediation, Guild Card) available instantly.
Cons: Requires OP Platform code changes. AG becomes a dependency for OP Platform uptime. Need to add service-to-service auth.
Effort: ~2 days AG side (add service auth), ~3 days OP side (rewrite service layer)
Option B: One-Way Sync (Pragmatic)
AG is authoritative. Nightly/hourly sync pushes quest + assignment data to OP Platform's Supabase.
How:
Pros: OP Platform stays independent. No runtime dependency on AG.
Cons: Sync lag (up to 1 hour). Need to maintain the sync job. Schema mapping headaches as AG evolves.
Effort: ~3 days (build sync service + field mapping)
Option C: Shared Schema Definition
Both platforms read from the same Prisma schema definition, apply to their own DBs independently.
Pros: Consistent field names.
Cons: Still duplicated data. Doesn't solve runtime sync. Two DBs to maintain.
Effort: ~1 day setup, ongoing maintenance burden
Option D: Accept Divergence (Simplest for Now)
OP Platform is a separate read-only view. We manually keep important quests in sync. Focus on AG as the primary platform.
Pros: Zero engineering effort. Ship faster.
Cons: Data drifts. Users might see different quest states on different platforms.
Effort: 0 days
Recommendation
Option A (API Gateway) for May launch. Reasons:
Fallback: If OP Platform team can't rewrite their service layer before May, use Option D (accept divergence) and plan API Gateway for June.
Decision Needed
@LarytheLord and Sam need to align on:
All reactions