Trasmission is a web application that allows users to search for vehicles by make, model, and registration. The application uses a REST API to retrieve the data. The application UI is built using VueJS and TailwindCSS.
The app allows users to filter vehicles by make. The user can select a make from the dropdown menu and the app will display all vehicles that match the selected make.
The app allows users to filter vehicles by model. The user can select a model from the dropdown menu and the app will display all vehicles that match the selected model.
The app allows users to filter vehicles by registration. The user can enter a registration number and the app will display all vehicles that match the entered registration number.
The app allows users to add new vehicles. The user can click on the "Add Vehicle" button and enter the vehicle details in the modal. The app will validate the entered data and display any errors. If the data is valid, the app will add the vehicle to the database and display a success message.
The app allows users to edit existing vehicles. The user can click on the "Registration" number of the vehicle to be updated and enter the vehicle details in the modal. The app will validate the entered data and display any errors. If the data is valid, the app will update the vehicle in the database and display a success message.
The update modal also allows users to delete vehicles. The user can click on the "Delete" button to delete the vehicle.
Please check the official laravel installation guide for server requirements before you start. Official Documentation
Alternative installation is possible without local dependencies relying on Docker.
Clone the repository
git clone git@github.com:Thavarshan/transmission.git
Switch to the repo folder
cd transmission
Install all the dependencies using composer
composer install
Copy the example env file and make the required configuration changes in the .env file
cp .env.example .env
Generate a new application key
./vendor/bin/sail php artisan key:generate
Starting & Stopping Sail
Laravel Sail's docker-compose.yml
file defines a variety of Docker containers that work together to help you build the application. Each of these containers is an entry within the services configuration of the docker-compose.yml
file. The laravel.test
container is the primary application container that will be serving the application.
To start Sail run the following command from your project root:
./vendor/bin/sail up
To start all of the Docker containers in the background, you may start Sail in "detached" mode:
./vendor/bin/sail up -d
To stop all of the containers, you may simply press Control + C to stop the container's execution. Or, if the containers are running in the background, you may use the stop
command:
./vendor/bin/sail stop
Build the assets using npm
./vendor/bin/sail npm install && ./vendor/bin/sail npm run build
Run the database migrations (Set the database connection in .env before migrating) and seeders
./vendor/bin/sail php artisan migrate:fresh --seed
You can now access the server at http://localhost:3003
The database is seeded with a test user which can be used to login to the application.
You may use the following credentials to login:
Passsword | |
---|---|
test@example.com | password |
Transmission comes with a full suite of unit and feature tests. The tests may be run using the following commands:
./vendor/bin/sail php artisan test