Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions site/components/HighlightLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export function HighlightLink({
href,
title,
}: { title: string; href: string }) {
return (
<a
href={href}
style={{ textDecoration: 'none' }}
className="vocs_Anchor vocs_link vocs_Link_accent"
>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
{title}{' '}
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="20"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<title>right arrow</title>
<path d="M5 12h14" />
<path d="m12 5 7 7-7 7" />
</svg>
</div>
</a>
)
}
2 changes: 2 additions & 0 deletions site/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './Caption.tsx'
export * from './HighlightLink.tsx'
118 changes: 118 additions & 0 deletions site/pages/docs/concepts/embeds.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
title: Manifest
description: Permisionlessly publish your Mini App
---

import { Caption, HighlightLink } from '../../../components/index.ts';

# Manifest

A Manifest defines global metadata about a Mini App such as who the author is,
what the app is called, and the icon to use for it. This data is used to to
more deeply integrate into Farcaster clients and as well as be listed in Mini
App Stores.

<HighlightLink href="/docs/guides/publishing" title="Learn how to create a Manifest in our Publishing Guide" />


## Format

Manifests are JSON files hosted at `/.well-known/farcaster.json` on the [Fully
Qualified Domain
Name](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) of the Mini
App.


## Schema

| Property | Type | Required | Description |
|--------------------|--------|----------|--------------------------------------------------|
| accountAssociation | object | Yes | Verifies domain ownership to a Farcaster account |
| frame | object | Yes | Metadata about the Mini App |

### accountAssociation

The account association verifies authorship of this domain to a Farcaster
account.

