How facesofgaming/shadps4-compat-list works
Main Components
• Frontend:
– Located in the public/shadps4 directory, it includes the index.html file that loads dependencies (like Tailwind CSS and AG-grid) and a JavaScript file (app.shadps4.js) which configures AG-grid and formats the compatibility list data.
• Backend:
– The Laravel framework is used here, following the standard Laravel directory structure. Important backend parts include:
▪ Laravel Console Commands:
• ShadPs4ParseGithubIssues.php (responsible for parsing GitHub issues and generating the shadps4-issues.json file).
• ShadPs4ExportDiscordChannel.php (which is intended for extracting images from Discord – a work in progress).
▪ Controllers and Models: While not central to the core functionality described in the README, these represent the conventional Laravel architectural layers (e.g., app/Http/Controllers for web requests and app/Models for data representation).
▪ Configuration Files: Directories such as config, database (for migrations and seeders), and the Laravel bootstrapping logic in bootstrap/app.php defining the core application settings.
• Third-Party / External Integrations:
– GitHub (for fetching issues; note the possible rate limits and the suggestion to use a GitHub token).
– (Potentially) Discord, for the (currently WIP) command to extract images.
Relationships and Interactions
• Data Flow:
– The backend component (represented by the Laravel Artisan command) directly interacts with GitHub’s API to fetch issues. It then processes and aggregates the data, saving the output to the JSON file (public/shadps4/shadps4-issues.json).
– The frontend component (index.html and app.shadps4.js) loads this JSON file to present the compatibility list dynamically using AG-grid.
– There is a scheduled or manually triggered backend process (via Laravel’s scheduler) that can update the JSON file periodically, keeping the front-end data fresh.
• Architectural Patterns:
– MVC Pattern: Although the live functionality centers around Artisan commands and static JSON serving, the project maintains the Laravel MVC structure for potential extensions (using controllers, models, and views).
– Separation of Concerns: Frontend (presentation and formatting through JavaScript and HTML) is clearly separated from backend processes (data fetching, parsing, and file generation).