This project is a simple frontend / backend application that will allow you to lookup different models of vehicles by their type and make.
This projects has the following requirements:
The backend of the project, structured as a simple RESTful API made with Symfony and Doctrine.
The frontend of the application, made with VUE and Vuetify.
Sample Video (Dropbox MP4 File)
In the 'car-backend' folder, enter the following to install dependencies:
composer install
On a MySQL Server, create the Schema:
CREATE SCHEMA `car-models` ;
in the .env file in /car-backend, add the following line but substitute the placeholder values with relevant MySQL connection information:
DATABASE_URL=mysql://username:[email protected]:3306/database_name?serverVersion=5.7
the final step before you can deploy is to build the database migrations and fill it using the json fixtures. In a terminal from the backend folder, enter this command:
bin/console doctrine:fixtures:load
After that, the backend will be ready for deployment. You can test and review the app locally by
Next, in the frontend folder, run the following:
npm install
You should then be able to build and deploy the frontend.
You can also test or review this project locally
add a file in the frontend folder called ".env.serve.local" and specify the API url for the backend
VUE_APP_API_URL=http://127.0.0.1:8000
You can serve the frontend locally for testing.
npm run serve
the backend can be served locally by running the following command in the car-backend folder
symfony server:start
- There should be a page at route "/" that shows a list of vehicle types
- an API call will return the types
- There should be a route for /makes/{type} where type is the selected vehicle type.
- Should display a dropdown that will show a list of makers for the selected type.
- When a make is selected, the server will respond with data about the model and display a list of models underneath the dropdown.
- If no models are available related to the query, "no results found" will be displayed instead.
- There should be an API route for /models/{type}/{makeCode} where type is the vehicle type and makeCode is the make of the selected vehicle.
- Will return details about the vehicle in JSON.
- All requests should be logged using an entity called "SearchLog"
- Add Proper error handling to handle all failed API calls
- Refine frontend user experience
Stock Images by: -JESHOOTS.com -Tomáš Malík -Andrea Piacquadio