---
title: "Quickstart"
description: "Run the ORE demo and see live Solana data streaming in minutes."
editUrl: true
head: []
template: "doc"
sidebar: {"order":1,"hidden":false,"attrs":{}}
pagefind: true
draft: false
---

This quickstart gets you streaming live Solana data in a few minutes using the ORE demo — a real, deployed Arete stack for the ORE mining program. It's the fastest way to see Arete in action.

:::note[What this covers]
This guide walks through the ORE demo only. It's a good starting point to understand how Arete feels, but it doesn't cover building your own stacks or integrating with your own on-chain programs. For those paths, see the [Next Steps](#next-steps) section below.
:::

:::tip[Prefer AI-assisted development?]
If you're using Cursor, Claude Code, or another AI coding tool, check out [Build with AI](/agent-skills/overview/) — paste one prompt and your AI sets everything up.
:::

---

## Prerequisites

Choose how you want to run the CLI:

### Step 1: Install the CLI

Install the native binary via Cargo:

```bash
cargo install a4-cli
```

Then use the `a4` command:

```bash
a4 create my-app
```

This is the same CLI — Cargo installs it as `a4`, and so does npm.

No installation needed — just run:

```bash
npx @usearete/a4 create my-app
```

This downloads and runs the CLI without installing it globally.

Install globally via npm:

```bash
npm install -g @usearete/a4
```

Then use the `a4` command:

```bash
a4 create my-app
```

---

## Create Your App

### Step 2: Scaffold the project

```bash
a4 create my-app
```

```bash
npx @usearete/a4 create my-app
```

```bash
a4 create my-app
```

You'll be prompted to select a template:

| Template         | Description            | Run Command                                                  |
| ---------------- | ---------------------- | ------------------------------------------------------------ |
| `react-ore`      | React + Vite dashboard | `npm run dev` → open [localhost:5173](http://localhost:5173) |
| `typescript-ore` | TypeScript CLI client  | `npm start`                                                  |
| `rust-ore`       | Rust + Tokio client    | `cargo run`                                                  |

:::note[About the ORE demo]
All templates use the same example: **ORE mining rounds** — a real, live Solana program. The templates differ only in language/framework. Each connects to the same public ORE stack and streams identical data.
:::

### Step 3: Or specify the template directly

```bash
a4 create my-app --template rust-ore  # or react-ore, typescript-ore
```

```bash
npx @usearete/a4 create my-app --template react-ore  # or typescript-ore, rust-ore
```

```bash
a4 create my-app --template react-ore  # or typescript-ore, rust-ore
```

That's it. You're streaming live Solana data.

---

## What You Just Built

The scaffolded app connects to a deployed **Arete Stack** — a streaming data pipeline that:

1. **Watches Solana** for ORE mining program activity
2. **Transforms raw transactions** into structured round data (round ID, motherlode, deployment totals)
3. **Streams updates** to your app via WebSocket as they happen on-chain

No RPC calls. No polling. No custom indexer. Just streaming data.

---

## Available Templates

| Template           | Command                          | What You Get                                          |
| ------------------ | -------------------------------- | ----------------------------------------------------- |
| **react-ore**      | `npx @usearete/a4 create my-app` | React + Vite dashboard showing live ORE mining rounds |
| **typescript-ore** | `npx @usearete/a4 create my-app` | TypeScript CLI that streams ORE data to your terminal |
| **rust-ore**       | `npx @usearete/a4 create my-app` | Rust + Tokio client streaming ORE round updates       |

All templates connect to the public ORE stack at `wss://ore.stack.arete.run`.

You can also specify the template directly:

```bash
npx @usearete/a4 create my-app --template react-ore
```

---

## What's Inside

The React template uses `arete-react` with a pre-built stack definition:

```tsx
// App.tsx
import { AreteProvider } from "arete-react";
import { OreDashboard } from "./components/OreDashboard";

export default function App() {
  return (
    <AreteProvider
      websocketUrl="wss://ore.stack.arete.run"
      autoConnect={true}
    >
      <OreDashboard />
    </AreteProvider>
  );
}
```

```tsx
// components/OreDashboard.tsx
import { useArete } from "arete-react";
import { ORE_STREAM_STACK } from "arete-stacks/ore";

export function OreDashboard() {
  const { views, isConnected } = useArete(ORE_STREAM_STACK);
  const { data: rounds } = views.OreRound.latest.use({ take: 5 });

  return (
    <div>
      <p>{isConnected ? "Live" : "Connecting..."}</p>
      {rounds?.map((round) => (
        <div key={round.id?.round_id}>
          Round #{round.id?.round_id} — Motherlode: {round.state?.motherlode}
        </div>
      ))}
    </div>
  );
}
```

The TypeScript template uses `arete-typescript` with typed views:

```typescript
// main.ts
import { Arete } from "arete-typescript";
import { ORE_STREAM_STACK, type OreRound } from "arete-stacks/ore";

const a4 = await Arete.connect("wss://ore.stack.arete.run", {
  stack: ORE_STREAM_STACK,
});

for await (const update of a4.views.OreRound.latest.watch({ take: 1 })) {
  if (update.type === "upsert" || update.type === "patch") {
    console.log(`Round #${update.data.id?.round_id}`);
    console.log(`Motherlode: ${update.data.state?.motherlode}`);
  }
}
```

The Rust template uses `a4-sdk` with typed views:

```rust
// main.rs
use a4_sdk::prelude::*;
use a4_stacks::ore::{OreStack, OreRound};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let a4 = Arete::<OreStack>::connect().await?;

    let mut stream = a4.views.ore_round.latest().listen();

    while let Some(round) = stream.next().await {
        println!("Round # {:?}", round.id.round_id);
        println!("Motherlode: {:?}", round.state.motherlode);
    }
    Ok(())
}
```

---

## Using an AI Coding Agent?

Install Arete agent skills so your AI can write correct code without you looking up docs:

```bash
npx skills add AreteA4/skills
```

Now try asking your agent: "Show me the ORE mining round data in a table with live updates."

See [Build with AI](/agent-skills/overview/) for the full guide and prompt cookbook.

---

## Next Steps

Now that you've seen Arete in action, where you go next depends on what you're building:

**Using an existing on-chain program that has a Arete stack?**

- [Connect to a Stack](/using-stacks/connect/) — Add Arete to an existing project
- [React SDK](/sdks/react/) — Build a full React app against a deployed stack
- [TypeScript SDK](/sdks/typescript/) — Use Arete in Node.js, Vue, Svelte, or vanilla JS
- [Rust SDK](/sdks/rust/) — Native Rust client

**Have your own on-chain program and want to stream its data?**

- [Build Your Own Stack](/building-stacks/workflow/) — Create a custom data stream for any Solana program

**Want to understand what's happening under the hood?**

- [How It Works](/using-stacks/how-it-works/) — Stacks, Views, and how live data flows

**Using an AI coding tool?**

- [Build with AI](/agent-skills/overview/) — Let your agent write Arete code with the right context
