# Marketplace Kit · Aperture

> A services marketplace for iOS, Android and web, with a buyer side and a seller workspace in one app.

The OTF **Marketplace Kit (Aperture)** is a two-sided services marketplace. Buyers browse
services, open seller profiles, pick a package, send a project brief, check out and track the
order. Sellers get a workspace with earnings, incoming orders, a service editor, analytics and a
customer list. One codebase ships iOS, Android and web. Run it live on
[its kit page](/templates/marketplace-kit#run-it-live) or at
[marketplace-preview.otf-kit.dev](https://marketplace-preview.otf-kit.dev).

## Stack

| Layer       | Choice                                                              |
| ----------- | ------------------------------------------------------------------- |
| Framework   | Expo SDK 54 + React 19 + Expo Router (iOS · Android · Web)          |
| Data        | TanStack Query                                                      |
| Server      | Hono on Bun                                                         |
| DB          | Postgres + Drizzle                                                  |
| Auth        | Better Auth + `@better-auth/expo`: email, Google and a demo login   |
| Payments    | Optional Stripe Checkout wiring on the server                       |
| Email       | Optional Resend order emails                                        |
| Deploy      | Railway (web + API) and EAS Build (native)                          |

## Pre-built screens

**Buyer side**

- **Auth**: onboarding, login and signup
- **Home** and **Discover**, with **search** and **filters**
- **Provider profile** and **book a service**, then **booking confirmed**
- **Orders** and **order detail**, with **chat** per order
- **Saved services**, **bookmarks**, **notifications** and **profile**

**Seller workspace**

- **Overview** with earnings
- **Orders**, **order detail** and **chat**
- **Services** and the **service editor**
- **Analytics**, **customers**, **payments** and **profile**

## Conventions

- **Demo first**: **Try the demo** on the login screen works without a backend; the app falls
  back to local demo data. With the backend running, demo sign-in goes through the API, and it is
  off in production builds unless you set `DEMO_LOGIN_ENABLED=1`.
- **Two sides, one app**: buyer screens live under `app/(home)/`, the seller workspace under
  `app/seller/`, and both call one backend.

## Adding things

The kit's `ai/prompts/` folder has 21 task prompts for common changes. `CLAUDE.md`, `AGENTS.md`
and `.cursorrules` give your editor the same context.

## Deploy

`bun install`, copy `.env.example` to `.env`, then `bun run dev`. The preview works without
Postgres; for the full backend set `DATABASE_URL` and run `bun run db:generate`,
`bun run db:migrate`, `bun run db:seed` and `bun run dev:server:full`. Railway deploys the web
export and the API; native apps ship through EAS Build. The deployment guide ships with the kit.

## Required env

| Variable              | Purpose                                     |
| --------------------- | ------------------------------------------- |
| `DATABASE_URL`        | Postgres connection string                  |
| `BETTER_AUTH_SECRET`  | 32+ characters; signs sessions              |
| `BETTER_AUTH_URL`     | Public origin of the API                    |

Stripe and Resend variables are optional; `.env.example` lists them.

## Buy

<DocsBundleBuyButton source="docs_kit_page" />

[$99 on otf-kit.dev](https://otf-kit.dev/templates/marketplace-kit) — or get the
[Everything Bundle](/docs/templates/starter-bundle) ($149 = 5 live kits + all 15 landing templates; $630 separately, save $481.)
