discourse/plugins/discourse-hcaptcha
Sérgio Saquetim 1654d529ef
DEV: Consolidate reusable components into ui-kit (#38703)
Consolidates reusable UI primitives from `app/components/`,
`app/helpers/`, and `app/modifiers/` into a dedicated `app/ui-kit/`
directory under a unified `d-` prefix naming convention. This gives
Discourse a single, discoverable home for the building-block parts of
the UI: generic primitives (buttons, inputs, modals, selects), layout
pieces (page headers, breadcrumbs, stat tiles), and lightly
Discourse-flavored display widgets (user info, badges, cook-text).

Helpers and modifiers live in `app/ui-kit/helpers/` and
`app/ui-kit/modifiers/` respectively.

### Backward compatibility

No existing imports or template invocations need to change. Old import
paths (e.g. `discourse/components/d-button`, `discourse/helpers/d-icon`)
keep working via runtime AMD `loaderShim` entries in
`app/ui-kit-shims.js`, so plugins and themes need zero changes.

An ESLint rule (shipped via `@discourse/lint-configs` 2.46.0) auto-fixes
imports in the codebase to use the new `discourse/ui-kit/...` paths.
Existing consumer files in `app/`, `admin/`, `plugins/`, and `frontend/`
have been re-imported through that rule in a single sweep, so the
codebase stays consistent.

### Tests

Test module identifiers and file paths now match the ui-kit directory
layout (`tests/integration/ui-kit/...`, `module("Integration | ui-kit |
...")`), keeping the test tree symmetric with `app/ui-kit/`.
2026-05-11 18:07:36 -03:00
..
app DEV: Clean up scope resolution operators in plugins (#34979) 2025-09-30 14:36:34 +02:00
assets DEV: Consolidate reusable components into ui-kit (#38703) 2026-05-11 18:07:36 -03:00
config I18N: Update translations (#37917) 2026-02-25 09:42:49 -05:00
db
lib/discourse_hcaptcha DEV: Remove unnecessary freeze calls (#35064) 2025-09-30 15:36:16 +02:00
spec DEV: Update rubocop (#38721) 2026-03-20 00:39:52 +01:00
test/javascripts
package.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00
plugin.rb UX: add admin sidebar icons for preinstalled plugins (#36764) 2025-12-18 16:39:00 -05:00
README.md
tsconfig.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00

Discourse hCaptcha Plugin

Overview

This plugin is designed to integrate HCaptcha into the sign-up form of Discourse forums. This plugin aims to enhance security and bot protection by leveraging the privacy-centric features of HCaptcha. The setup process is straightforward and consists of a few easy steps.

Installation

  1. Create an HCaptcha Account:

    • Visit HCaptcha to create an account. After registering, you'll receive a site key and a secret key.
  2. Setup Local Testing (Optional):

    • If you are testing locally, add a new virtual host entry to your hosts file. Include a line like 127.0.0.1 test.mydomain.com. Make sure the domain is valid, even if you don't own it, to ensure the HCaptcha script loads properly.
  3. Configure Plugin Settings:

    • Log into your Discourse admin panel.
    • Navigate to Admin > Settings > Plugins > hCaptcha (settings).
    • In this section, add the site key and secret key you obtained from HCaptcha.

By completing these steps, you will successfully integrate HCaptcha into the sign-up form of your community.