Logo Lanfrica

Basit-of-Africa/PollMonitor

Domain:

peace and securitydigital infrastructure

Record type:

software
Creator:
Bas
Host:
# PollMonitor An election monitoring WordPress plugin for real-time incident reporting and result aggregation. Version: 1.0.0 ## Overview PollMonitor provides a lightweight workflow to register polling stations, allow field observers to submit incident reports (with optional photo evidence), and collect vote results into a custom table for later validation by regional validators. Key features: - Custom Post Types: `poll_station`, `incident_report` - REST API endpoints for stations, incidents, and results - Role-based access: `pollmonitor_observer`, `pollmonitor_validator` - Custom DB tables for results and audit logs - Admin dashboard with interactive map and recent incidents ## Installation 1. Copy the `PollMonitor` folder into your WordPress `wp-content/plugins/` directory. 2. Activate the plugin from the WordPress admin Plugins screen. 3. On activation the plugin will: - Register CPTs and taxonomies - Create custom DB tables (`wp_pollmonitor_results`, `wp_pollmonitor_audits`) - Add custom roles and capabilities ## Shortcodes - `[pollmonitor_incident_form]` — renders the frontend incident submission form. The frontend script populates the station select via the REST API. Place the shortcode on any page where logged-in observers should be able to report incidents. ## REST API Namespace: `pollmonitor/v1` - `GET /pollmonitor/v1/stations` — Returns a list of stations (requires `read` capability). - `POST /pollmonitor/v1/incidents` — Create an incident (multipart/form-data). Requires `pollmonitor_submit` capability. Accepts `title`, `content`, `station_id`, and optional file field `evidence` (PNG/JPEG, max 2MB). - `POST /pollmonitor/v1/results` — Submit polling station results (JSON). Requires `pollmonitor_submit`. Payload should include `station_id` and numeric party/total fields. Responses use standard WP REST error objects for failures. ## Roles & Capabilities - `pollmonitor_observer` — Intended for field observers. Capabilities: `read`, `pollmonitor …