Toolvana: production-ready media tools platform (CodeIgniter 4)
- 134-tool registry with programmatic SEO (unique titles/H1/descriptions, JSON-LD graphs, sitemap index, canonical 301 enforcement via required filter) - DB-backed job queue (SKIP LOCKED) with drivers: Ffmpeg, Images (GD), Pdf (qpdf/gs/poppler), Youtube (thumbnails), Qr (server-side PNG) - Security: SSRF guard, MIME validation, rate limits, API-key auth, bcrypt admin login, security headers - Admin panel: dashboard, tools/categories/guides CRUD, SEO audit, analytics, job inspector with retry, system health, feature flags - Docker deployment (nginx + web/api FPM pools + scalable workers), PHPUnit suite (19 tests / 1139 assertions), PWA manifest + service worker
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace Config;
|
||||
|
||||
use App\Libraries\Analytics;
|
||||
use App\Libraries\Finder;
|
||||
use App\Libraries\Pipeline;
|
||||
use App\Libraries\RelatedTools;
|
||||
use App\Libraries\Seo;
|
||||
use App\Libraries\ToolSearch;
|
||||
use CodeIgniter\Config\BaseService;
|
||||
|
||||
/**
|
||||
* Application-specific services. Each is swappable: swap the class behind
|
||||
* the accessor and nothing else in the app changes.
|
||||
*/
|
||||
class Services extends BaseService
|
||||
{
|
||||
/**
|
||||
* Tool registry & lookup (DB-backed, request-cached).
|
||||
*/
|
||||
public static function finder(bool $getShared = true): Finder
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('finder');
|
||||
}
|
||||
|
||||
return new Finder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Related-tools recommendation engine.
|
||||
*/
|
||||
public static function relatedTools(bool $getShared = true): RelatedTools
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('relatedTools');
|
||||
}
|
||||
|
||||
return new RelatedTools();
|
||||
}
|
||||
|
||||
/**
|
||||
* SEO metadata / structured data builder.
|
||||
*/
|
||||
public static function seo(bool $getShared = true): Seo
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('seo');
|
||||
}
|
||||
|
||||
return new Seo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Media processing pipeline (queue + drivers).
|
||||
*/
|
||||
public static function pipeline(bool $getShared = true): Pipeline
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('pipeline');
|
||||
}
|
||||
|
||||
return new Pipeline();
|
||||
}
|
||||
|
||||
/**
|
||||
* Anonymous event analytics.
|
||||
*/
|
||||
public static function analytics(bool $getShared = true): Analytics
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('analytics');
|
||||
}
|
||||
|
||||
return new Analytics();
|
||||
}
|
||||
|
||||
/**
|
||||
* Global tool search with alias support.
|
||||
*/
|
||||
public static function toolSearch(bool $getShared = true): ToolSearch
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('toolSearch');
|
||||
}
|
||||
|
||||
return new ToolSearch();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user