Integrated Laravel Breeze user system. There is a React package for Breeze that uses InertiaJS, so I've integrated it into the project. Now users can create an account, log in, see applications and interviews they have created,
Changes
Removed react-router-dom as it conflicts with inertia's routing
Replaced uses of react-router-doms's Link with the Link component from @inertiajs/inertia-react
Updated Application model to add user_id FK
Updated Interview model to add user_id FK
Added user_id to seeders for Interview and Application models
Added X-USER-ID header to requests needing the user_id value. I.e., for fetching all interviews and
Restructured resources/js/components to fit into InertiaJS's file structure.
resources/js/components was removed. Components were moved to resource/js/Components, and pages moved to resources/js/Pages.
Renamed some components to reflect the directories/architecture.
Implemented updating applications. Seems like that was missing.
Concerns
Some of these concerns are directly from the Breeze/InertiaJS integration. Others are just from a general audit from looking at this code for the first time in over two years. I will treat this list as a guide for creating issues in this repo.
The routes in routes/web.php can be drastically improved. I was following a simple guide from InertiaJS, but it appears that we can simply use a middleware group for all of the routes that use the auth and verified middleware. I will need to consider whether some of the routes should have a PHP controller implemented.
I'm currently validating requests in the controller. I should abstract that logic into a custom request class.
I need to audit any classnames, and import the class and use ClassName::class rather than "App\Namespace\To\Class".
Investigate jsconfig.js-- is it being used?
A ton of dependency updates included in this PR. Need to audit for dependencies still lurking in the project that have vulnerabilities.
Tailwinds is a dependency of the Breeze React package. Investigate using it instead of bootstrap react.
NewApplication::handleSubmit probably needs to be refactored. Maybe a separate method for updating applications.
Also, should probably rename NewApplication
README was lost at some point. Document installation instructions.
Description
Integrated Laravel Breeze user system. There is a React package for Breeze that uses InertiaJS, so I've integrated it into the project. Now users can create an account, log in, see applications and interviews they have created,
Changes
react-router-dom
as it conflicts with inertia's routingreact-router-doms
'sLink
with theLink
component from@inertiajs/inertia-react
Application
model to adduser_id
FKInterview
model to adduser_id
FKuser_id
to seeders forInterview
andApplication
modelsX-USER-ID
header to requests needing theuser_id
value. I.e., for fetching all interviews andresources/js/components
to fit into InertiaJS's file structure.resources/js/components
was removed. Components were moved toresource/js/Components
, and pages moved toresources/js/Pages
.Concerns
Some of these concerns are directly from the Breeze/InertiaJS integration. Others are just from a general audit from looking at this code for the first time in over two years. I will treat this list as a guide for creating issues in this repo.
routes/web.php
can be drastically improved. I was following a simple guide from InertiaJS, but it appears that we can simply use a middleware group for all of the routes that use theauth
andverified
middleware. I will need to consider whether some of the routes should have a PHP controller implemented.ClassName::class
rather than"App\Namespace\To\Class"
.jsconfig.js
-- is it being used?NewApplication::handleSubmit
probably needs to be refactored. Maybe a separate method for updating applications.NewApplication
README
was lost at some point. Document installation instructions.TODOs introduced:
Http\Controllers\ApplicationController::update