How qv1ko/racingtracker works
Project Type and Purpose
• This is a full-stack web application called “RacingTracker,” built on Laravel 12 (PHP 8.2) for the backend and React (via Inertia.js & Vite) for the frontend.
• It provides CRUD management of Drivers, Teams, Races, and Participations, and computes a dynamic scoring system based on driver performance.
Main Components
a. Client-side (Browser)
• React UI (resources/js) built with TailwindCSS & Vite
• Inertia.js pages and components for routing and state hydration
b. Web Server
• Nginx (or built-in PHP server) serving index.php
• PHP-FPM processing Laravel requests
c. Application Layer (Laravel)
• HTTP Controllers (app/Http/Controllers) implementing REST endpoints
• Request Validation (app/Http/Requests)
• Models & Eloquent ORM (app/Models) mapping to database tables
• Business logic for scoring (services under app/… if factored out)
• Inertia Middleware bridging Laravel and React
d. Data Layer
• SQLite (config/database.php) or other relational DB
• Migrations & Seeders (database/)
e. Persistent Storage
• File System (storage/) for logs, caches, uploaded files
f. External Services
• Mail API (config/mail.php) for email verification and notifications
• (Optional) AWS S3 or other cloud storage if configured
Interactions and Data Flow
• Browser → Nginx: HTTP requests (static assets or /index.php)
• Nginx → PHP-FPM → Laravel Router → Controller
• Controller → Request Validation → Eloquent Model → Database
• Controller → Inertia Response → React components rendered client-side
• React UI → API calls via Inertia for dynamic data updates
• Laravel Events/Jobs (queue.php) → Mailer for email notifications
• Laravel Scheduler or Jobs → background tasks (if any)
Architectural Patterns and Design Principles
• MVC pattern on the server side (Models, Views via Inertia, Controllers)
• Single-Page Application feel via Inertia.js (no separate API layer)
• Convention-over-configuration (Laravel folder structure)
• Modular React components under resources/js/components and layouts
• Environment-driven configuration (.env)
• CI workflows for linting & tests (.github/workflows)
Technologies and Frameworks to Highlight
• Backend: Laravel 12 on PHP 8.2, Eloquent ORM, SQLite (or MySQL/PostgreSQL), Inertia.js
• Frontend: React 16.8+, Vite, TypeScript, TailwindCSS
• DevOps: Composer, npm, GitHub Actions, dotenv, phpunit, Pest
• Deployment: Nginx + PHP-FPM, optional AWS EC2, VPC, IAM for deploy user
• Incorporate the Inertia layer explicitly between Controllers and React
• A Deployment inset showing Nginx + PHP-FPM on EC2 within a VPC
• Dynamic scoring computation as a service process invoked by Controller → Model
• CI/CD workflows as an auxiliary component feeding into the Repo → Build → Deploy path