# Introduction

> React API Stack is the next-generation full-stack framework for apps — one TypeScript source of truth becomes a typed React client and a serverless engine on object storage.

**React API Stack** is a full-stack framework for building apps that scale to millions — without running a database server. You author your data model once, in TypeScript, and the framework generates a fully typed React client on top and a stateless Rust engine underneath that persists every model as an [Apache Iceberg](https://iceberg.apache.org/) table on object storage.

The database **is** object storage. Compute and storage are fully separated — like a SurrealDB-Gen-3 architecture — so the same engine runs on a Lambda, on your laptop, or **inside the browser** compiled to WebAssembly.

## Why it exists

Modern apps drown in glue: hand-written types that drift from the API, a database to provision and scale, a second client-side store to keep in sync, and a design system wired component by component. React API Stack collapses all of that into one authoring model and one compile step.

- **One source of truth.** Author a `resource` in TypeScript — or just a plain interface — and the compiler infers everything else, including foreign keys, from the type system.
- **Typed end-to-end.** The generated React hooks share their types with the API contract. Zero hand-written types, zero drift.
- **No server to run.** Storage is Parquet + Iceberg metadata on S3. Compute is stateless and scales to zero.
- **Runs anywhere.** The very same engine runs on the server, or locally in the browser over WASM for offline-first dev.

## The three surfaces

A single resource definition drives three surfaces at once:

| Surface | What you get |
| --- | --- |
| `API exposure` | TypeScript resource → `rastack compile` → OpenAPI → typed React hooks. |
| `Database storage` | A stateless Rust API that persists each model as an Iceberg table (Parquet + snapshots) on object storage. |
| `DevOps` | Serverless Rust on AWS Lambda with S3 as the system of record — scale-to-zero, infrastructure-as-code. |

## What a resource becomes

This is the whole loop. Author a resource:

```ts title="resources/airports.ts"
import { resource, s } from "rastack/define";

export const Airport = resource("airports", "airport", {
  code: s.string({ maxLength: 3, unique: true }),
  name: s.string({ maxLength: 120 }),
}, { search: ["code", "name"] });
```

Compile it, generate the client, and consume fully typed hooks in React:

```tsx title="app/airports.tsx"
import { useListAirports, useCreateAirport } from "@/entities";

const { data: airports } = useListAirports({ country: "JP" });

const create = useCreateAirport();
create.mutate({ code: "HND" }); // ✓ typesafe
```

> **Tip:** Ready to build? Head to [Installation](https://reactapistack.com/docs/installation.md) to add `rastack` to your project, then follow the [Quick Start](https://reactapistack.com/docs/quickstart.md).

---

_Source: [https://reactapistack.com/docs/introduction](https://reactapistack.com/docs/introduction) · Full docs as one file: [llms-full.txt](https://reactapistack.com/llms-full.txt)_
