[Foundry P1] Foundry adapter package scaffolding + pf2e actor_to_member #7

Open
opened 2026-06-23 00:42:32 +00:00 by rbrooks · 0 comments
Owner

Stand up the adapter architecture and implement the first concrete method.

New backend package webapp/backend/app/foundry/

  • client.py - authenticated HTTP calls to the Foundry REST API
  • adapters/base.py - abstract base class / protocol defining the interface
  • adapters/pf2e.py - first concrete adapter
  • registry.py - maps system identifier strings to adapter classes

Adapter interface (each method optional; return None to declare unsupported)

  • actor_to_member(foundry_actor) ? implement this one only
  • member_to_actor, npc_to_actor, journal_to_entry, item_to_item - stubs returning None for now (later phases)

Boundaries

  • All system-specific logic stays behind the adapter boundary. No system-specific branches in API routes or the campaign model.
  • Unimplemented operations return None; the UI hides the corresponding buttons rather than showing disabled controls.
  • Skip the generic adapter - it belongs to Phase 2. Without one real adapter shipped, the interface shape is still speculative.

Roadmap: Phase 1 step 4 + architecture section.

Stand up the adapter architecture and implement the first concrete method. ## New backend package `webapp/backend/app/foundry/` - `client.py` - authenticated HTTP calls to the Foundry REST API - `adapters/base.py` - abstract base class / protocol defining the interface - `adapters/pf2e.py` - first concrete adapter - `registry.py` - maps system identifier strings to adapter classes ## Adapter interface (each method optional; return `None` to declare unsupported) - `actor_to_member(foundry_actor)` ? **implement this one only** - `member_to_actor`, `npc_to_actor`, `journal_to_entry`, `item_to_item` - stubs returning `None` for now (later phases) ## Boundaries - All system-specific logic stays behind the adapter boundary. **No system-specific branches in API routes or the campaign model.** - Unimplemented operations return `None`; the UI hides the corresponding buttons rather than showing disabled controls. - **Skip** the `generic` adapter - it belongs to Phase 2. Without one real adapter shipped, the interface shape is still speculative. _Roadmap: Phase 1 step 4 + architecture section._
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rbrooks/Quest-Board#7
No description provided.