AI-Generated Polling Platform with Trust & Authenticity Filtering
A production-grade polling platform where an AI service generates polls, the system collects votes from human accounts, and an authenticity engine computes per-account trust weights. The UI exposes a live trust slider that interpolates between:
- Right (Raw): All votes included
- Left (Strict): Only votes meeting strict trust criteria
Permission requirements: Your user must be in the docker group, or run with sudo. See DOCKER.md.
./run.sh
# or: make runOpens at http://localhost:8080
Requires PHP 8.2+ and Composer.
# Install dependencies
composer install
# Start server
php -S localhost:8080 -t public- Home feed: Trending polls by category
- Poll page: Vote, view results, and use the trust slider
- Trust slider: See how results change as you filter from raw (everyone) to strict (verified signals only)
- Vote stream: Live feed of recent votes, filtered by trust
- API: REST JSON API at
/api/v1/for polls, votes, results, auth
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/polls |
List published polls |
| GET | /api/v1/polls/{id} |
Poll detail |
| POST | /api/v1/polls/{id}/vote |
Cast vote (option_id required) |
| GET | /api/v1/polls/{id}/results |
Aggregates (?trust=0..1) |
| GET | /api/v1/polls/{id}/votes/stream |
Recent votes (?trust=0..1) |
| POST | /api/v1/auth/register |
Create account |
| POST | /api/v1/auth/login |
Get JWT |
trust=1.0(100%): Raw results, all votes includedtrust=0.0(0%): Strict filter, only high-trust accounts
Trust weights use maturation tiers (New < 7 days, Young 7–30 days, Mature 30–180 days, Established 180+ days).
- PHP 8.2+, Slim 4 (API)
- SQLite (dev) / MySQL (production)
- Bootstrap 5, Chart.js, vanilla JS
- JWT auth (Firebase)
Copy .env.example to .env and adjust:
DB_PATH: Database file pathJWT_SECRET: Secret for JWT signingAPP_URL: Base URL for the app