You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/capabilities/blocks/blocks_payments.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Adding Payments
1
+
# Adding payments
2
2
3
3
You can use the payments template to build your app or add payment functionality to an existing app.
4
4
@@ -42,7 +42,7 @@ Each product in the products field has the following attributes:
42
42
|`sku`| A product identifier that can be used to group orders or organize your products. Each sku must be unique for each product in your app. |
43
43
|`displayName`| The official name of the product that is displayed in purchase confirmation screens. The name must be fewer than 50 characters, including spaces. |
44
44
|`description`| A text string that describes the product and is displayed in purchase confirmation screens. The description must be fewer than 150 characters, including spaces. |
45
-
|`price`| An predefined integer that sets the product price in Reddit gold. See details below. |
45
+
|`price`| An predefined integer that sets the product price in Reddit Gold. See details below. |
46
46
|`image.icon`|**(optional)** The path to the icon that represents your product in your assets folder. |
47
47
|`metadata`|**(optional)** An optional object that contains additional attributes you want to use to group and filter products. Keys and values must be alphanumeric (a - Z, 0 - 9, and - ) and contain 30 characters or less. You can add up to 10 metadata keys. Metadata keys cannot start with "devvit-". |
48
48
|`accountingType`| Categories for how buyers consume your products. Possible values are: <ul><li>`INSTANT` for purchased items that are used immediately and disappear.</li><li>`DURABLE` for purchased items that are permanently applied to the account and can be used any number of times</li><li>`CONSUMABLE` for items that can be used at a later date but are removed once they are used.</li><li>`VALID_FOR_` values indicate a product can be used throughout a period of time after it is purchased.</li></ul> |
@@ -74,7 +74,7 @@ You’ll need to clearly identify paid products or services. Here are some best
74
74
- Use a short name, description, and image for each product.
75
75
- Don’t overwhelm users with too many items.
76
76
- Try to keep purchases in a consistent location or use a consistent visual pattern.
77
-
- Only use the gold icon to indicate purchases for Reddit gold.
77
+
- Only use the gold icon to indicate purchases for Reddit Gold.
Copy file name to clipboardExpand all lines: docs/capabilities/client/forms.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ A form lets your app ask users to input and submit data. Forms can be defined wi
152
152
</TabItem>
153
153
</Tabs>
154
154
155
-
## Menu Response Forms
155
+
## Menu response forms
156
156
157
157
For forms that open from a menu item, you can use menu responses. This is useful since you do not have access to the `@devvit/web/client` library from a menu item endpoint.
Copy file name to clipboardExpand all lines: docs/capabilities/client/menu-actions.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
importTabsfrom"@theme/Tabs";
2
2
importTabItemfrom"@theme/TabItem";
3
3
4
-
# Menu Actions
4
+
# Menu actions
5
5
6
6
Add an item to the three dot menu for posts, comments, or subreddits. Menu actions can perform immediate client effects or trigger server processing followed by client effects.
7
7
8
8

