Find Jobs
Hire Freelancers

Vending machine exercice Node.js

€8-30 EUR

Completed
Posted almost 2 years ago

€8-30 EUR

Paid on delivery
Exercise brief Design an API for a vending machine, allowing users with a "seller“ role to add, update or remove products, while users with a "buyer" role can deposit coins into the machine and make purchases. Your vending machine should only accept 5, 10, 20. 50 and 100 cent coins. Tasks • REST API should be implemented consuming and producing "application/json" • Implement product model with amountAvailable. cost, productName and sellerld fields • Implement user model with username, password, deposit and role fields • Implement an authentication method (basic, oAuth, JWT or something else, the choice is yours) • All of the endpoints should be authenticated unless stated otherwise • Implement CRUD for users (POST /user should not require authentication to allow new user registration) • Implement CRUD for a product model (GET can be called by anyone, while POST, PUT and DELETE can be called only by the seller user who created the product) • Implement /deposit endpoint so users with a "buyer" role can deposit only 5, 10, 20, 50 and 100 cent coins into their vending machine account • Implement /buy endpoint (accepts productld. amount of products) so users with a 'buyer- role can buy products with the money they've deposited. API should return total they've spent. products they've purchased and their change if there's any (in an array of 5, 10, 20, 50 and 100 cent coins) • Implement /reset endpoint so users with a "buyer" role can reset their deposit back to 0 • Take time to think about possible edge cases and access issues that should be solved • If somebody is already logged in with the same credentials, the user should be given a message 'There is already an active session using your account". In this case the user should be able to terminate all the active sessions on their account via an endpoint i.e. /logout/all • Attention to security Evaluation criteria: • Language/Framework of choice best practices • Edge cases covered • Write tests for /deposit. /buy and one CRUD endpoint of your choice • Code readability and optimization ***** I prefer it to be done with Nodejs
Project ID: 33341518

About the project

7 proposals
Remote project
Active 2 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I have done several projects with node.js. I have experience of working in a tech startup as a backend developer. I can do your project. Let's talk on chat. Regards Ruhan
€12 EUR in 2 days
0.0 (0 reviews)
0.0
0.0
7 freelancers are bidding on average €34 EUR for this job
User Avatar
Hi, I am an Angular/Ionic/Nodejs/Spring/JAVA Developer and Architect with 4+ years of experience in building highly scalable and fault-tolerant enterprise applications. Check my freelancer profile. My expertise is in 1. Angular, PWA, IONIC ( Capacitor/Cordova), Typescript, Javascript,HTML,CSS,etc. 2. NodeJs, Express ,Spring, Java, Microservices, Automation using CRON Jobs, REST APIetc 3. MySQL, NoSQL, MongoDB, Mongoose, etc 4. AWS,HEROKU, FIREBASE, EC2, RDS, S3, Lambda, , etc. 5. JWT, SSO with OKTA, GMAIL, FACEBOOK, OAuth, SAML,etc 6. Payment gateway integration like RazorPay, ,Stripe,etc. 7. Google Map API,,Gmail API,etc Integration,etc 8. Data-Structure and Algorithm ( Graph theory, Divide & Conqure,etc) 9. JAVA, C, PYTHON, Lets connect in chat to discuss about the project.
€50 EUR in 7 days
5.0 (25 reviews)
4.5
4.5
User Avatar
Hello, I could help you with this project. I could write this project in Node.js Feel free to contact me for the details.
€50 EUR in 2 days
5.0 (10 reviews)
4.6
4.6
User Avatar
Hi there, I'm familiar with node js. I've built many APIs using node js. I can this system design too. If you're interested , please let me know the deadline. Thanks, Paul
€60 EUR in 7 days
5.0 (4 reviews)
2.9
2.9

About the client

Flag of TUNISIA
Sfax, Tunisia
0.0
0
Payment method verified
Member since Oct 20, 2018

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.