Skip to content

[docs]: clarify CostService usage and improve metered services discoverability #1285

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

Closed
wants to merge 3 commits into from

Conversation

TanCodeX
Copy link
Contributor

What does this PR do?

This PR improves and clarifies the documentation around Metered Services and CostService, which are key to Puter's open-source usage-based billing system.

Included in this PR:

  • Improved structure and content in src/backend/doc/features/metered-services.md
  • A reference link in puterai/README.md (intro section) to direct users to the metered services doc
  • A short pointer in src/backend/README.md to guide developers toward backend documentation

These changes ensure contributors can easily find and understand how Puter handles usage billing through CostService.

Fixes #1282

Type of Change

  • Bug fix
  • Documentation update
  • New feature
  • Refactor
  • Breaking change

How Should This Be Tested?

  • Confirm the link in puterai/README.md is visible and points correctly
  • Open src/backend/README.md and verify the reference to metered services doc is included
  • Review the updated metered-services.md for clarity, accuracy, and structure

Checklist

  • I’ve read the contributing guide
  • My updates follow the style and documentation conventions of this project
  • I’ve commented where needed for clarity
  • No build errors or warnings introduced
  • All necessary documentation updates are included

@TanCodeX TanCodeX changed the title docs: Metered services documented [docs]: clarify CostService usage and improve metered services discoverability May 27, 2025
@KernelDeimos
Copy link
Contributor

Hi, great contribution - based on the document you not only understand how the system works very well but also the nuances in our terminology for different aspects of the system (for example what an actor is, which is not very well explained in our documentation currently)

The only thing preventing me from merging this is whitespace changes in src/gui/src/helpers/update_username_in_gui.js - was this an editor side-effect or are there changes to this file as well? There are two reasons why this blocks merging:

  • I try to keep documentation changes strictly separate from code changes. We're unlikely to revert documentation changes, but code changes are always subject for a revert if they cause unintended consequences.
  • I try to avoid unnecessary whitespace changes unless a PR is specifically addressing whitespace changes. This is a hard rule for me because it makes PRs more difficult to review and makes it more likely that another reviewer or myself will miss something of significant consequence.

@TanCodeX
Copy link
Contributor Author

@KernelDeimos Thanks for pointing this out the changes to src/gui/src/helpers/update_username_in_gui.js were unintentional and a side effect of my editor’s auto-formatting settings. There are no logic or functionality changes in this file; the diff only includes whitespace adjustments (like indentation or line breaks).

To keep the PR clean and focused, I’ll revert those formatting changes so that only the intended documentation/code changes are included. I completely understand your policy on keeping whitespace and documentation/code changes separate — thanks for the clarification.

@TanCodeX TanCodeX closed this by deleting the head repository May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[doc] metered services
2 participants