Skip to content

RegioneER/collective-rercaptcha

Repository files navigation

collective-rercaptcha 🚀

Built with Cookieplone Black code style CI

Integration with rercaptcha in Plone

Quick Start 🏁

Prerequisites ✅

Installation 🔧

  1. Clone this repository, then change your working directory.

    git clone git@github.com:RegioneER/collective-rercaptcha.git
    cd collective-rercaptcha
  2. Install this code base.

    make install

Fire Up the Servers 🔥

  1. Create a new Plone site on your first run.

    make backend-create-site
  2. Start the backend at http://localhost:8080/.

    make backend-start
  3. In a new shell session, start the frontend at http://localhost:3000/.

    make frontend-start

Voila! Your Plone site should be live and kicking! 🎉

Local Stack Deployment 📦

Deploy a local Docker Compose environment that includes the following.

Run the following commands in a shell session.

make stack-create-site
make stack-start

And... you're all set! Your Plone site is up and running locally! 🚀

Project structure 🏗️

This monorepo consists of the following distinct sections:

  • backend: Houses the API and Plone installation, utilizing pip instead of buildout, and includes a policy package named collective.rercaptcha.
  • frontend: Contains the React (Volto) package.
  • devops: Encompasses Docker stack, Ansible playbooks, and cache settings.
  • docs: Scaffold for writing documentation for your project.

Why this structure? 🤔

  • All necessary codebases to run the site are contained within the repository (excluding existing add-ons for Plone and React).
  • Specific GitHub Workflows are triggered based on changes in each codebase (refer to .github/workflows).
  • Simplifies the creation of Docker images for each codebase.
  • Demonstrates Plone installation/setup without buildout.

Code quality assurance 🧐

To check your code against quality standards, run the following shell command.

make check

Format the codebase

To format and rewrite the code base, ensuring it adheres to quality standards, run the following shell command.

make format
Section Tool Description Configuration
backend Ruff Python code formatting, imports sorting backend/pyproject.toml
backend zpretty XML and ZCML formatting --
frontend ESLint Fixes most common frontend issues frontend/.eslintrc.js
frontend prettier Format JS and Typescript code frontend/.prettierrc
frontend Stylelint Format Styles (css, less, sass) frontend/.stylelintrc

Formatters can also be run within the backend or frontend folders.

Linting the codebase

or lint:

make lint
Section Tool Description Configuration
backend Ruff Checks code formatting, imports sorting backend/pyproject.toml
backend Pyroma Checks Python package metadata --
backend check-python-versions Checks Python version information --
backend zpretty Checks XML and ZCML formatting --
frontend ESLint Checks JS / Typescript lint frontend/.eslintrc.js
frontend prettier Check JS / Typescript formatting frontend/.prettierrc
frontend Stylelint Check Styles (css, less, sass) formatting frontend/.stylelintrc

Linters can be run individually within the backend or frontend folders.

Internationalization 🌐

Generate translation files for Plone and Volto with ease:

make i18n

Release 📦

To release a new version of this project, use the automated release process:

make release

Prerequisites for Release

Before running the release command, set up the required environment variables and authentication:

1. Set Environment Variables

# PyPI authentication
export UV_PUBLISH_TOKEN="your-pypi-token"

# GitHub (optional, for creating releases)
export GITHUB_TOKEN="your-github-token"

2. Verify npm Authentication

npm whoami

If this fails, run:

npm login

What the Release Process Does

The make release command automatically:

  1. ✅ Verifies required environment variables are set
  2. 🔧 Sets up Node.js from .nvmrc
  3. 🔐 Verifies npm authentication (npm whoami)
  4. 📦 Installs frontend dependencies (pnpm install)
  5. 🚀 Runs uvx repoplone release to:
    • Update version numbers in both backend and frontend
    • Update CHANGELOG files
    • Create git tags
    • Publish to PyPI (backend) and npm (frontend)
    • Create GitHub releases (if GITHUB_TOKEN is set)

Release Workflow

The release process will ask you to select the next version:

  • a (alpha): for pre-release versions
  • b (beta): for beta versions
  • release: for stable versions

Then it will:

  1. Update repository components (version, CHANGELOG, etc.)
  2. Release the backend package to PyPI
  3. Release the frontend package to npm
  4. Create a git tag
  5. Create a GitHub release (if configured)

Note: The process is fully automated once started. You only need to confirm the version selection at the beginning.

Credits and acknowledgements 🙏

Generated using Cookieplone (0.9.10) and cookieplone-templates (ca9ba9f) on 2026-03-02 14:55:03.494498. A special thanks to all contributors and supporters!

About

A CAPTCHA solution base on the framework open-source CapJS

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors