How aldydwi/fathcomp works
Project type and purpose
• This is a full-stack web application built on the Laravel PHP framework.
• Purpose: a multi-role service-booking platform (customers, admins, technicians) supporting authentication, bookings, payments, reports, testimonials, and dashboards.
File structure
• Top-level:
• public/ (entry point, static assets)
• routes/ (web, auth, console)
• app/ (HTTP layer, Controllers, Middleware, Requests, Models, Providers, Views components)
• resources/ (Blade templates, JS/CSS sources)
• database/ (migrations, seeders)
• config/, bootstrap/ (framework setup)
• tests/ (unit & feature tests)
• MVC pattern:
• Models in app/Models (Eloquent ORM)
• Views in resources/views (Blade) & app/View/Components
• Controllers in app/Http/Controllers, organized by role (Auth, User, admin, teknisi)
• Build assets: vite.config.js, package.json → compiles JS/CSS into public/build
• Env/config: .env, config/*.php for DB, cache, queue, mail, services.
README
• Standard Laravel boilerplate; confirms use of routing, DI container, ORM, sessions, queue, broadcasting.
a. Components
• Client (Browser/Mobile)
• Web Server (Apache/Nginx)
• Laravel App Kernel
• Routing Layer
• Middleware (authentication, authorization)
• Controllers (Auth, User, admin, teknisi)
• Requests / Validation
• Eloquent Models & Repositories
• Database (MySQL/PostgreSQL)
• Storage (local disk / S3 for BookingImage uploads)
• Cache & Session Store (Redis / file)
• Queue Worker (jobs for mail, reports)
• Frontend Assets (JS/CSS via Vite/Tailwind)
• External Services (Mail, Payment Gateway)
b. Relationships
• Client → HTTP request → Web Server → public/index.php → Laravel Kernel
• Kernel → Middleware → Routing → Controller Action
• Controller ↔ Eloquent Models → Database
• Controllers trigger Jobs → Queue Worker
• Controllers send Notifications/Mail via External Mail Service
• Views rendered by Controllers → Response to Client
• Frontend JS/CSS served from public/build
c. Architectural patterns & principles
• MVC (clear separation of concerns)
• Layered architecture (HTTP → Controllers → Domain Models → Persistence)
• Role-based modules (grouped controllers/views by user/admin/technician)
• Dependency Injection via service container (Providers)
• Event/Job queue for background processing
d. Key technologies
• PHP 8.x, Laravel framework
• Blade templating, Laravel components
• Eloquent ORM (Models, Migrations, Seeders)
• Vite & TailwindCSS for asset bundling
• MySQL (or DB configured)
• Redis (optional) for cache/queue
• External mail & payment gateways