prax-orm 0.6.5

A next-generation, type-safe ORM for Rust inspired by Prisma
Documentation
<article class="max-w-4xl mx-auto px-6 py-12">
  <header class="mb-12">
    <h1 class="text-4xl font-bold mb-4">Quick Start</h1>
    <p class="text-xl text-muted">
      Get up and running with Prax in under 5 minutes.
    </p>
  </header>

  <div class="prose prose-invert max-w-none space-y-8">
    <!-- Step 1 -->
    <section>
      <h2 class="text-2xl font-semibold mb-4 flex items-center gap-3">
        <span class="w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center text-sm font-bold">1</span>
        Add Prax to your project
      </h2>
      <p class="text-muted mb-4">
        Add Prax and Tokio to your <code class="px-2 py-1 bg-surface-elevated rounded">Cargo.toml</code>:
      </p>
      <app-code-block [code]="step1Code" language="toml" filename="Cargo.toml" />
    </section>

    <!-- Step 2 -->
    <section>
      <h2 class="text-2xl font-semibold mb-4 flex items-center gap-3">
        <span class="w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center text-sm font-bold">2</span>
        Create your schema
      </h2>
      <p class="text-muted mb-4">
        Create a <code class="px-2 py-1 bg-surface-elevated rounded">prax/schema.prax</code> file:
      </p>
      <app-code-block [code]="step2Code" language="prax" filename="prax/schema.prax" />
    </section>

    <!-- Step 3 -->
    <section>
      <h2 class="text-2xl font-semibold mb-4 flex items-center gap-3">
        <span class="w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center text-sm font-bold">3</span>
        Configure your database
      </h2>
      <p class="text-muted mb-4">
        Create a <code class="px-2 py-1 bg-surface-elevated rounded">prax.toml</code> configuration file in your project root:
      </p>
      <app-code-block [code]="step3Code" language="toml" filename="prax.toml" />
      <div class="bg-info-500/10 border border-info-500/30 rounded-lg p-4 mt-4">
        <p class="text-info-400 text-sm">
          <strong>📖 Learn more:</strong> See the <a routerLink="/configuration" class="underline hover:text-info-300">Configuration Reference</a>
          for all available options including connection pooling, environment overrides, and debug settings.
        </p>
      </div>
    </section>

    <!-- Step 4 -->
    <section>
      <h2 class="text-2xl font-semibold mb-4 flex items-center gap-3">
        <span class="w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center text-sm font-bold">4</span>
        Generate client code
      </h2>
      <p class="text-muted mb-4">
        Run the Prax CLI to generate type-safe client code:
      </p>
      <app-code-block [code]="step4Code" language="bash" />
      <p class="text-muted mt-4">
        This generates Rust code in <code class="px-2 py-1 bg-surface-elevated rounded">src/generated/</code>
        with type-safe models and query builders.
      </p>
    </section>

    <!-- Step 5 -->
    <section>
      <h2 class="text-2xl font-semibold mb-4 flex items-center gap-3">
        <span class="w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center text-sm font-bold">5</span>
        Run migrations
      </h2>
      <p class="text-muted mb-4">
        Create and apply database migrations:
      </p>
      <app-code-block [code]="step5Code" language="bash" />
    </section>

    <!-- Step 6 -->
    <section>
      <h2 class="text-2xl font-semibold mb-4 flex items-center gap-3">
        <span class="w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center text-sm font-bold">6</span>
        Use in your code
      </h2>
      <p class="text-muted mb-4">
        Import the generated client and start querying:
      </p>
      <app-code-block [code]="step6Code" language="rust" filename="src/main.rs" />
    </section>

    <!-- Next Steps -->
    <section class="mt-16 p-6 rounded-2xl bg-surface border border-border">
      <h2 class="text-2xl font-semibold mb-4">Next Steps</h2>
      <ul class="space-y-3">
        <li class="flex items-start gap-3">
          <svg class="w-5 h-5 text-primary-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
          </svg>
          <span class="text-muted">Explore all <a routerLink="/configuration" class="text-primary-400 hover:underline">configuration options</a></span>
        </li>
        <li class="flex items-start gap-3">
          <svg class="w-5 h-5 text-primary-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
          </svg>
          <span class="text-muted">Learn about <a routerLink="/schema/overview" class="text-primary-400 hover:underline">schema design</a></span>
        </li>
        <li class="flex items-start gap-3">
          <svg class="w-5 h-5 text-primary-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
          </svg>
          <span class="text-muted">Explore <a routerLink="/queries/crud" class="text-primary-400 hover:underline">CRUD operations</a></span>
        </li>
        <li class="flex items-start gap-3">
          <svg class="w-5 h-5 text-primary-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
          </svg>
          <span class="text-muted">Master <a routerLink="/queries/filtering" class="text-primary-400 hover:underline">filtering and pagination</a></span>
        </li>
        <li class="flex items-start gap-3">
          <svg class="w-5 h-5 text-primary-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
          </svg>
          <span class="text-muted">See <a routerLink="/examples" class="text-primary-400 hover:underline">full code examples</a></span>
        </li>
      </ul>
    </section>
  </div>
</article>