How inferna15/personel-bilgi-sistemi works
Project Type and Purpose
• This is a full-stack web application built on the Laravel PHP framework, using Inertia.js and Vue.js for the frontend.
• Purpose: an internal staff and management portal for handling announcements, units, cars, cards, leave requests, salaries, and user management with role-based access control.
Core Architectural Layers
a. Client Layer (Browser)
• Vue.js SPA (resources/js/) built with Vite and Tailwind CSS.
• Uses Inertia.js to bridge Laravel controllers and Vue pages.
b. Web Server / Entry Point
• Apache/Nginx serves public/index.php.
• Laravel’s HTTP kernel handles routing (routes/web.php, routes/auth.php).
c. Application Layer (Laravel MVC + Services)
• Controllers
• Auth controllers (app/Http/Controllers/Auth)
• Management controllers (app/Http/Controllers/Management)
• Staff controllers (app/Http/Controllers/Staff)
• Middleware
• HandleInertiaRequests, ChechAdminRoleMiddleware
• Requests (Validation) – app/Http/Requests
• Resources (Transformers) – app/Http/Resources
• Services (Business logic) – app/Services
• Policies (Authorization) – app/Policies
d. Domain / Data Layer
• Eloquent Models (app/Models) with Enums (app/Enum)
• Database (MySQL/PostgreSQL)
• Migrations & Seeders (database/migrations, database/seeders)
• Factories (database/factories) for testing
e. Infrastructure & Support Services
• Cache, Session, Queue (config/queue.php, config/cache.php)
• Mail (config/mail.php)
• File Storage (config/filesystems.php)
• External services: SMTP server, storage (S3 or local)
• Background jobs (Queue workers)
• Logging (storage/logs)
Interactions and Data Flow
1. User → Browser → Vue Components
2. Browser issues HTTP requests → Web Server → public/index.php
3. Laravel Router matches route → Middleware → Controller
4. Controller may:
• Validate via FormRequest
• Authorize via Policy
• Delegate business logic to Service
• Interact with Model (Eloquent) → Database
• Dispatch Events/Jobs → Queue
• Return Inertia response → Vue Page
5. Frontend re-renders or redirects based on response
6. Background jobs → Mail, Notifications, Cache, External APIs
Architectural Patterns & Design Principles
• MVC (Controller → View/Resource → Model)
• Service Layer for business logic separation (app/Services)
• FormRequest for single-purpose validation
• Policy pattern for authorization
• Inertia.js for seamless SPA behavior without a separate API
• Eloquent ORM for database abstraction
• Migration & Seeding for reproducible schema