# Agent DNA Marketplace — User Guide

> Step-by-step walkthrough for buyers, builders, and admins. NotebookLM-ready.

**Site:** https://agentmarketplace.diy
**Support:** hello@agentmarketplace.diy
**Legal:** /terms · /privacy

---

## 1. Getting started

### 1.1 Create an account
1. Open the site and click **Sign Up Free** in the top-right.
2. Choose one of:
   - **Continue with Google** (fastest), or
   - **Email + password.**
3. If you used email, check your inbox for a verification link and confirm.
4. You'll land back on the homepage, now signed in.

### 1.2 Sign in
- Visit `/login`.
- Use the same method you signed up with (Google or email).

### 1.3 Your profile
- Your `profiles` row is created automatically.
- Display name and avatar can be updated from the Vault page.

---

## 2. Browsing workflows

### 2.1 The homepage marketplace
- The hero search bar searches across **title, category, description, and badge**.
- The category dropdown narrows results to a single vertical.
- The **Popular** chip row jumps to specific categories.

### 2.2 Categories
Seven categories are surfaced as large tiles:

- Music · Media · Crypto · Education · Wellness · Real Estate · Creator Tools

Tap any category tile to filter the marketplace grid.

### 2.3 Workflow cards
Each card shows:
- A category badge
- Title and one-line description
- ⭐ rating and number of reviews
- Price (one-time)
- A **Buy & Add to Vault** button

---

## 3. Buying a workflow

1. Click **Buy & Add to Vault** on a workflow card.
2. If you're not signed in, you're sent to `/login` first.
3. A **Stripe checkout** session opens — pay with card.
4. On success, the purchase is recorded and the workflow appears in your **Vault**.
5. If anything fails, an error banner appears at the top of the marketplace section — try again or contact support.

> **God Mode buyers** (super-admin only) see a **👑 Claim Free** button instead of pay buttons. This is reserved for the platform owner.

---

## 4. Using your Vault

Visit `/vault` (link in the top-right when signed in).

The Vault contains:
- **Your purchases** — every workflow and bundle you own.
- **Customized build packages** — when you tailor a workflow.
- **Deliverables** — files, links, prompts, and assets attached to each product.
- **Provider setup guides** — step-by-step instructions for the third-party services each workflow needs.

You can return to the Vault any time; access is permanent.

---

## 5. Provider setup & costs

Before or after purchase, you can review:
- **Provider setup guides** — exact configuration steps for each external service (e.g. OpenAI, ElevenLabs, Stripe).
- **Cost profiles** — what the workflow typically costs to run per use, per month, or per unit of activity.
- **Provider cost estimates** — per-provider line items.

If a provider you depend on updates its terms or pricing, a **provider change alert** is generated for affected owners.

---

## 6. Submitting a custom request

If you need something that isn't in the marketplace:
1. Use the **Meet Our Community** or **Contact** links in the footer (`hello@agentmarketplace.diy`) — or the custom-request form when surfaced.
2. Describe what you need, your timeline, and your budget.
3. Your request is stored in `custom_requests` and reviewed by the operator.
4. You'll receive a reply by email.

---

## 7. Reviews & favorites

- **Favorite** a workflow from its card to save it for later (visible to you only).
- **Reviews** can be left by buyers who own the workflow. Ratings appear on the workflow card.

---

## 8. Bundles

Bundles group multiple workflows at a single price.
- They appear on the marketplace with their own badge and pricing.
- Buying a bundle adds **every** included workflow to your Vault in one transaction.

---

## 9. Admin features

> Admin links appear in the header only for users with the `admin` role.

### 9.1 Admin dashboard (`/admin`)
- Manage products, bundles, categories, pricing.
- Edit homepage settings (featured items, copy).
- Review purchases, custom requests, and reviews.
- Manage user roles via the `user_roles` table.

### 9.2 Super Admin / God Mode
- Reserved for `swadesoul@gmail.com`.
- Surfaced visually with the **God Mode badge** beside the admin actions in the header.
- Capabilities: claim products free, override checkout, see all Vault data for support, full RLS bypass (server-side only).

### 9.3 Operating principles
- Roles live in the dedicated `user_roles` table — never on `profiles`. This prevents privilege escalation.
- All sensitive mutations go through server functions with the `requireSupabaseAuth` middleware.

---

## 10. Account, privacy & email

- **Privacy Policy:** `/privacy`
- **Terms of Service:** `/terms`
- **Unsubscribe** from transactional emails via the link in the email footer; the unsubscribe token is honored via the `email_unsubscribe_tokens` and `suppressed_emails` tables.
- Email send history is logged for diagnostics (`email_send_log`, `email_send_state`).

---

## 11. Troubleshooting

| Symptom | Try this |
|---|---|
| "Sign in to Buy" button keeps appearing | You're signed out — open `/login` and sign back in. |
| Checkout fails with a red banner | Retry; if it persists, email support with the time and workflow title. |
| Purchase succeeded but Vault is empty | Hard-refresh once; if still empty, contact support — we can replay the purchase on the server. |
| "Unauthorized" errors | Your session expired. Sign out and back in. |
| Email didn't arrive | Check spam, then verify your address isn't in the suppression list (request via support). |
| Page looks broken on mobile | Pull-to-refresh; if it persists, send a screenshot to support. |

---

## 12. Quick reference: site map

- `/` — Marketplace + hero + featured workflows
- `/login` — Sign in / sign up
- `/vault` — Your purchased workflows
- `/admin` — Admin dashboard (admins only)
- `/about` — What the platform is and who it helps
- `/guide` — This user guide
- `/privacy` — Privacy policy
- `/terms` — Terms of service

---

## 13. Support

Email **hello@agentmarketplace.diy** for product, billing, or technical questions.
Legal: **legal@agentmarketplace.diy**.
