jeffersongoncalves / laravel-lgpd-records
LGPD records of processing activities (ROPA) for Laravel: purposes, legal bases, recipients and international transfers, joined with the personal data inventory, plus the data protection officer's public contact.
Package info
github.com/jeffersongoncalves/laravel-lgpd-records
pkg:composer/jeffersongoncalves/laravel-lgpd-records
Requires
- php: ^8.2
- illuminate/console: ^12.0|^13.0
- illuminate/contracts: ^12.0|^13.0
- illuminate/database: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- illuminate/view: ^12.0|^13.0
- jeffersongoncalves/laravel-lgpd: ^1.1
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- jeffersongoncalves/pest-plugin-database-migrations: ^1.0
- larastan/larastan: ^3.0
- laravel/pint: ^1.24
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
The Brazilian General Data Protection Law (LGPD, Lei 13.709/2018) asks controllers to keep records of their processing operations (art. 37, the ROPA). It also asks them to publish the identity and contact of their data protection officer, the encarregado (art. 41). This package stores your processing activities and joins each one with the columns you declared in laravel-lgpd. Your records follow your code.
This package gives you tooling. It does not make you compliant on its own. Your records need legal review.
Installation
composer require jeffersongoncalves/laravel-lgpd-records
php artisan vendor:publish --tag="lgpd-records-migrations"
php artisan migrate
LGPD_CONTROLLER_NAME="Acme Ltda" LGPD_CONTROLLER_DOCUMENT="00.000.000/0001-00" LGPD_DPO_NAME="Ana Souza" LGPD_DPO_EMAIL=dpo@acme.com.br
Processing activities
use JeffersonGoncalves\Lgpd\Enums\LegalBasis; use JeffersonGoncalves\LgpdRecords\Models\ProcessingActivity; ProcessingActivity::create([ 'name' => 'Billing', 'purpose' => 'Issue invoices and collect payments', 'legal_basis' => LegalBasis::Contract, 'data_subjects' => ['customers'], 'models' => [Customer::class], // its #[PersonalData] columns join the record 'data_categories' => ['payment history'], // anything not declared on a model 'recipients' => [['name' => 'Stripe', 'role' => 'processor', 'country' => 'US']], 'international_transfers' => [['country' => 'US', 'mechanism' => 'standard_clauses']], 'retention' => '5 years after the end of the contract', 'security_measures' => 'Encryption at rest, role-based access, audit log', ]);
role:processor(operador),controller(shared controller) orpublic_authority.mechanism: the legal ground for the transfer (art. 33), such asadequacy,standard_clauses,binding_corporate_rulesorspecific_consent.
Export
php artisan lgpd:ropa # one row per activity php artisan lgpd:ropa --json # controller, DPO and every activity, ready to hand to the ANPD
LgpdRecords::export(); // the same, as an array
The command warns you when the DPO contact is missing.
Data protection officer
Publish the encarregado's identity and contact on your website (art. 41, §1):
<x-lgpd-records::dpo label="Encarregado" class="text-sm" />
It renders the name, a mailto: link and a tel: link, and renders nothing until a DPO is configured.
Testing
composer test
Changelog
See CHANGELOG.
License
The MIT License (MIT). See License File.
