Search by

dataemergencia / emergency-bff

The-BoxHead-Guy

Backend-for-frontend for the DataEmergencia emergency module.

Package info

github.com/The-BoxHead-Guy/emergency-bff

pkg:composer/dataemergencia/emergency-bff

Statistics

Installs: 264

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.6.2 2026-11-25 18:24 UTC

This package is auto-updated.

Last update: 2026-11-25 18:27:14 UTC


README

Backend for frontend (BFF) for the DataEmergencia emergency and alert flow.

The BFF sits between the browser panel and the DataEmergencia API. It receives a browser request, validates the identity code, applies the emergency rules and calls the upstream API with credentials that stay on the server. Its purpose is the security boundary: the API key, the application identifier and the WhatsApp flow never reach the browser, and one server-side component owns the emergency state.

It is not a payload translator and not a full application. Your application owns the front controller, the web server and the session backend. Realtime delivery events are published by the DataEmergencia API; this package exposes no Pusher configuration.

Requirements

  • PHP 8.4 or newer
  • Composer 2.x
  • One API key and application identifier per deployment, issued by DataEmergencia

The required PHP extensions are declared in composer.json and checked by Composer during installation.

Install

composer require dataemergencia/emergency-bff

Documentation

Read When
Zero to panel First integration, from empty directory to panel
HTTP contract Calling the BFF from a frontend
Activation flow Understanding what happens between SOS and WhatsApp
Configuration Wiring credentials and runtime behavior
Session and CSRF Hosting the BFF in an existing PHP application
Security Threat model, trust boundaries, known limitations
Troubleshooting Diagnosing a failing deployment
Upgrade Moving between releases
Releasing Publishing a version (maintainers)

The full index is docs/README.md.

Browser panel

Use @dataemergencia/emergency for the SOS panel. It consumes this backend and owns geolocation, the SOS interaction and the fallback phone number.

Maintenance

Maintained by Sistemas SCAEM C.A. Source and issues: The-BoxHead-Guy/emergency-bff.

License

MIT. See LICENSE.