Aggro is the codebase that powers BMXfeed, a BMX news aggregator and video discovery platform. Running continuously since 2006, BMXfeed collects and curates BMX-related content from across the web.
- News aggregation — automatically collects and displays BMX news from various sources
- Video integration — aggregates BMX videos from YouTube and Vimeo
- RSS feed directory — maintains a curated directory of BMX-related RSS feeds
- Content curation — automatically archives old content and manages content quality
- API support — integrates with YouTube and Vimeo APIs for video metadata
- Feed generation — provides RSS/OPML feeds of aggregated content
- Responsive design — mobile-first, responsive web interface
- Error monitoring — integrated Sentry for real-time error tracking and performance monitoring
- Enhanced security — parameterized database queries, secure configuration management, input validation
- Back-end — PHP 8.2+ with CodeIgniter 4 framework
- Front-end — vanilla CSS with PostCSS processing and no JavaScript!
- Database — MySQL/MariaDB
- Error monitoring — Sentry for application monitoring and error tracking
- Code quality — PHP CS Fixer, PHP CodeSniffer, PHPMD, PHPStan for static analysis and code standards
- Dependencies — SimplePie for feed parsing, Composer for PHP package management, npm for front-end build tooling
Aggro follows a clean architecture pattern with separation of concerns:
- Controllers — Handle HTTP requests and coordinate responses
- Models — Core business logic and data structures
- Repositories — Data access layer for database operations
- Services — Domain-specific business logic (archiving, thumbnails)
- Helpers — Utility functions for common operations
- Libraries — Third-party integrations and custom components
This architecture improves code maintainability, testability, and follows SOLID principles.
Aggro uses Docksal for local development. This ensures a consistent development environment across machines.
- Install Docksal
- Docker compatible host system
-
Clone the repository and enter directory:
git clone https://github.com/jsnmrs/aggro.git cd aggro
-
Initialize the project:
fin init
-
View the site:
- Open http://aggro.docksal.site in your browser
- The init process creates a local database from aggro-db.sql
Aggro includes several custom Docksal commands to help with development:
fin admin
— Run application maintenance tasksfin deploy [env]
— Deploy to specified environmentfin frontend
— Run front-end build processfin maintain
— Run upgrades and testsfin test
— Run test suitefin upgrade
— Update Composer packages
Copy .env-sample
to .env
for your local environment. Key configurations:
CI_ENVIRONMENT
— set to “development” for local workapp.baseURL
— your local URL (default: http://aggro.docksal.site)- Database credentials — configured through Docksal
- API keys — for video services
SENTRY_DSN
— your Sentry Data Source Name for error trackingSENTRY_ENVIRONMENT
— environment name (development/production)SENTRY_RELEASE
— application release versionSENTRY_SAMPLE_RATE
— error sampling rate (0.0 to 1.0)SENTRY_TRACES_SAMPLE_RATE
— performance monitoring sample rateSENTRY_SEND_DEFAULT_PII
— whether to send personally identifiable information
The app/Config/Storage.php
file centralizes all file paths and storage-related settings:
- Thumbnail storage — path, dimensions, and quality settings
- Archive periods — content archival and cleanup timeframes
- Cache durations — default cache times for various operations
- Network timeouts — connection and request timeout settings
The .crontab
file defines scheduled tasks for:
- News feed updates — every 6 minutes
- YouTube video checks — every 5 minutes
- Vimeo video checks — every 7 minutes
- Archive management — daily
- Feed cache clearing — monthly
The project includes several types of tests:
# Run all tests
fin test
# Run all linting and static analysis
fin lint
# Run specific checks
fin sniff # PHP CodeSniffer
fin shellcheck # Shell script linting
# Code quality checks
fin lint # Run all linting (phpfix, phpcs, phpmd, phpstan)
fin phpfix # Auto-fix PHP code style issues
fin phpstan # Run PHPStan static analysis
Deployment is handled through GitHub Actions and Deployer:
- Automated deployment on merge to main branch
- Front-end assets are built and included in deployment
- Environment files are securely transferred
- Crontab is updated on deployment
# Deploy to development
fin deploy dev
# Deploy to production
fin deploy prod
Aggro uses Sentry for application monitoring:
- Real-time error tracking and alerting
- Performance monitoring for slow requests
- Automatic error grouping and deduplication
- Integration with deployment tracking
Configure Sentry by setting the appropriate environment variables in your .env
file.
Aggro is open-source software licensed under the MIT license. See the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests (
fin test
) - Submit a pull request
- Developed and maintained by Jason Morris
- Built with CodeIgniter 4
- Uses SimplePie for feed parsing
- Docksal for development environment
- Issues: GitHub Issues