-
Notifications
You must be signed in to change notification settings - Fork 2
manojapr/Rydeu-Coding-Task
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Backend: Build a greenfield app with rest api for calculating total transfer cost for a ondemand taxi app using NodeJS. - Build a pricing module with rest api to find available pricing for different vehicles for different city based on disctance travelling. - Organization(client) has many pricing based on city and vehicle type. - Pricing should be calculated based on a base price with fix distance and then per km price for remaining distance. Ex. Base km is 10 km. And base price is 25 euro. Then each additional km cost 2 EUR for van and 1 EUR for sedan. - Api should return pricing for both vehicles of that city for that organization. Api request body: { city: berlin organization_id: 001 total_distance: 20 } API response body: [ { vehicle_type: minivan total_price: 45 }, { vehicle_type: sedan total_price: 35 } ] relations: ========== Organization has many pricings. Pricing row has one vehicle. Organization: id: name: Vehicle: id: type: description: Pricing: organization_id: vehicle_id: city: base_distance_in_km: 10, km_price: 2 fix_price: 25 * Use postgresql for the Database. * use service object for calculating price. Dont write all code in controller. * Every price will be in cent so it can be calculated without the decimal issues * Design schema with proper validation while taking inputs from api payloads and use validation on service object appropriately. * Coding style is important. Please follow some standard linting like airbnb or any popular one.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published