Marvia

Sign inSign up

Product constitution · v1.0 · critical (required)

Eight documents the platform is not allowed to contradict.

Marvia is an extensible AI Workspace for Digital Marketing. These constitutions bind the kernel, every worker and every extension. They are permanent — changes require consensus, and nothing breaks without a migration path.

LearnAnalyzeImproveGrow

The eight constitutions

Every rule, in one place

Each document is mirrored in the repository under docs/constitution. The list below is the enforceable summary.

01

Product Constitution

What Marvia is, and what is allowed to exist inside it.

Identity and activities

  • Marvia is an extensible AI Workspace for Digital Marketing.
  • Every feature must serve Learn, Analyze, Improve or Grow.
  • The Workspace is the only top-level container; nothing is shared across workspaces.

Access and economy

  • Guests analyze URLs, preview reports, browse the marketplace and learn without an account.
  • Login (Google or GitHub) gates save, install, purchase and AI actions only.
  • Pricing is pay-per-action; extensions declare their own credit costs.

Refresh and open core

  • No realtime dashboards: last-updated timestamp, refresh action and history on every report.
  • The kernel is open source; premium value lives in extensions and the marketplace.

docs/constitution/01-product.md

02

UX Constitution

Flows, the application shell and navigation.

Flow

  • The primary action is reachable in three clicks or fewer and is always visible.
  • No empty states and no dashboard overload — one screen answers one question.
  • Keyboard-first, fast loading, fully responsive.

Shell and navigation

  • One shell for the entire product; no page redesigns it.
  • Core navigation is fixed; everything else is registered by an extension.
  • Auth is requested at the gated action and preserves the user's intent.

docs/constitution/02-ux.md

03

Engineering Constitution

Code structure, patterns and typing.

Structure

  • Small files, one responsibility per module.
  • Repository, service layer, adapter and event-driven patterns only.
  • Components render, services decide, repositories persist.

Typing and providers

  • Branded ids, explicit Result values and KernelError codes — no magic.
  • No business logic in components.
  • No vendor SDK outside its adapter package.

docs/constitution/03-engineering.md

04

UI Constitution

Tokens, components, schema-driven surfaces and accessibility.

Design system

  • Tailwind v4, design tokens, CVA, shadcn/ui and Lucide icons.
  • No custom colors, no inline CSS, no duplicated variants.
  • Four layers: primitives, compound, blocks, layouts — resolved through the registry.

Schema and access

  • Pages, reports, content, forms, settings and dashboards are generated from schemas.
  • The report layout is fixed; extensions supply data, not layouts.
  • Keyboard navigation, ARIA labels, focus states and contrast are release requirements.

docs/constitution/04-ui.md

05

Extension Constitution

The SDK, permissions and the review process.

Surface

  • Core stays minimal; anything non-essential is an extension.
  • Documentation and examples precede the API — no undocumented APIs.
  • Registration happens only through defineExtension.

Trust

  • Manifests are validated at definition time and permissions are least-privilege.
  • Extensions run sandboxed and read only explicitly granted data.
  • Extensions read snapshots; they never re-parse HTML.

docs/constitution/05-extension.md

06

AI Constitution

The role and the limits of AI.

Role

  • AI enhances workflows; it never replaces the UX or becomes the application.
  • AI explains, recommends, summarizes and teaches — always attached to a concrete object.

Limits

  • Every AI action costs credits and is recorded in history.
  • AI runs through the provider-agnostic router; no direct vendor calls.
  • Every task must be completable without AI.

docs/constitution/06-ai.md

07

Performance Constitution

Loading, refresh and caching behaviour.

Strategies

  • Lazy loading, code splitting, manual refresh, queue processing and KV caching.
  • Permanent JSON snapshots replace repeated fetching; HTML is temporary.

Constraints

  • No realtime subscriptions by default.
  • Long work is queued, never awaited in a request.
  • The shell renders before any extension surface resolves.

docs/constitution/07-performance.md

08

Community Constitution

Governance, documentation and contribution.

Governance

  • Core contributors govern by consensus; constitution changes require it.
  • Public APIs are versioned; breaking changes require a migration path.

Contribution

  • Proposals must name the activity they serve and justify belonging in core.
  • The default answer to 'should this be in core?' is 'extension'.
  • Deprecations are announced, dated and paired with a replacement.

docs/constitution/08-community.md

Fixed structures

Shapes no feature may redefine

These four lists are constitutional constants. Extensions attach to them; they never replace them.

Application shell

One shell, every page, no exceptions.

  1. Sidebar
  2. Workspace Switcher
  3. Page Header
  4. Content Area
  5. Persistent Prompt Input

Core navigation

Anything not on this list belongs to an extension.

WorkspaceChatsProjectsLearnMarketplaceHistoryExtensionsCreditsSettings

Report layout

Extensions supply the data for these sections — never a new layout.

  1. 01Overview
  2. 02Metrics
  3. 03Visual Cards
  4. 04Issues
  5. 05Recommendations
  6. 06AI Summary
  7. 07History

Guest boundary

Value arrives before the account does.

Open to guests

URL analysisReport previewsMarketplace browsingLearning content

Requires login

SaveInstallPurchaseAI actions

Addendum

Compliance and security

High-level principles recorded here; the detailed requirements live in a dedicated security document.

Data protection

Sensitive data encrypted at rest and in transit.

Authentication

OAuth 2.0 / OpenID Connect for every login.

Authorization

Role-based access control scoped to the workspace.

Audit logging

Credit consumption, installs, member and connector changes recorded.

Compliance

Aligned with GDPR, CCPA and equivalent regulation.

Extension security

Mandatory review, sandboxed execution, granted-only data access.