Architecture

MirQuadri.com is a personal-brand platform where AI agents help prepare essays, review drafts, and create companion content. Mir reviews and approves publication. This page describes the content studio at a public overview level; it is not a specification for every project hosted on the site.

Last reviewed: · Source-code review

Implementation and production verification are different. Status labels below reflect the shared fleet record, not a fresh end-to-end test of connected services.

Stack & Rationale

Package values come from the repository manifest. A range such as ^5.6.3 is a declared dependency range, not a claim about the exact installed version. Managed services do not have a package version here.

Content studio technologies and declared package versions
LayerTechnologyPackage / servicePurpose
FrameworkNext.js16.2.6Pages, server rendering, and application routes.
UI libraryReact19.2.8Interactive interfaces.
LanguageTypeScript^5.6.3Static type checking.
Data and identitySupabase (PostgreSQL + Auth)^2.116.0Managed database and sign-in. Version shown is the client SDK, not the database server.
AIAnthropic ClaudeConfigurable modelText generation and rubric-based review. The code default is Sonnet 4.5; the deployed model can be overridden.
StylingTailwind CSS^3.4.15Shared styles and design tokens.
EmailResend^6.12.3Transactional and newsletter email workflows.
HostingVercelManaged platformWeb hosting and scheduled jobs; agent handlers use the Node.js runtime.
ObservabilityDatadog^5.40.0Optional tracing instrumentation; collection depends on deployment configuration.
Avatar videoHeyGenExternal APICreates video from an approved script when configured.
Video assemblyRemotion / AWS Lambda4.0.526Separate assembly step for generated video.
Channel deliveryLinkedIn / YouTubeExternal APIsExplicit publishing actions require the relevant account connection.

System Flows

Read each flow from top to bottom. Each numbered card represents a step; conditional behavior is described within the step.

Request Flow: Visitor to Page Render

  1. Open a page

    A visitor requests a public page or opens the Studio.

  2. Load the route

    Next.js serves the page. Static and cached pages can be delivered without a fresh database read.

  3. Read data when needed

    Data-backed routes load the content they need. Studio access requires owner sign-in.

  4. Display the page

    The browser shows the content and activates interactive controls.

Agent Run Flow: Trigger to Published Essay

  1. Start work

    A manual action or scheduled job requests agent work. Scheduled jobs prepare material for review.

  2. Track the run

    The application records the queued run before returning its identifier. Work then continues in the background.

  3. Draft and review

    The agent saves its output. Writer drafts trigger Critic review; revision feedback can return to Writer in a bounded loop.

  4. Review in Studio

    Mir reviews the result. The recent-run feed refreshes approximately every three seconds.

  5. Approve publication

    An explicit approval action publishes an essay. Social posting and video delivery have their own actions and connection requirements.

How the Agent System Works

Run lifecycle

Runs are recorded as queued, running, then success, failure, or skipped. A successful drafting run means the requested work completed; it does not mean the content was published.

Token Counting & Estimated Cost

The shared AI-call helper accumulates input and output tokens and records an estimated model cost for the run. These estimates are not provider invoices and do not include separate video, email, hosting, or channel-service charges.

Background execution

The trigger returns a run identifier after recording the request, while execution continues in the background. Response time varies. This mechanism operates within the hosting platform’s execution limits; it is not a durable job queue.

Agent Chaining

Writer drafts trigger Critic scoring. When revision is needed and the required context is available, Critic can send feedback to Writer for another attempt. The loop is bounded and never substitutes for Mir’s approval.

Triggers: Manual & Scheduled

Manual Studio actions request work. A daily scheduled job conditionally replenishes topic and draft queues, prepares companion posts and video scripts, requests a weekly internal digest when due, and triages waiting sponsor inquiries. Scheduled preparation does not automatically publish that material.

The Agents

  • SCOUT-01 · Topic Sourcing

    Proposes topic candidates for the writing queue.

  • WRITER-02 · Drafting

    Drafts essays and can revise them using Critic feedback.

  • PRODUCER-03 · Video Scripts

    Drafts video scripts from published essays. Avatar generation, assembly, and YouTube publishing are separate Studio actions.

  • CRITIC-04 · Scoring

    Reviews drafts against a seven-axis rubric and can request revisions. A passing score is not publication approval.

  • PUBLISHER-05 · Channel Drafts

    Drafts LinkedIn companion posts. Posting requires review and a connected account; manual copying is available otherwise.

  • MATCH-06 · Sponsor Triage

    Scores sponsor inquiries for fit and suggests a reply angle. Mir decides how to respond.

  • ANALYTICS-07 · Weekly Report

    Summarizes internal pipeline activity and estimated AI usage costs; it does not provide LinkedIn or YouTube audience analytics.

Key Decisions & Tradeoffs

Single Owner, Manual Approval

Content preparation is automated, while publication remains an explicit human action. This prioritizes editorial judgment over maximum throughput.

Passwordless Magic-Link Auth

Studio sign-in uses email links. This simplifies sign-in but depends on access to the owner’s mailbox and reliable email delivery.

Vercel Cron (Node.js Serverless) Over Polling

Scheduled server work uses Vercel Cron. Studio polling is a separate display function. Schedules and background execution remain subject to platform limits.

Managed Data and Identity

Supabase brings database and identity services together, reducing infrastructure to operate while creating a dependency on a managed provider.

Separate Media Stages

Script drafting, avatar generation, video assembly, and channel publishing are distinct steps. A completed script does not imply a completed or published video.

Operational Visibility

Run records provide status and estimated AI usage costs. Optional Datadog instrumentation adds tracing when configured. Scheduled stale-run reconciliation can request email alerts; this does not guarantee delivery or comprehensive monitoring.

What's Live & What's Not

Agent classifications are derived from the same fleet record used elsewhere on the site. “Live & Verified” records previously verified agent behavior; it is not a guarantee that every dependency is currently healthy.

✓ Live & Verified

  • SCOUT-01: Proposes topic candidates for the writing queue.
  • WRITER-02: Drafts essays and can revise them using Critic feedback.
  • CRITIC-04: Reviews drafts against a seven-axis rubric and can request revisions. A passing score is not publication approval.

⚠ Built But Unverified

  • PRODUCER-03: Drafts video scripts from published essays. Avatar generation, assembly, and YouTube publishing are separate Studio actions.
  • PUBLISHER-05: Drafts LinkedIn companion posts. Posting requires review and a connected account; manual copying is available otherwise.
  • MATCH-06: Scores sponsor inquiries for fit and suggests a reply angle. Mir decides how to respond.
  • ANALYTICS-07: Summarizes internal pipeline activity and estimated AI usage costs; it does not provide LinkedIn or YouTube audience analytics.

Connection-dependent capabilities

LinkedIn posting, HeyGen generation, Remotion assembly, and YouTube publishing require their respective configuration and, where applicable, account authorization. Code presence alone does not confirm a successful production run. This public page does not inspect private connection health or assert that external apps are registered or unregistered.

Architecture Notes

This overview was checked against the content studio’s source code and shared fleet definitions. It does not certify the deployed database schema, current integrations, or operational availability. Deployment configuration and external-service behavior require separate runtime verification.

See Build Log for published progress and the Studio build story for context.