Skip to content

Latest commit

 

History

1,155 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gratora

PHPUnit e2e License: GPL v2 or later PHP 8.1+ WordPress 7.0+

A fundraising platform for WordPress

Gratora gives an organization the whole fundraising stack in one plugin: a block-based donation form builder, one-time and recurring giving, campaigns and funds, encrypted donor records with a self-service portal, receipts, and advanced reporting.

Requirements

WordPress 7.0 or later
PHP 8.1 or later
MySQL 8.0 or later
Node 18.12 or later

Getting started

git clone https://github.com/gratorawp/gratora.git
cd gratora
composer install
npm install
npm run build

Commands

Command What it does
npm run build Production asset build into build/
npm run start Watch and rebuild on change
npm run lint:js ESLint over the JS and JSX
npm run format Prettier over the same
composer test:unit PHP unit tests, no WordPress, milliseconds
composer test:integration Boots WordPress against a real database
composer test Both PHP suites
npm run test:e2e Playwright, against a running site

Testing

PHP tests need a WordPress test library and a throwaway database, set up once per machine. See TESTING.md.

Extending Gratora

Gratora is built to be extended by other plugins, and uses its own seams to do it:

  • Modules. A plugin registers on gratora.modules.register with an id, version, dependencies and migrations, and is booted in dependency order.
  • Settings tabs. gratora.settings.groups adds a server-side settings group; window.gratora.tabs.register( 'settings', ... ) mounts the panel that edits it.
  • Form fields and gateways. New donation-form blocks and new payment gateways register through the same registries the built-in ones use.
  • Commands. gratora.commands.register adds a capability-gated, schema-checked action, which also becomes available to anything driving Gratora programmatically.

Persistence goes through Queryable, a small first-party query builder and schema tool. Models declare their own schema and migrate themselves.

Contributing

Issues and pull requests are welcome. Run composer test and npm run lint:js before opening one, and keep it to a single concern.

License

GPL-2.0-or-later. See LICENSE.

Releases

Packages

Contributors

Languages