How shahed-b22d/career_ai_la works
1. Overall shape
This is a single Laravel monolith that serves both browser pages and JSON/API endpoints. The app is organized around a career/job platform domain: job seekers, companies, jobs, AI-assisted career planning, complaints, and admin moderation.
2. Request entry points
All traffic enters through Laravel’s normal HTTP front door in public/index.php, then routes are split across routes/web.php and routes/api.php. app/Http/Kernel.php and the middleware stack enforce auth, CSRF for web flows, and an explicit admin gate via EnsureAdmin.
3. Core domain boundaries
The main Eloquent models show the business boundaries clearly:
• User as the primary identity
• JobSeeker and Company as profile extensions
• Job for listings
• Shortlist for saved/candidate selection workflows
• Complaint for moderation/support cases
• UserResume, UserRoadmap, and UserQuiz for the AI/career-planning side
4. Authentication and roles
AuthController handles login/registration/reset flows, while User has role data added by migrations and enforced by middleware. The data model includes admin-specific changes and company verification fields, so authorization is role-driven rather than being a separate subsystem.
5. AI career subsystem
AiController plus app/Services/AiCareerService.php form a dedicated AI boundary. The presence of test_gemini.php, test_ai_endpoints.php, and test_ats_cv_output.php suggests the app calls an external LLM/AI provider and uses it for resume analysis, career roadmap generation, quiz-like assessments, and ATS-style CV feedback. The AI layer is service-based, keeping provider-specific logic out of controllers.
6. Job marketplace flow
JobController and the Job/Company models represent the marketplace side: companies create and manage jobs, and job seekers interact with listings and shortlist records. The database migrations show this is a first-class relational workflow, not just a content page.
7. Complaints and admin moderation
ComplaintController and AdminController support support-ticket / moderation workflows. Migrations add admin response fields and company verification, indicating that admins resolve complaints and likely approve or review companies. This is a separate operational boundary from the core user experience.
8. Notifications and background work
Notifications are handled in two ways: Laravel notifications for password reset and a custom FcmService for push notifications. The console command SendMotivationalNotifications suggests scheduled/background outreach, likely targeted at users based on career progress or engagement. app/Console/Kernel.php is the scheduling boundary.
9. Data persistence and file storage
The database schema is migration-driven and includes authentication tables, personal access tokens, resumes, roadmaps, quizzes, jobs, complaints, shortlists, company verification, and FCM tokens. Files such as resumes or commercial registration documents are stored through Laravel’s filesystem under storage/app and storage/app/public.
10. Presentation layer
The project uses Blade views for at least auth reset flows, a welcome page, and a mock checkout page, while resources/js and resources/css are built with Vite. That means the repo is not API-only; it mixes server-rendered pages with API-driven interactions.
11. Infrastructure and integrations
Relevant platform pieces include Sanctum for token-based API auth, mail configuration for password reset and notifications, broadcasting config for real-time features, and CORS/session/cache configuration for web/API coexistence. External dependencies appear to include an AI provider and FCM for push notifications.
12. Testing and verification
The repository includes HTTP client files (api_tests.http), standalone PHP test scripts, and standard Laravel feature/unit tests. That indicates the team validates endpoints both through automated tests and manual API probes, which is useful when drawing the system’s external interaction boundaries.
Main entry points: web.php Web Routes · api.php API Routes · Kernel.php HTTP Kernel · 2014_10_12_000000_create_users_table.php Schema & Migrations
Components 26
Entry & Routing
HTTP front door and route split
- Front Door · Laravel HTTP entry point
public/index.php - Web Routes · Browser-facing routes
routes/web.php - API Routes · JSON and token routes
routes/api.php
HTTP Layer
Middleware, controllers, and request handling
- HTTP Kernel · Global middleware and request pipeline
app/Http/Kernel.php - Auth Gate · Authentication and guest redirects
app/Http/Middleware/Authenticate.php - Admin Gate · Admin-only access check
app/Http/Middleware/EnsureAdmin.php - Auth Controller · Login, registration, and reset flows
app/Http/Controllers/AuthController.php - Jobs Controller · Listing and marketplace actions
app/Http/Controllers/JobController.php - Complaint Controller · Support and moderation cases
app/Http/Controllers/ComplaintController.php - Admin Controller · Admin moderation and review flows
app/Http/Controllers/AdminController.php - AI Controller · Career AI endpoints
app/Http/Controllers/AiController.php
Core Domain
Marketplace, identity, and moderation models
- Users & Profiles · User, seeker, and company identity
app/Models/User.php - Jobs & Shortlists · Jobs and candidate selection workflow
app/Models/Job.php - Complaints · Support and admin review cases
app/Models/Complaint.php - Career Data · Resumes, roadmaps, and quizzes
app/Models/UserResume.php
AI & Notifications
Career AI and outbound messaging
- AI Career Service · Provider-facing career intelligence layer
app/Services/AiCareerService.php - FCM Service · Push notification integration
app/Services/FcmService.php - Reset Notice · Password reset email notification
app/Notifications/ResetPasswordNotification.php
Data & Storage
Schema, persistence, and file storage
- Schema & Migrations · Relational tables and role/verification fields
database/migrations/2014_10_12_000000_create_users_table.php - Storage Layer · Uploaded resumes and documents
storage/app/public
Presentation
Blade views and frontend assets
- Blade Views · Server-rendered pages and auth views
resources/views/welcome.blade.php - Frontend Assets · Vite-bundled JS and CSS
resources/js/app.js
Operations
Console scheduling, config, and verification
- Console Scheduler · Motivational notification command
app/Console/Kernel.php - Motivation Command · Background outreach job
app/Console/Commands/SendMotivationalNotifications.php - Platform Config · Auth, mail, Sanctum, CORS, and services
config/app.php - Verification · HTTP probes and automated tests
tests/Feature/ExampleTest.php
Connections 35
- Front Door → Web Routes: serves web · Requests enter via the web route file
- Front Door → API Routes: serves api · Requests enter via the API route file
- Web Routes → HTTP Kernel: uses middleware · Web routes run through the HTTP kernel
- API Routes → HTTP Kernel: uses middleware · API routes run through the HTTP kernel
- HTTP Kernel → Auth Gate: auth checks · Authentication is enforced in the middleware stack
- HTTP Kernel → Admin Gate: admin gate · Admin-only access is enforced via middleware
- Web Routes → Auth Controller: auth flow · Browser auth actions are routed here
- API Routes → Auth Controller: token auth · API auth endpoints share the same controller boundary
- Web Routes → Jobs Controller: marketplace · Job browsing and management routes
- API Routes → Jobs Controller: job api · Job data exposed through JSON endpoints
- Web Routes → Complaint Controller: support flow · Complaint submission and tracking
- Web Routes → Admin Controller: moderation · Admin review workflows
- API Routes → AI Controller: ai api · AI career endpoints
- Auth Controller → Users & Profiles: manages · Authentication centers on the user identity model
- Jobs Controller → Jobs & Shortlists: manages · Jobs and shortlist workflows
- Complaint Controller → Complaints: creates · Complaint lifecycle management
- Admin Controller → Complaints: resolves · Admin moderation acts on complaints
- AI Controller → Career Data: reads/writes · Career AI works with resumes, roadmaps, and quizzes
- AI Controller → AI Career Service: delegates · Controller delegates provider-specific work to the service
- AI Career Service → Career Data: analyzes · AI service processes user career data
- AI Career Service → Storage Layer: stores files · Generated outputs and uploaded documents live in storage
- FCM Service → Users & Profiles: push tokens · FCM delivery is tied to user records
- Reset Notice → Platform Config: mail config · Password reset uses mail settings
- Console Scheduler → Motivation Command: runs · Scheduler executes the notification command
- Motivation Command → FCM Service: sends push · Motivational notifications are delivered via FCM
- Schema & Migrations → Users & Profiles: defines · Migrations define the identity and role schema
- Schema & Migrations → Jobs & Shortlists: defines · Migrations define jobs and shortlist tables
- Schema & Migrations → Career Data: defines · Migrations define AI/career-planning tables
- Schema & Migrations → Complaints: defines · Migrations define complaint and admin fields
- Blade Views → Web Routes: rendered by · Blade views are reached through web routes
- Frontend Assets → Blade Views: enhances · Vite assets support the rendered pages
- Platform Config → HTTP Kernel: shapes runtime · Platform config influences middleware and HTTP behavior
- Verification → Web Routes: verifies · Feature tests and HTTP probes exercise web endpoints
- Verification → API Routes: verifies · Feature tests and HTTP probes exercise API endpoints
- Verification → AI Career Service: probes · Standalone scripts validate AI integrations