Resgata Pet

Description

Resgata Pet helps independent animal rescuers publish the animals they have rescued, receive adoption requests, raise funds through monthly sponsorships and report on how the money is used.

It was built for rescuers in Brazil: the plugin interface is written in Brazilian Portuguese, phone numbers and the Pix key follow Brazilian formats, and sponsorships are charged in BRL.

Modules:

  • Animals (available): records with profile, health information and a photo gallery (before and after), a public list with filters and an individual page for each animal.
  • Adoption requests (available): a questionnaire on the site, sent through the rescuer’s WhatsApp, with a queue of requests in the panel.
  • Sponsorship (available): monthly plans paid by card through Stripe, a thank-you page, a password-free sponsor area (with the total donated so far), a record of every payment in the panel and a sponsor counter on the site.
  • Accountability (coming soon)

The plugin also includes its own mobile-first panel at /painel, the rescuer’s settings (contact details, social networks, location and Pix key), a “How to help” page with a Pix QR code and banners for the home page.

The plugin works with any theme. A theme can replace the templates by creating a resgata-pet/ folder and take over the styling by declaring add_theme_support( 'resgata-pet' ).

External services

The sponsorship module, which is off by default, uses Stripe (https://stripe.com) to receive payments. With the module on and the keys set:

  • when a visitor chooses a plan, they are taken to Stripe’s payment page, where they enter their name, e-mail address and card;
  • the site sends Stripe the chosen plan and the return address, and asks Stripe to open the customer portal when a sponsor wants to change the card, change the amount or cancel;
  • Stripe notifies the site (webhook) about subscriptions, payments, refunds and disputes.

Terms of service: https://stripe.com/legal. Privacy policy: https://stripe.com/privacy.

The Pix QR code is built in the visitor’s browser from the key registered by the rescuer, without sending data to any service.

Source code

The files in build/ are generated from the TypeScript sources in the resources/ folder of the public repository, using @wordpress/scripts:

  • Repository: https://github.com/resgata-pet/resgata-pet
  • Sources of the compiled files: https://github.com/resgata-pet/resgata-pet/tree/main/plugins/resgata-pet/resources
  • To build: run make build at the root of the repository (or npm install && npm run build in plugins/resgata-pet).

The vendor/ folder contains the official Stripe PHP library, installed with Composer (composer.json is included).

Credits

  • stripe-php (MIT): https://github.com/stripe/stripe-php
  • React, React Router, Base UI, TanStack Query and Table, Tiptap, react-day-picker, date-fns, sonner, qrcode-pix and Tailwind CSS (MIT); lucide (ISC).

Blocks

This plugin provides 13 blocks.

  • Contato da protetora Mostra WhatsApp, telefone, e-mail, redes sociais, localização e Pix cadastrados nas configurações do painel.
  • Banners Mostra os banners escolhidos no painel (Banners), com foto, título e botões.
  • Doação por Pix Mostra a chave Pix das Configurações com QR Code, código "copia e cola" e valores sugeridos. A página que tiver este bloco vira a página "Como ajudar" do site.
  • Página do animal Mostra a página do animal: fotos, resumo, história, saúde e outros animais para adoção.
  • Planos de apadrinhamento Mostra os valores mensais de apadrinhamento e o número de padrinhos ativos. O pagamento é feito com cartão, na página segura da Stripe.
  • Links do site Lista de links para as páginas do Resgata Pet que existem no site (animais, como ajudar, apadrinhamento, contato). Boa para o rodapé.
  • Área do padrinho O padrinho informa o e-mail e recebe um link para trocar o cartão, mudar o valor ou cancelar. Não precisa de senha.
  • Lista de animais Mostra os animais cadastrados em cartões, com filtros por espécie, sexo e porte.
  • Agradecimento ao padrinho Mensagem de agradecimento que a pessoa vê depois de concluir o pagamento do apadrinhamento. O título e o texto são escritos nas Configurações do painel.
  • Doação única por Pix Mostra o QR Code e a chave Pix como opção de doação única, para colocar em outras páginas (ex.: a de apadrinhamento). Não define a página "Como ajudar".
  • Formulário de adoção Questionário para quem quer adotar. Na página de um animal, o pedido é para aquele animal; em outras páginas, a pessoa escolhe o animal.
  • Banner de doação Chamada "Doe por Pix" com o QR Code e botão para a página "Como ajudar".
  • Números da protetora Mostra, contados sozinhos, os animais resgatados, as adoções, quem espera um lar e os padrinhos.

Installation

  1. Upload the resgata-pet folder to wp-content/plugins/.
  2. Activate the plugin in “Plugins”.
  3. Add the animals at yoursite.org/painel. The site must use pretty permalinks (any option other than “Plain”).
  4. The public list is at /animais/. To show animals on another page, use the “Lista de animais” block or the [resgata_animais] shortcode.

FAQ

Which animals appear in the public list?

By default, those with the status “Disponível para adoção” (available) or “Reservado” (reserved). The “Lista de animais” block lets you choose other statuses (for example, “Adotado” for a happy-endings page).

How do I use the shortcode?

[resgata_animais especie=”gato” quantidade=”6″ colunas=”3″ filtros=”nao” paginacao=”nao” status=”disponivel,reservado”]

What happens to the data if I delete the plugin?

Nothing: the data is kept. To erase it, uncheck “Manter os dados” in “Resgata Pet Configurações” before deleting the plugin.

Where does the sponsors’ data go?

Payment happens on Stripe’s pages (stripe.com), which store the card details. The site stores only the name, the e-mail address, the Stripe identifiers of the customer, the subscription and the payments, the plan, the status and the amount and date of each payment (including refunds and disputes). Tax ID, address and card details are not stored on the site.

Where is the source code of the panel?

The panel, the editor scripts and part of the site scripts are written in TypeScript and compiled into the build/ folder. The source code, the build instructions and the tests are in the public repository: https://github.com/resgata-pet/resgata-pet

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Resgata Pet” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Resgata Pet” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.5.0

  • Sponsorship: monthly card plans through Stripe Checkout, sponsor area through a link sent by e-mail (Stripe portal), sponsor counter on the site and list of sponsors in the panel.
  • Sponsorship: record of every payment, with refunds and disputes; revenue and list of payments in the panel; total donated in the sponsor area.
  • Sponsorship: thank-you page after payment, thank-you e-mail to the sponsor and e-mail notices to the rescuer.
  • Settings in two tabs, with the Stripe keys under “Pagamentos e apadrinhamento”.
  • Pix donation with QR code, “How to help” page, banners and the rescuer’s numbers on the home page.
  • Animals are now managed only in the panel (the WordPress admin screens were removed).

0.4.0

  • Adoption requests: questionnaire on the site with consent (LGPD), sent through the rescuer’s WhatsApp, and a queue of requests in the panel.

0.3.0

  • Rescuer’s settings in the panel (contact details, social networks, location, adoption, privacy and Pix).
  • “Contato da protetora” block and a contact page created automatically.
  • Search and filters in the panel’s list of animals.

0.2.0

  • Own panel at /painel, built for mobile, with a four-step form to add animals.
  • New “Protetor admin” role, which uses only the panel.
  • Own API (resgata-pet/v1) with a permission check on every route.

0.1.0

  • First version: plugin skeleton, settings and the Animals module.