This is the Laravel app behind feedcanary.com, a free little service for making sure an RSS or JSON feed is up and valid. It sends an email if the feed looks broken, and again if it seems to be fixed.
Feed Canary checks a URL’s response status and passes changed feed content off to the W3C validator or feedvalidator.org in order to see if the it’s valid.
This is a pretty straightforward Laravel app that relies heavily on the scheduler and queue.
- Establish a modern PHP hosting environment with MySQL or MariaDB and ideally Redis. (PostgreSQL is probably fine, I just haven’t tested with it!)
- Check out this project, or your fork of it.
- Install Composer dependencies with
composer install
. - Install npm dependencies with
npm install
. (Runnpm run build
to have Vite bundle fresh CSS.) - Set up a cron job to run the scheduler.
- Set up a queue worker.
- Customize
.env
for your environment, being sure to set up at least a working mailer. (Optionally backups, Sentry monitoring, etc.) - Run
php artisan migrate
to initialize the database.
This project includes a DDEV configuration for local development, so once DDEV and a Docker provider are installed you can run the following:
cp .env.example.local .env
ddev start
ddev composer install
ddev npm install
ddev php artisan key:generate
ddev php artisan migrate
The project should then be available at https://feedcanary.ddev.site/, where you can safely poke at it.
Email will go straight to Mailpit, which you can launch in a browser with ddev mailpit
.
What I’m using:
- Coolify for hosting
- A 2-core, 2GB memory VPS for running the app
- Laravel Horizon for swanky queue monitoring
- Resend, Mailgun, and Mailtrap for email! (because it’s nice to have failovers)
- Sentry for profiling and mostly catching mistakes and trying to fix them before anybody notices
It’s important to set this up with a stable queue! You can check out the project’s Dockerfile that’s used as the basis for each app container in the docker-compose.yaml file I use with Coolify. I manually created PostgreSQL and Redis services separately. (I mentioned this in a blog post about transitioning from Ploi to Coolify.)
I added Laravel Horizon to the project to keep closer watch over the queue and its performance. (Okay also curiosity.) You’ll need to add your IP address to the allow list in order to visit /horizon
and have a look for yourself.
The VPS I’m currently running is dedicated to this app. It chugs along fine using about half its available resources checking a hundred or so feeds. YMMV.
I built in a few commands for checking on things and tidying up:
php artisan app:check-feed {id}
lets you run a check on a single feed, passing its ID.php artisan app:prune-checks
deletes rows in thechecks
table—by far the busiest in the database—that are older than thirty days.php artisan app:audit-feeds
identifies feeds that were added more than once and email addresses associated with multiple feeds. I didn’t put any hard limits around these things, so for now it just helps to take inventory.
I welcome any thoughtful PRs that might improve the efficiency, design, or user experience of this little project! I’m sure there’s plenty of room for improvement.
My intent with this repository is to share the source code behind the site, not so much to formally release and maintain an app for broader use. As such, I’ll try and be helpful with issues but you may need to embrace the adventure of running your own instance in your favorite environment.
If you’ve found a bug, done some refactoring, or added a feature you’d like to share, please open an issue or PR on this repository and I’ll respond to it.