The Moon on Ponce

Logical components, stored records, external integrations and data-flow boundaries.

Data flow
01 / Component architectureUndermanned, del. 2026

Operations UI

Owners & staff

  • Bookings · calendar
  • Balances · assignments

Client portal

Invited partners

  • Published details
  • Requests · conversations

Application server

Next.js / TypeScript

  • Identity & role checks
  • Provider connections
  • Validation & calculations
  • Booking & portal actions

Database

Supabase / PostgreSQL

Operational records

Clients, bookings & tours. Recorded payments & staff assignments.

Source observations

Source-linked mail context and calendar snapshots.

Portal records

Access, published details, guidance & conversations.

External providers

  • Gmail Read messages · send replies
  • Google Calendar Import events · explicit write
  • iCloud Import events only
  • Staff email sender Reviewed notices · delivery status

Provider writes require a separate authenticated action. Calendar imports retain their source identifiers.

AI provider (optional)

Anthropic

Inputs: selected message bodies or permitted portal content. Outputs: assessment fields, evidence spans or portal answers.

No direct database write tools.

External provider connections terminate at the application server.

Solid line: data path Dashed boundary: optional serviceRecord groups share one PostgreSQL database.

02 / Data-flow reference

Data-flow reference

Inputs, processing, outputs and write boundaries
FlowInput → processingOutput / stored recordsWrite boundary
E0Gmail inbox readAuthenticated inbox request → server-side Gmail read.Message and conversation data for the inbox view.Gmail access is checked on the server. Durable shared-mailbox ingestion is a separate path (E1).
E1Mail ingestionShared Gmail messages → bounded ingestion → exact client-address matching.Excerpts, metadata, source identifiers and contact/booking links.Ambiguous matches require review. Unmatched messages remain unlinked.
E2Booking-stage assessmentVersioned message selection → bounded Gmail bodies → AI evidence → application validation.Versioned assessment and, when eligible, a booking-stage update.Fresh, complete, high-confidence evidence must pass identity and date checks. Protected imports and manual corrections are preserved.
E3Gmail replyReply content → authenticated send route → idempotency check.Gmail send result and receipt.Access is rechecked. An uncertain provider response remains an uncertain outcome.
C1Calendar importGoogle/iCloud events → normalization → complete source snapshot.Imported calendar entries with provider and connection identity.A partial refresh retains the previous snapshot. Imported entries remain separate from bookings.
C2Google Calendar writeSelected booking → permission and version checks → deterministic event identifier.External Google event and stored source link.Explicit action; no attendee invitations. iCloud is an import source only.
P1Portal requestInvited, verified partner → booking-scoped access → planning submission.Booking-linked request/conversation, owner reply and request status.Approval does not modify booking dates, packages, prices or calendars.
P2Portal publicationOwner-confirmed fields → explicit publication.Published portal information.Publication is separate from request approval and canonical booking edits.
P3Portal question answeringPublished guidance and permitted booking details → grounded answer generation.Answer with source quotations, or owner handoff.Optional AI connection. No tools for operational writes; conversation storage remains separate from booking changes.
B1Booking balancesContract totals, milestones and recorded payments → integer-cent calculations.Derived booking balances and milestone status.Unknown amounts remain distinct from zero. Calculation does not settle payments or move money.
S1Scheduled staff costAssignments, scheduled times and owner-entered pay terms → cost calculation.Estimated assignment costs in the owner view.Missing rates remain unpriced. Staff views exclude pay terms and estimates. No payroll execution.
S2Staff noticeSaved assignment → reviewed notice → enabled email sender.Recorded delivery status.Saving an assignment and sending its notice are separate actions.

The Financials dashboard has unfinished persistent-data connections. Read-only bank observations do not create booking payments.

02 / Email

Email reads, processing and delivery

E0. Gmail inbox read

  1. 01

    Inbox request

    An authenticated user requests messages or conversation history.

  2. 02

    Gmail server route

    Read Gmail through an authenticated server-side connection.

  3. 03

    Inbox view

    Return message and conversation data. Durable ingestion follows the separate E1 path.

E1. Mail ingestion

  1. 01

    Shared venue Gmail

    Inbound and sent correspondence from the explicitly shared mailbox.

  2. 02

    Ingest & match

    Keep bounded excerpts and metadata. Match exact client addresses.

  3. 03

    Related context

    Clear matches appear with the contact or booking. Ambiguous matches remain for review.

E2. Booking-stage assessment

  1. 01

    Selected conversation history

    Message identities define the source version. Bounded message bodies are fetched for assessment.

  2. 02

    AI assessment

    The model selects evidence spans; the server resolves them to exact source quotes.

  3. 03

    Application checks

    Check freshness, identity, dates, completeness and confidence before a stage can change.

    • Eligible → booking stage update
    • Uncertain → review

E3. Gmail reply

  1. 01

    Reply content

    An authenticated user submits a reply for the selected conversation.

  2. 02

    Authenticated send route

    Recheck access and claim an idempotency key before sending through Gmail.

  3. 03

    Send receipt

    Record the provider outcome. An uncertain provider response remains an uncertain outcome.

The server validates assessments before applying stage updates. Protected imports and manual corrections are preserved.

02 / Calendar

Calendar import and Google Calendar writes

C1. Calendar import

  1. 01

    Google & iCloud

    Read events from connected venue calendars.

  2. 02

    Source snapshots

    Store complete snapshots with provider and connection identity. A partial refresh keeps the previous snapshot.

  3. 03

    Venue calendar

    Show imported events alongside the application’s own bookings and tours.

C2. Google Calendar write

  1. 01

    Choose a booking

    A person chooses to create or update its Google Calendar copy.

  2. 02

    Check & write

    Check permissions and booking version. Deterministic event IDs prevent duplicate copies.

  3. 03

    Linked Google event

    Store the source link. No attendee invitations are sent through this path.

iCloud supports imports only. Calendar imports do not overwrite canonical booking records.

02 / Client portal

Portal access, requests and publication

P1. Portal request

  1. 01

    Invited partner

    An explicit invitation and verified identity grant access to their booking’s portal.

  2. 02

    Planning request

    Submitted updates create a booking-linked conversation for owner review.

  3. 03

    Owner reply & status

    The owner replies and records a status. Approval itself changes no dates, packages, prices or calendars.

P2. Portal publication

  1. 01

    Confirmed information

    The owner prepares the details that partners should see.

  2. 02

    Publish details

    A separate owner action publishes the confirmed portal information.

  3. 03

    Client portal

    Invited partners see the published record, guidance and conversations for their booking.

P3. Portal question answering (optional)

  1. 01

    Permitted source content

    Published venue guidance and confirmed booking details permitted for this partner.

  2. 02

    Grounded answer generation

    The server uses the optional AI connection and resolves answers to source quotations.

  3. 03

    Answer or owner handoff

    Return a source-backed answer or hand the question to the owners. No operational write tools are available.

Source review: November 2026. Scope: logical components and data flows. Deployment topology and integration activation were not verified.