-
Notifications
You must be signed in to change notification settings - Fork 12
docs: Improve and expand project documentation #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
DarianM
merged 17 commits into
interledger:main
from
p-retrover:docs/improve-env-vars-guide
Oct 16, 2025
Merged
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
fe584b0
docs: improve environment variable documentation
p-retrover b0fb7db
Merge branch 'main' into docs/improve-env-vars-guide
p-retrover bf38fdb
Update frontend/README.md
p-retrover 4c37165
docs: address suggestions on documentation PR
p-retrover c23cdbb
Merge branch 'docs/improve-env-vars-guide' of https://github.com/p-re…
p-retrover 3253ee9
docs: improve environment variables guide
p-retrover 1823f9c
Merge branch 'main' into docs/improve-env-vars-guide
p-retrover 57a8ddc
Update docs/env-vars.md
p-retrover 0e3f6c7
Update docs/env-vars.md
p-retrover 44f04b9
Update docs/env-vars.md
p-retrover f0d9b80
Update docs/env-vars.md
p-retrover 25f24ac
Update frontend/README.md
p-retrover 36081ae
Update docs/env-vars.md
p-retrover 4fb8c6b
Update docs/env-vars.md
p-retrover 0c9124b
format
DarianM a56d306
Properly formated the docs using prettier
p-retrover 65b80d9
Merge remote-tracking branch 'origin/docs/improve-env-vars-guide' int…
p-retrover File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Publisher Tools - API | ||
|
|
||
| This package contains the Hono-based API server that powers the Publisher Tools. It runs on Cloudflare Workers and is responsible for fetching tool configurations, handling Open Payments, and managing probabilistic revenue sharing. | ||
|
|
||
| ## Endpoints | ||
|
|
||
| The API exposes endpoints related to the following functionalities: | ||
|
|
||
| * **Tool Configuration:** Handles fetching the configuration for the monetization tools (see `src/routes/get-config.ts`). | ||
| * **Payments:** Manages the Open Payments flow (see `src/routes/payment.ts`). | ||
| * **Probabilistic Revshare:** Handles logic related to probabilistic revenue sharing (see `src/routes/probabilistic-revshare.ts`). | ||
|
|
||
| ## Development | ||
|
|
||
| To run the API server for local development, you can use the `dev` script. | ||
|
|
||
| **From the project root:** | ||
| ```sh | ||
| pnpm -C api dev | ||
| ``` | ||
|
|
||
| **From this directory (`api/`):** | ||
| ```sh | ||
| pnpm dev | ||
| ``` | ||
|
|
||
| This will start the Cloudflare Wrangler development server, which automatically reloads on file changes. | ||
|
|
||
| ### Available Scripts | ||
|
|
||
| * `pnpm dev`: Starts the local development server. | ||
| * `pnpm build`: Builds the worker for deployment without deploying it. | ||
| * `pnpm typecheck`: Runs the TypeScript compiler to check for type errors. | ||
| * `pnpm deploy`: Deploys the worker to your Cloudflare account. | ||
|
p-retrover marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Publisher Tools - CDN | ||
|
|
||
| This package is responsible for building and delivering the final, browser-ready JavaScript assets (the banner and widget scripts) that publishers embed on their websites. | ||
|
|
||
| It takes the raw source code from the `@tools/components` package, bundles it using `esbuild`, and prepares it for delivery via the Cloudflare CDN. | ||
|
p-retrover marked this conversation as resolved.
|
||
|
|
||
| ## Build Process | ||
|
|
||
| The core of this package is the custom build script located at `build.js`. This script uses `esbuild` to compile the TypeScript source from `src/` and the components from the `components` package into distributable files. | ||
|
|
||
| The main entry points for the build are: | ||
| * `src/banner.ts` | ||
| * `src/widget.ts` | ||
|
|
||
| The output is placed in the `dist/` directory. | ||
|
|
||
| ## Development | ||
|
|
||
| To build the assets and run a local development server that simulates the CDN, use the `dev` script. This will watch for file changes in both the `cdn` and `components` packages and automatically rebuild. | ||
|
|
||
| **From the project root:** | ||
| ```sh | ||
| pnpm -C cdn dev | ||
| ``` | ||
|
|
||
| **From this directory (`cdn/`):** | ||
| ```sh | ||
| pnpm dev | ||
| ``` | ||
|
|
||
| ### Available Scripts | ||
|
|
||
| * `pnpm dev`: Runs the development build and a local server. | ||
| * `pnpm build`: Runs a one-time production build of all assets. | ||
| * `pnpm deploy`: Deploys the assets to the Cloudflare CDN. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Publisher Tools - Components | ||
|
|
||
| This package contains the core, embeddable web components for the Publisher Tools, built using the [Lit](https://lit.dev/) library. These components are intended to be placed on publishers' websites. | ||
|
|
||
| ## Core Components | ||
|
|
||
| * **Banner:** A notification banner that can be displayed on a publisher's site. The source is located in `src/banner.ts`. | ||
| * **Widget:** The interactive monetization widget. Its source code is in the `src/widget/` directory. | ||
|
|
||
| ## Build Process | ||
|
|
||
| This package contains the raw source code for the web components but does not have its own build process. | ||
|
|
||
| The components are imported and bundled by the **`cdn`** package, which is responsible for compiling them into a browser-ready format. Please see the `cdn` package for more details on the build and delivery process. | ||
|
p-retrover marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Development | ||
|
|
||
| The only available script is for type checking. | ||
|
|
||
| **From the project root:** | ||
| ```sh | ||
| pnpm -C components typecheck | ||
| ``` | ||
|
|
||
| **From this directory (`components/`):** | ||
| ```sh | ||
| pnpm typecheck | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Publisher Tools - Frontend | ||
|
|
||
| This package is the Remix frontend application for the Publisher Tools. It provides the dashboard where publishers configure the monetization tools for their websites. | ||
|
|
||
| ## Core Features | ||
|
|
||
| The dashboard allows users to customize and generate code for the following tools: | ||
|
|
||
| * **Index (`/`):** The main landing page for the tools. | ||
| * **Banner (`/banner`):** Configuration page for the notification banner. | ||
| * **Widget (`/widget`):** Configuration page for the monetization widget. | ||
| * **Link Tag (`/link-tag`):** Page for generating a monetized link tag. | ||
| * **Probabilistic Revshare (`/prob-revshare`):** UI for setting up probabilistic revenue sharing. | ||
|
p-retrover marked this conversation as resolved.
Outdated
|
||
| * **Payment Confirmation (`/payment-confirmation`):** A page to confirm payment status. | ||
|
p-retrover marked this conversation as resolved.
Outdated
|
||
|
|
||
| The application also includes API routes (e.g., `api.config.$type.ts`) that are handled by the Remix server. | ||
|
|
||
| ## Development | ||
|
|
||
| To run the frontend application for local development, use the `dev` script. | ||
|
|
||
| **From the project root:** | ||
| ```sh | ||
| pnpm -C frontend dev | ||
| ``` | ||
|
|
||
| **From this directory (`frontend/`):** | ||
| ```sh | ||
| pnpm dev | ||
| ``` | ||
|
|
||
| This will start the Remix development server, typically available at `http://localhost:3000`. | ||
|
|
||
| ### Available Scripts | ||
|
|
||
| * `pnpm dev`: Starts the local development server. | ||
| * `pnpm build`: Builds the application for production. | ||
| * `pnpm typecheck`: Runs the TypeScript compiler to check for type errors. | ||
| * `pnpm deploy`: Deploys the application to Cloudflare Pages. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.