Skip to content

Implement app creation charges, moderation, and user bans#565

Merged
asim merged 2 commits intomainfrom
claude/add-wallet-transfers-74PHC
Apr 16, 2026
Merged

Implement app creation charges, moderation, and user bans#565
asim merged 2 commits intomainfrom
claude/add-wallet-transfers-74PHC

Conversation

@asim
Copy link
Copy Markdown
Member

@asim asim commented Apr 16, 2026

No description provided.

claude added 2 commits April 16, 2026 04:54
App creation via handleCreate was completely free — no wallet charge.
Added CheckQuota + ConsumeQuota (1 credit, OpSocialPost). Also added
async moderation: flag.CheckContent runs on name + description after
creation. If flagged, the author is auto-banned.

GetPublicApps now filters out apps from banned users and flagged apps
so spam apps disappear from all listings immediately on ban.
…e usernames

Middleware-level write gate:
chargedWriteOp(r) maps method+path to a wallet operation. The
middleware in main.go runs CanPost, CheckPostRate, CheckQuota, and
ConsumeQuota ONCE for all matching routes, with a log line on every
charge. Per-handler charging has been stripped from social, blog,
apps, work, user/status, and builder handlers — they only do domain
logic now. Covers UI, API, and MCP uniformly.

Invite-only signup (INVITE_ONLY=true):
- auth/invite.go: invite code store (invites.json), create/validate/
  consume/list functions. Codes are 32-char hex, single-use.
- Web signup checks invite code from URL (?invite=xxx) or form field.
  Without a valid code, shows "invite only" page. Code persists as a
  hidden form field across validation errors.
- MCP signup tool accepts optional invite param, rejects when
  invite-only is enabled without a valid code.
- Admin console: invite <email> generates code + link, invites lists
  all. /admin/invite page has a form that creates the invite and
  emails the link (if mail configured).
- Home page: admins see "+ Invite user" link top-right when
  invite-only mode is on.

Username profanity filter (auth/username.go):
ValidateUsername blocks obscene substrings (penis, cock, femboy, etc.)
and reserved names (admin, system, root). Applied to both web signup
and MCP signup.

App delete fixes:
- renderMenu Delete action now sends POST (not DELETE) to match
  handlers. Was sending DELETE which didn't match the POST route.
- Redirect after delete uses URL-pattern-derived paths (/apps for
  apps, /social for social, /work for work) instead of the broken
  document.referrer||'/' which fell back to homepage.
- Apps: moderation on create (flag.CheckContent + auto-ban), charging
  (1 credit via middleware), banned-user filtering in GetPublicApps.

24-hour account age requirement:
CanPost now requires accounts to be >= 24 hours old before they can
post anything (blog, social, status, apps, work), in addition to
email verification. PostBlockReason shows remaining time.

https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm
@asim asim merged commit 691604b into main Apr 16, 2026
2 checks passed
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.

2 participants