AutoNexus is an application that handles both the services and sales aspects of an automotive service and sales center. CarCar manages the aspects of Automobile Inventory (Including Make, Model, and VIN) as well as the Service Appointments, Technicians, Customers, Sales, Salespeople, and the Customers who purchased vehicles.
- Gabe Wickert - Sales
- Yutong Ye - Service
- Fork the repo at https://gitlab.com/GabrielWickert/project-beta
2 .Clone your fork to your projects directory.
-
Change directory into the repository directory.
-
Run the following commands to set up Docker environment
docker volume create beta-data
docker compose build
docker compose up
- Enter "localhost:3000" in your web browser to see the front-end of the React app in action, showcasing its dynamic and interactive features.
The Service microservice contains 3 Models; Technicians represent service staff identified by a unique employee_id along with their name. Appointments capture scheduled service requests with details such as VIN, customer name, date and time, reason for service, VIP status, and the assigned technician. AutomobileVO model is kept up to date by a poller that syncs the vehicle VIN and "sold" status from the Inventory microservice every 60 seconds.
Action | Method | URL |
---|---|---|
List Technicians | GET | http://localhost:8080/api/technicians/ |
Create a Technician | POST | http://localhost:8080/api/technicians/ |
Delete a Specific Technician | DELETE | http://localhost:8080/api/technicians/<id>/ |
List Appointments | GET | http://localhost:8080/api/appointments |
Create a Appointment | POST | http://localhost:8080/api/appointments |
Delete a Specific Appointment | DELETE | http://localhost:8080/api/appointments/<id>/ |
GET http://localhost:8080/api/technicians/ No body is required. Example Get Response:
{
"id": 1,
"first_name": "John",
"last_name": "Ye",
"employee_id": 123
}
Create a Technician: POST http://localhost:8080/api/technicians/
{
"first_name": "Yutong",
"last_name": "Ye",
"employee_id": 123
}
Created a Technician Response:
{
"id": 1,
"first_name": "Yutong",
"last_name": "Ye",
"employee_id": 123
}
DELETE http://localhost:8080/api/technicians// Replace with the technician's unique ID.
{
"message": "Technician has been deleted"
}
GET http://localhost:8080/api/appointments/ No body is required. Example Get Response:
{
"appointments": [
{
"id": 2,
"vin": "1HGBH41JXMN109186",
"vip": false,
"date_time": "2024-02-10T14:00:00+00:00",
"customer": "Jane Smith",
"service_reason": "Regular maintenance",
"status": "Scheduled",
"techname": "John Ye"
}
]
}
Create an Appointment: POST http://localhost:8080/api/appointments/
{
"date_time": "2024-02-10T14:00:00Z",
"service_reason": "Regular maintenance",
"status": "Scheduled",
"vin": "1HGBH41JXMN109186",
"customer": "Jane Smith",
"vip": true,
"technician": 2
}
Created Appointment Response:
{
"appointments": [
{
"id": 2,
"vin": "1HGBH41JXMN109186",
"vip": false,
"date_time": "2024-02-10T14:00:00+00:00",
"customer": "Jane Smith",
"service_reason": "Regular maintenance",
"status": "Scheduled",
"techname": "John Ye"
}
]
}
DELETE http://localhost:8080/api/appointments// Replace with the appointment’s unique ID.
{
"message": "Appointment has been deleted."
}
The Sales microservice contains 4 Models; AutomobileVO, which takes the VIN and the sold property from the Inventory model "Automobile", Customer, which is used to demonstrate a potential customer for purchasing a vehicle, Salesperson, who represents the staff that is making a sale on the vehicles on the lot, Sales are used to keep track of sales that have occurred.
Action | Method | URL |
---|---|---|
List Customers | GET | http://localhost:8090/api/customers/ |
Create a Customer | POST | http://localhost:8090/api/customers/ |
Delete a Specific Customer | DELETE | http://localhost:8090/api/customers/<id>/ |
List Salespeople | GET | http://localhost:8090/api/salespeople/ |
Create a Salesperson | PUT | http://localhost:8090/api/salespeople/ |
Delete a Specific Salesperson | DELETE | http://localhost:8100/api/salespeople/<id>/ |
List Sales | GET | http://localhost:8090/api/sales/ |
Create a Sale | POST | http://localhost:8090/api/sales/ |
Delete a Specific Sale | DELETE | http://localhost:8090/api/sales/<id>/ |
To create a customer: POST http://localhost:8090/api/customers/
{
"first_name": "Josh",
"last_name": "Elder",
"address": "69420 Capitol Hill, Seattle, WA 98102",
"phone_number": "1231231234"
}
Created a Customer Response:
{
"id": 4,
"first_name": "Josh",
"last_name": "Elder",
"address": "69420 Capitol Hill, Seattle, WA 98102",
"phone_number": "1231231234"
}
To create a salesperson:
Create Salesperson:
{
"first_name": "Jaik",
"last_name": "Ascher",
"employee_id": "jascher"
}
Created a Salesperson Response:
{
"id": 5,
"first_name": "Jaik",
"last_name": "Ascher",
"employee_id": "jascher"
}
To create a sale: POST http://localhost:8090/api/sales/
Create a Sale:
{
"price": 1000000,
"automobile": "1D7HA18N33J33J665",
"salesperson": "jascher",
"customer": "Josh"
}
Created a Sale Response:
{
"id": 16,
"price": 1000000,
"automobile": {
"id": 4,
"vin": "1D7HA18N33J33J665",
"sold": false
},
"salesperson": {
"id": 5,
"first_name": "Jaik",
"last_name": "Ascher",
"employee_id": "jascher"
},
"customer": {
"id": 4,
"first_name": "Josh",
"last_name": "Elder",
"address": "69420 Capitol Hill, Seattle, WA 98102",
"phone_number": "1231231234"
}
To delete a customer, salesperson, or sale, send a DELETE request to the corresponding URL with the appropriate ID:
{
http://localhost:8090/api/customers/<id>/
http://localhost:8090/api/salespeople/<id>/
http://localhost:8090/api/sales/<id>/
}
To perform the deletion, simply replace with the actual ID of the customer, salesperson, or sale you want to remove, and send the request using the DELETE method.