Please make sure you've already installed Visual Studio 2019, .Net 5 SDK and SQL Server 2019 on your Windows 10 platform.
Visual Studio 2019
.Net 5
Sql Server 2019
Select VehicleTracking.sln from /VehicleTracking/
directory.
Change database connection in appsettings.json
from VehicleTracking.Api
project .
ConnectionStrings
section in appsettings.json
:
"ConnectionStrings": {
"VehicleTrackingConn": "Server=localhost;Database=VehicleTrackingDb;user id=sa;password=123456789;"
},
Run VehicleTracking.Api
application.
I have implemented swagger documentation . You can see api documentation below url
Api documentation: https://localhost:5001/swagger/index.html
Make sure you have installed and configured docker in your environment. After that, you can run the below commands from the /VehicleTracking/
directory and get started with the VehicleTracking api immediately.
docker-compose build
docker-compose up
You should be able to access api components of the application by using the below URLs :
Api: http://localhost:5100/
Make sure you have installed and configured Kubernetes in your environment.
After that, you can run the below commands from the /VehicleTracking/Kubernetes/
directory.
./build-images.ps1
./deploy-all.ps1
You should be able to access api components of the application by using the below URLs :
Api: http://localhost:5100/
- Register a client with first name, last name, email, password .
- Client can login with email, password.
- A registered client can add multiple vehicle with Name, DeviceId. DeviceId is unique id which you get from the GPS device.
- GPS device send vehicle location with deviceId, latitude, longitude for the authentic client.
- Authentic client can see their vehicle current location by vehicleId. Api will return longitude , latitude and address name. Google map api will return current address name based on the position.
- Client can also see the vehicle journey by vehicleId, start and end datetime.
Demo Login Credentials:
URL: https://localhost:5001/api/v1/Account/Login
{
"email": "ovibhuiyan43@gmail.com",
"password": "1234"
}
If the customer wants to add more properties then you should update Data Model. After that have to do migration below commands.
add-migration "Added properties"
update-database
I have implemented google map geocode which will send address based on latitude and longitude. You can find in the GoogleApiService
.