9
9
10
-
## Basic Menu Actions
10
+
## Basic menu actions
11
11
12
12
**For most menu actions, use direct client effects.** These provide immediate responses and are perfect for simple actions that don't require server processing.
Copy file name to clipboardExpand all lines: docs/capabilities/client/overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
importTabsfrom'@theme/Tabs';
2
2
importTabItemfrom'@theme/TabItem';
3
3
4
-
# Overview
4
+
# Client Overview
5
5
6
6
Client-side effects enable your Devvit app to provide interactive feedback and navigation to users. These effects include showing toasts, displaying forms, navigating to different pages, and more.
Copy file name to clipboardExpand all lines: docs/capabilities/devvit-web/devvit_web_configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Configure Your App
1
+
# Configure your app
2
2
3
3
The devvit.json file serves as your app's configuration file. Use it to specify entry points, configure features like [event triggers](../server/triggers) and [scheduled actions](../server/scheduler.mdx), and enable app functionality such as [image uploads](../server/media-uploads.mdx). This page covers all available devvit.json configuration options. A complete devvit.json example file is provided [here](#complete-example).
| Serverless endpoints | The node server will run just long enough to execute your endpoint function and return a response, which means you can’t use packages that require long-running connections like streaming. |
37
+
| Serverless endpoints | The node server will run just long enough to execute your endpoint function and return a response, which means you can't use packages that require long-running connections like streaming. |
38
38
| Package limitations | Developers cannot use `fs` or external native packages. For now, we recommend using external services over the native dependencies, such as [StreamPot](https://streampot.io/) (instead of ffmpeg) and [OpenAI](https://platform.openai.com/docs/guides/embeddings) (instead of @xenova/transformers) . |
39
-
| Single request and single response handling only | Streaming or chunked responses and websockets are not supported. Long-polling is supported if it’s under the max request time. |
40
-
| No external requests from your client | You can’t have any external requests other than the app's webview domain. All backend responses are locked down to the webview domain via CSP. (Your backend can make external fetch requests though.) |
39
+
| Single request and single response handling only | Streaming or chunked responses and websockets are not supported. Long-polling is supported if it's under the max request time. |
40
+
| No external requests from your client | You can't have any external requests other than the app's webview domain. All backend responses are locked down to the webview domain via CSP. (Your backend can make external fetch requests though.) |
41
+
| localStorage clears on app updates | The iframe URL changes with each app version, so `localStorage` data is lost when you publish an update. Use [Redis](../server/redis.mdx) for data that needs to persist across app versions. |
41
42
42
43
Devvit Web still has the same technical requirements:
Copy file name to clipboardExpand all lines: docs/capabilities/server/cache-helper.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
importTabsfrom'@theme/Tabs';
2
2
importTabItemfrom'@theme/TabItem';
3
3
4
-
# Cache Helper
4
+
# Cache helper
5
5
6
6
Cache helper lets you build a more performant app by reducing the number of server side calls for the same data. You can create a short-term cache that stores JSON objects in your Devvit app for a limited amount of time. This is valuable when you have many clients trying to get the same data, for example a stock ticker value or a sports score.
Copy file name to clipboardExpand all lines: docs/capabilities/server/launch_screen_and_entry_points/launch_overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Overview
1
+
# View Modes, Launch Screens, and Entry Points
2
2
3
3
Devvit’s interactive framework gives you powerful ways to shape how users experience apps, from launch screen to expanded screen viewing. With view modes, HTML-based launch screens, and multiple entry points, you can design apps that feel native and respond to how users interact across the Reddit platform.
Copy file name to clipboardExpand all lines: docs/capabilities/server/launch_screen_and_entry_points/view_modes_entry_points.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Setting up View Modes and Entry Points
1
+
# Setting up view modes and entry points
2
2
3
-
## View Modes
3
+
## View modes
4
4
5
5
Devvit apps support two view modes:
6
6
@@ -18,7 +18,7 @@ Devvit apps support two view modes:
18
18
-**Use case**: Full games, longer load times, detailed interfaces, or any content that needs more space or full gesture support
19
19
-**Trigger**: User-initiated only (button click, gesture, etc.)
20
20
21
-
## Multiple Entry Points
21
+
## Multiple entry points
22
22
23
23
Multiple entry points let the user start the game from different contexts or states. For example, you can have a button that launches into a leaderboard view and another for a specific game mode, each of these would be configured as an entry point for your app. Define multiple entry points in your `devvit.json`. If you use the [Devvit Vite plugin](../../../guides/tools/vite), it automatically infers the client build inputs from these entrypoints, so you don't need to maintain a custom Rollup `input` list.
24
24
@@ -78,7 +78,7 @@ your-app/
78
78
79
79
The `dir` property specifies where your built client files are located. With the Devvit Vite plugin, the `entry` values point at your source HTML files (for example `src/client/preview.html`), and the plugin outputs the matching files into `dist/client` during `vite build`.
80
80
81
-
### Creating Posts with Specific Entry Points
81
+
### Creating posts with specific entry points
82
82
83
83
Use the `entry` parameter when creating posts to specify which entry point from your `devvit.json` configuration to use. The entry value must match one of the keys defined in `post.entrypoints`.
84
84
@@ -118,7 +118,7 @@ async function createGamePost(context: any) {
118
118
- Each entry point can have its own HTML file and height setting.
119
119
- Invalid entry point names will cause an error.
120
120
121
-
### Switching Between View Modes
121
+
### Switching between view modes
122
122
123
123
You can transition from inline mode to expanded mode with a different entry point, like this:
0 commit comments