Skip to content

Commit a75465e

Browse files
committed
Add documentation for developer teams
1 parent cdc0e0d commit a75465e

6 files changed

Lines changed: 61 additions & 1 deletion

File tree

docs/capabilities/server/settings-and-secrets.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Settings come in two scopes:
99
- **Subreddit settings**: Configurable by moderators for each installation
1010
- **Global settings & Secrets**: Set by developers and shared across all installations
1111

12+
:::warning
13+
Local environment variables and `.env` files are read during playtesting only.
14+
:::
15+
1216
## Defining settings
1317

1418
Settings are defined differently depending on whether you're using Devvit Web or Devvit Blocks.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Multiple Developers
3+
---
4+
5+
Multiple developers working on a single app can clash with each other's uploads during playtesting. This is due to the same playtest subreddit and app name being used.
6+
7+
Local environment variables allow multiple developers to share a single codebase while each having separate playtest subreddits and app names.
8+
9+
## Setup
10+
11+
- Keep `devvit.json` in git
12+
- Use local environment variables per developer to override the local targets used by the Devvit CLI:
13+
- `DEVVIT_SUBREDDIT` (where you playtest)
14+
- `DEVVIT_APP_NAME` (the app name the CLI uses)
15+
- Alternatively, use a local `.env` file and ensure it's not committed by adding it to `.gitignore`
16+
17+
This gives each developer an isolated development lane without forking the repository or repeatedly editing `devvit.json`.
18+
19+
:::warning
20+
Local environment variables and `.env` files are read during playtesting only. For API keys and other sensitive values, use [Settings and Secrets](/capabilities/server/settings-and-secrets).
21+
:::
22+
23+
## Why not remove `devvit.json` from git?
24+
25+
`devvit.json` is part of the app's core configuration, including capabilities, entry points, and permissions. If it isn't versioned, teammates can drift out-of-sync due to mismatched configurations. Instead, keep `devvit.json` stable and use local environment overrides.

sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ const sidebars: SidebarsConfig = {
286286
"guides/tools/logs",
287287
"guides/tools/playtest",
288288
"guides/tools/ui_simulator",
289+
"guides/tools/multiple_developers"
289290
],
290291
},
291292
{

versioned_docs/version-0.12/capabilities/server/settings-and-secrets.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Settings come in two scopes:
99
- **Subreddit settings**: Configurable by moderators for each installation
1010
- **Global settings & Secrets**: Set by developers and shared across all installations
1111

12+
:::warning
13+
Local environment variables and `.env` files are read during playtesting only.
14+
:::
15+
1216
## Defining settings
1317

1418
Settings are defined differently depending on whether you're using Devvit Web or Devvit Blocks.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Multiple Developers
3+
---
4+
5+
Multiple developers working on a single app can clash with each other's uploads during playtesting. This is due to the same playtest subreddit and app name being used.
6+
7+
Local environment variables allow multiple developers to share a single codebase while each having separate playtest subreddits and app names.
8+
9+
## Setup
10+
11+
- Keep `devvit.json` in git
12+
- Use local environment variables per developer to override the local targets used by the Devvit CLI:
13+
- `DEVVIT_SUBREDDIT` (where you playtest)
14+
- `DEVVIT_APP_NAME` (the app name the CLI uses)
15+
- Alternatively, use a local `.env` file and ensure it's not committed by adding it to `.gitignore`
16+
17+
This gives each developer an isolated development lane without forking the repository or repeatedly editing `devvit.json`.
18+
19+
:::warning
20+
Local environment variables and `.env` files are read during playtesting only. For API keys and other sensitive values, use [Settings and Secrets](/capabilities/server/settings-and-secrets).
21+
:::
22+
23+
## Why not remove `devvit.json` from git?
24+
25+
`devvit.json` is part of the app's core configuration, including capabilities, entry points, and permissions. If it isn't versioned, teammates can drift out-of-sync due to mismatched configurations. Instead, keep `devvit.json` stable and use local environment overrides.

versioned_sidebars/version-0.12-sidebars.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@
274274
"guides/tools/devvit_test",
275275
"guides/tools/logs",
276276
"guides/tools/playtest",
277-
"guides/tools/ui_simulator"
277+
"guides/tools/ui_simulator",
278+
"guides/tools/multiple_developers"
278279
]
279280
},
280281
{

0 commit comments

Comments
 (0)