The value is set to the JSON representation of a [JSON Farcaster
Signature](https://github.com/farcasterxyz/protocol/discussions/208) from the
account's custody address with the following payload:

```json
{ domain: "<domain>" }
```

The `domain` value must exactly match the FQDN of where it is hosted.

#### Schema

| Property | Type | Required | Description |
|-----------|--------|----------|---------------------------|
| header | string | Yes | base64 encoded JFS header |
| payload | string | Yes | base64 encoded payload |
| signature | string | Yes | base64 encoded signature |


#### Example

```json
{
"header": "eyJmaWQiOjM2MjEsInR5cGUiOiJjdXN0b2R5Iiwia2V5IjoiMHgyY2Q4NWEwOTMyNjFmNTkyNzA4MDRBNkVBNjk3Q2VBNENlQkVjYWZFIn0",
"payload": "eyJkb21haW4iOiJ5b2luay5wYXJ0eSJ9",
"signature": "MHgwZmJiYWIwODg3YTU2MDFiNDU3MzVkOTQ5MDRjM2Y1NGUxMzVhZTQxOGEzMWQ5ODNhODAzZmZlYWNlZWMyZDYzNWY4ZTFjYWU4M2NhNTAwOTMzM2FmMTc1NDlmMDY2YTVlOWUwNTljNmZiNDUxMzg0Njk1NzBhODNiNjcyZWJjZTFi"
}
```

### frame

Metadata needed to by Hosts to distribute the Mini App.

import ManifestAppConfigSchema from "../../../snippets/manifestAppConfigSchema.mdx"

<ManifestAppConfigSchema />


#### Example

import ManifestAppConfigExample from "../../../snippets/manifestAppConfigExample.mdx"

<ManifestAppConfigExample />


## Example

Example of a valid farcaster.json manifest:

```json
{
"accountAssociation": {
"header": "eyJmaWQiOjM2MjEsInR5cGUiOiJjdXN0b2R5Iiwia2V5IjoiMHgyY2Q4NWEwOTMyNjFmNTkyNzA4MDRBNkVBNjk3Q2VBNENlQkVjYWZFIn0",
"payload": "eyJkb21haW4iOiJ5b2luay5wYXJ0eSJ9",
"signature": "MHgwZmJiYWIwODg3YTU2MDFiNDU3MzVkOTQ5MDRjM2Y1NGUxMzVhZTQxOGEzMWQ5ODNhODAzZmZlYWNlZWMyZDYzNWY4ZTFjYWU4M2NhNTAwOTMzM2FmMTc1NDlmMDY2YTVlOWUwNTljNmZiNDUxMzg0Njk1NzBhODNiNjcyZWJjZTFi"
},
"frame": {
"version": "1",
"name": "Yoink!",
"iconUrl": "https://yoink.party/logo.png",
"homeUrl": "https://yoink.party/framesV2/",
"imageUrl": "https://yoink.party/framesV2/opengraph-image",
"buttonTitle": "🚩 Start",
"splashImageUrl": "https://yoink.party/logo.png",
"splashBackgroundColor": "#f5f0ec",
"webhookUrl": "https://yoink.party/api/webhook"
}
}
```

## Versioning

Manifests will follow a simple versioning scheme where non-breaking
changes can be added to the same version but a breaking change must accompany a
version bump.


## Caching

Farcaster clients may cache the manifest for a Mini App but should provide a
way for refreshing the manifest file.
118 changes: 118 additions & 0 deletions site/pages/docs/concepts/manifest.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
title: Manifest
description: Permisionlessly publish your Mini App
---

import { Caption, HighlightLink } from '../../../components/index.ts';

# Manifest

A Manifest defines global metadata about a Mini App such as who the author is,
what the app is called, and the icon to use for it. This data is used to to
more deeply integrate into Farcaster clients and as well as be listed in Mini
App Stores.

<HighlightLink href="/docs/guides/publishing" title="Learn how to create a Manifest in our Publishing Guide" />


## Format

Manifests are JSON files hosted at `/.well-known/farcaster.json` on the [Fully
Qualified Domain
Name](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) of the Mini
App.


## Schema

| Property | Type | Required | Description |
|--------------------|--------|----------|--------------------------------------------------|
| accountAssociation | object | Yes | Verifies domain ownership to a Farcaster account |
| frame | object | Yes | Metadata about the Mini App |

### accountAssociation

The account association verifies authorship of this domain to a Farcaster
account.

The value is set to the JSON representation of a [JSON Farcaster
Signature](https://github.com/farcasterxyz/protocol/discussions/208) from the
account's custody address with the following payload:

```json
{ domain: "<domain>" }
```

The `domain` value must exactly match the FQDN of where it is hosted.

#### Schema

| Property | Type | Required | Description |
|-----------|--------|----------|---------------------------|
| header | string | Yes | base64 encoded JFS header |
| payload | string | Yes | base64 encoded payload |
| signature | string | Yes | base64 encoded signature |


#### Example

```json
{
"header": "eyJmaWQiOjM2MjEsInR5cGUiOiJjdXN0b2R5Iiwia2V5IjoiMHgyY2Q4NWEwOTMyNjFmNTkyNzA4MDRBNkVBNjk3Q2VBNENlQkVjYWZFIn0",
"payload": "eyJkb21haW4iOiJ5b2luay5wYXJ0eSJ9",
"signature": "MHgwZmJiYWIwODg3YTU2MDFiNDU3MzVkOTQ5MDRjM2Y1NGUxMzVhZTQxOGEzMWQ5ODNhODAzZmZlYWNlZWMyZDYzNWY4ZTFjYWU4M2NhNTAwOTMzM2FmMTc1NDlmMDY2YTVlOWUwNTljNmZiNDUxMzg0Njk1NzBhODNiNjcyZWJjZTFi"
}
```

### frame

Metadata needed to by Hosts to distribute the Mini App.

import ManifestAppConfigSchema from "../../../snippets/manifestAppConfigSchema.mdx"

<ManifestAppConfigSchema />


#### Example

import ManifestAppConfigExample from "../../../snippets/manifestAppConfigExample.mdx"

<ManifestAppConfigExample />


## Example

Example of a valid farcaster.json manifest:

```json
{
"accountAssociation": {
"header": "eyJmaWQiOjM2MjEsInR5cGUiOiJjdXN0b2R5Iiwia2V5IjoiMHgyY2Q4NWEwOTMyNjFmNTkyNzA4MDRBNkVBNjk3Q2VBNENlQkVjYWZFIn0",
"payload": "eyJkb21haW4iOiJ5b2luay5wYXJ0eSJ9",
"signature": "MHgwZmJiYWIwODg3YTU2MDFiNDU3MzVkOTQ5MDRjM2Y1NGUxMzVhZTQxOGEzMWQ5ODNhODAzZmZlYWNlZWMyZDYzNWY4ZTFjYWU4M2NhNTAwOTMzM2FmMTc1NDlmMDY2YTVlOWUwNTljNmZiNDUxMzg0Njk1NzBhODNiNjcyZWJjZTFi"
},
"frame": {
"version": "1",
"name": "Yoink!",
"iconUrl": "https://yoink.party/logo.png",
"homeUrl": "https://yoink.party/framesV2/",
"imageUrl": "https://yoink.party/framesV2/opengraph-image",
"buttonTitle": "🚩 Start",
"splashImageUrl": "https://yoink.party/logo.png",
"splashBackgroundColor": "#f5f0ec",
"webhookUrl": "https://yoink.party/api/webhook"
}
}
```

## Versioning

Manifests will follow a simple versioning scheme where non-breaking
changes can be added to the same version but a breaking change must accompany a
version bump.


## Caching

Farcaster clients may cache the manifest for a Mini App but should provide a
way for refreshing the manifest file.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Mini App URLs
description: How to use Mini App URLs
title: Universal Links
description: Link users into your Mini App from anywhere
---

import { Caption } from '../../../components/Caption.tsx';
import { Caption } from '../../../components/Caption';

# Mini App URLs
# Universal Links

Mini Apps have a canonical URL that can be used to share across social feeds
and web sites. The URL format is as follows:
Universal Links give you a single URL that can be shared outside Farcaster in
other social feeds and website that will bring users to your Mini App.

`https://farcaster.xyz/miniapps/<app-id>/<app-slug>(/<sub-path>)(?<query-params>)`

Expand All @@ -19,19 +19,19 @@ and web sites. The URL format is as follows:

The `<sub-path>` and `<query-params>` are optional and can be used to navigate to a specific page in the Mini App or pass data to the Mini App.

When a user clicks a Mini App URL and is logged in:
When a user clicks a Universal Link and is logged in:
- **On web**: the Mini App opens in the mini app drawer.
- **On mobile**: the browser deep links to the Farcaster app and opens the Mini App.


## Where to find the Mini App URL
## Where to find the Universal Link

On the web [Developers page](https://farcaster.xyz/~/developers), click the top-right
kebab menu on one of your Mini App cards and select **"Copy link to mini app"**. This
copies the Mini App URL to your clipboard.
copies the Universal Link to your clipboard.

When the Mini App is open, tap on the top-right kebab menu and select **"Copy link"** to
copy the Mini App URL to your clipboard.
copy the Universal Link to your clipboard.

![Copy link to mini app](/copy_link_to_miniapp.png)

Expand All @@ -40,14 +40,14 @@ copy the Mini App URL to your clipboard.
</Caption>


## How to control what is displayed when I share a Mini App URL
## How to control what is displayed when I share a Universal Link

Farcaster automatically generates OpenGraph meta tags for Mini App URLs, ensuring
Farcaster automatically generates OpenGraph meta tags for Universal Links, ensuring
they render correctly when shared on social platforms or web apps that support embedded
link previews, such as X.

To make sure your Mini App displays as intended, include the `fc:frame` meta tag on all
Mini App URLs (see ["Sharing your app"](/docs/guides/sharing)) and add all relevant fields
Universal Links (see ["Sharing your app"](/docs/guides/sharing)) and add all relevant fields
in your [application config](/docs/guides/publishing#define-your-application-configuration),
especially `ogTitle`, `ogDescription` and `ogImageUrl`.

Expand All @@ -58,7 +58,7 @@ Each Mini App defines a `homeUrl` property in its [application config](/docs/gui
When a user clicks on a Mini App in the Farcaster client's Mini App explorer, a
WebView (on mobile) or iframe (on web) pointing to the `homeUrl` is opened.

If you share a Mini App URL with a sub-path and/or query parameters, those are appended
If you share a Universal Link with a sub-path and/or query parameters, those are appended
to the `homeUrl`'s path and query string.

For example, if the `homeUrl` is `https://example.com/miniapp/v1` and the Mini App
Expand All @@ -70,14 +70,14 @@ URL is `https://farcaster.xyz/miniapps/12345/example-miniapp/leaderboard?sort=po

Not at the moment.

**When copying the link from the Mini App header, it doesn't copy the Mini App URL, why is that?**
**When copying the link from the Mini App header, it doesn't copy the Universal Link, why is that?**

Any URL with a valid `fc:frame` meta tag shared in a cast will be treated as a Mini App.
Copying the link from these Mini Apps will copy the original URL shared in the cast, not the canonical Mini App URL.
Copying the link from these Mini Apps will copy the original URL shared in the cast, not the canonical Universal Link.

**Can I add a sub-path or query params to the Mini App URL copied from the Mini App header?**
**Can I add a sub-path or query params to the Universal Link copied from the Mini App header?**

Not at the moment. Only the canonical Mini App URL or URL shared in the cast will be copied.
Not at the moment. Only the canonical Universal Link or URL shared in the cast will be copied.

**Can I open a Mini App from another Mini App?**

Expand All @@ -90,4 +90,4 @@ import { sdk } from '@farcaster/frame-sdk'

const url = 'https://farcaster.xyz/miniapps/deoWzfI9kLjH/rewards'
await sdk.actions.openUrl(url)
```
```
5 changes: 2 additions & 3 deletions site/pages/docs/guides/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Authenticating users
description: Authenticating users in your mini app
---

import { Caption } from '../../../components/Caption.tsx';
import { Caption, HighlightLink } from '../../../components/index.ts';

# Authenticating users

Expand All @@ -23,8 +23,7 @@ Farcaster](https://docs.farcaster.xyz/developers/siwf/) under the hood to
authenticate the user and returns a standard JWT that can be easily verified by
your server and used as a session token.

[<div style={{ display: 'flex', alignItems: 'center', gap: 8}}>Get started with Quick Auth <svg xmlns="http://www.w3.org/2000/svg" width="16" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></div>](/docs/sdk/quick-auth)

<HighlightLink href="/docs/sdk/quick-auth" />

## Sign In with Farcaster

Expand Down
Loading