This API allows signed-in users to get an estimation of a car value based on their location, car's make, model, year and mileage. The estimation is calculated from previous reports added by the users after being approved by the admins.
Estimation calculation: the application calculates the average price of all approved cars within +/- 5 langtitude and latitude degrees and where the model year of the car is +/- 3 years.
git clone https://github.com/mmaksi/car-value.git
cd car-value
npm install
npm run typeorm:migration:generate
to generate a migration file for the database.npm run typeorm:migration:run
to generate a tables structure for the database.
๐ฃ Two roles: users and admins; users can add and get reports, and admins can accept the added reports.
๐ฃ Sign-up/Sign-in using JWT and cookies.
๐ฃ Custom middleware to attach the signed-in user to the Request
object.
๐ฃ Custom Serialize(dto)
interceptor that works with any DTO to add serialization logic.
๐ฃ Custom decorator to return the signed-in user that can be used anywhere in the application.
NestJS, Express.js, TypeScript, TypeORM, SQLite, JWT & Cookies.
Diagram URL: https://i.ibb.co/nLSm7Tj/Users-Module.png
Diagram URL: https://i.ibb.co/m5gZN9S/Reports-Module.png