> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture & patterns

> Reusable patterns for the architectural decisions every vly app eventually faces. Component shape, data modeling, auth, caching, scaling.

vly handles a lot of architecture for you — Convex backend, built-in auth, deployment pipeline. But your app will still face design decisions: how to model data, how to scope permissions, how to handle file uploads, when to cache. This section is the **reference for those decisions**.

## Patterns by topic

<CardGroup cols={2}>
  <Card title="Component patterns" icon="component" href="/architecture/component-patterns">
    Reusability, composition, prop drilling vs. context.
  </Card>

  <Card title="Data modeling" icon="database" href="/architecture/data-modeling">
    Schema patterns for the most common app shapes.
  </Card>

  <Card title="Auth flows" icon="key" href="/architecture/auth-flows">
    Patterns for sign-up, password reset, MFA, session management.
  </Card>

  <Card title="State management" icon="layers" href="/architecture/state-management">
    Where to put state — Convex, URL, local, Zustand.
  </Card>

  <Card title="Caching" icon="archive" href="/architecture/caching">
    What to cache, where, and how to invalidate.
  </Card>

  <Card title="Error handling" icon="alert-triangle" href="/architecture/error-handling">
    Error boundaries, retry policies, user-facing error UX.
  </Card>

  <Card title="Optimistic updates" icon="zap" href="/architecture/optimistic-updates">
    Patterns for instant client feedback.
  </Card>

  <Card title="Pagination" icon="list-ordered" href="/architecture/pagination">
    Infinite scroll vs. paginated tables.
  </Card>

  <Card title="Search patterns" icon="search" href="/architecture/search-patterns">
    Full-text vs. vector vs. filter UIs.
  </Card>

  <Card title="File uploads" icon="upload" href="/architecture/file-uploads">
    Direct-to-storage uploads, validation, previews.
  </Card>

  <Card title="Real-time sync patterns" icon="zap" href="/architecture/realtime-sync-patterns">
    Sync, presence, collaborative editing.
  </Card>

  <Card title="Multi-tenancy" icon="building" href="/architecture/multi-tenancy">
    Workspaces, isolation, per-tenant limits.
  </Card>

  <Card title="Rate limiting" icon="gauge" href="/architecture/rate-limiting">
    Per-user, per-IP, per-endpoint patterns.
  </Card>
</CardGroup>

## When to read this section

* Before starting a non-trivial app, skim the patterns relevant to your shape.
* When the agent's default approach feels off, the patterns here describe the alternatives and tradeoffs.
* When debugging architecture-level issues (slow queries, leaky abstractions, scaling pain), check the relevant page.

## Tips

<Tip>
  **Patterns aren't laws.** They're starting points. Adapt to your app's specifics.
</Tip>

<Tip>
  **vly's defaults are usually right.** Question the defaults only when you have a specific reason — premature divergence creates churn.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.