Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daybreak

PHP MariaDB Apache Tests

Daybreak is a self-hosted security news aggregator for fast daily monitoring. It combines curated security headlines, ransomware activity, and CVE updates in one server-rendered dashboard.

At A Glance

Item Value
Stack PHP 8.3, MariaDB 10.11+, Apache 2.4
Rendering model Server-rendered templates (no SPA build pipeline)
Public pages Feed, Sources analytics, legal pages
Authenticated pages Personal feed, source preferences, account settings, source suggestions
Admin pages Source management, moderation queue, feed health, user admin, audit log
Adapters rss_atom, json_api, ransomlook, nvd

Quick Links

  • Specification: docs/SPEC.md
  • Implementation plan: docs/IMPLEMENTATION.md
  • Apache vhost example: deploy/apache-vhost.conf
  • Test runner: tests/run.php

Core Features

Public experience

  • Main feed with category and time-window filtering
  • Sources analytics page
  • Ransomware activity widget
  • CVE widget with severity cues
  • Legal pages (Imprint, Terms, Privacy)

User experience

  • Registration and email verification
  • Login, password reset, account settings
  • Source preference management
  • Personalized feed behavior
  • Source suggestion submission

Admin experience

  • Source CRUD and fetch controls
  • Suggestion moderation queue
  • Feed health and operations dashboard
  • User administration and audit log

Security Highlights

  • Prepared statements for database access
  • CSRF checks on state-changing requests
  • SSRF-safe outbound fetching via guarded fetcher
  • Sanitized feed summaries and escaped output
  • Strict security headers on responses

Quick Start

cp config/.env.example config/.env
# then edit DB and SMTP settings in config/.env

# create DB and least-privileged DB user first, then:
php migrations/run.php
php bin/fetch.php --force
php bin/prune.php

# configure Apache DocumentRoot to public/
# see deploy/apache-vhost.conf

Runtime Commands

Initial/Manual fetch:

php bin/fetch.php --force

Manual maintenance prune:

php bin/prune.php

Cron (every 5 minutes):

*/5 * * * * php /srv/vhosts/daybreak.silverday.de/bin/fetch.php

Maintenance cron (daily at 03:00):

0 3 * * * php /srv/vhosts/daybreak.silverday.de/bin/prune.php

Run tests:

php tests/run.php

CI Notes

GitHub Actions runs:

  • php tests/run.php
  • php -l for bin/, public/, src/, and tests/

Attribution

Ransomlook data is sourced from ransomlook.io and attributed in the UI under CC BY 4.0.

About

Open Source News Aggregator

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages