You are on page 1of 3

 

TRENDYDICE 

BackEnd Project  

OVERVIEW 
Design RESTful APIs in LARAVEL that could onboard a user onto our main application and collect 
a set of user information. 

GOALS 
Application development should cover two major goals: 

1. Registration and authentication of a User. 


2. Onboarding the registered users on the application by asking the user to provide a set of 
different information. 

Once the user completes filing all sets of information, only then the user will be able to access his 
complete profile api. 

SPECIFICATIONS 

1. Registration And Authentication 


● Login API​ -  
○ Should accept email/mobile and the password. 
○ Should check for ​Validation​ of all the request input fields. 
○ Should respond with the corresponding failure messages and HTTP error code on 
validation failure. 
○ If ​Validation​ passes,match the credentials against the users stored in the 
database. 
○ Should respond with proper HTTP error code and message on credentials 
mismatch. 
○ If credentials matches,Generate unique ​JWT ( JSON Web Tokens )​ token which 
should be sent with the response (or set a cookie) and used for future request 
authorization. 
○ On successful login ,respond with the success message and HTTP success status 
code.  
● Registration API​ - 
○ To register a new user, validate the request input parameters format against fields 
like First Name, Last Name, Email, Mobile Number and Password. 
○ If ​Validation​ passes, verify if a user with the corresponding email or mobile 
number already exists and notify with a proper error response. 
○ Else register the new user in the database and also sign in the user by creating 
the new JWT token. 

Note: ‘Validation’’​ - includes checking Required form fields, Data type and Format/pattern 
applicable on various form fields [email, mobile, password ...etc ] (like: a valid email should 
contain ‘@’ ). 

2. Multi-Step Wizard 
● Newly registered users will be required to provide the information categorized as 
following and thus corresponding APIs needs to be designed- 
○ Set 1 - Personal / Account Information. 
○ Set 2 - Professional / Educational  
○ Set 3 - Business Information 
○ Set 4 - Address / Contact Information 
● The user should be able to retrieve his details and update them at any time for which 
corresponding apis needs to be designed. 
● Check for input​ ‘​Validation​’ o
​ n each api, and show errors corresponding to each input 
field. 
● Personal / Account Information​ - 
○ Design the REST api asking for fields like- About, profile Image, DOB, Gender. 
● Professional / Educational ​- 
○ Educational Qualifications and year of passing - Can add multiple qualifications. 
(Choose appropriate data structure / Column data type to store multiple entries) 
○ Work designation, Company and year range - can add multiple. 
● Business Information - 
○ Company Name, About, GST number, PAN number, copy of PAN card (image) 
● Address / Contact Information -  
○ Address, landmark, city, state, country, pin code.  
○ The address should be stored on a separate table in the database. 
● Also design a RESTful ‘​profile’​ api which will contain all the above information. 

​ he routes for all the sets of information must be protected from guest users. Also you are 
Note: T
free to make a choice in using views or directly using POSTMAN for API testing.  

TECHNICAL REQUIREMENTS 

● Backend Framework - Laravel. 


● API testing tool- POSTMAN (optional) 
● Database - PostgreSQL / mySql 
● The above project should provide you a good understanding of ​Models​, ​Views and 
Controllers - the MVC architecture ​in the Laravel. 
● Also, you are expected to learn thoroughly to have a good understanding of ​Eloquent 
ORM ​by then.

RESOURCES YOU MAY REFER TO:

● Laravel Course On Udemy by Edwin Diaz:


○ Username - ​rohit@trendydice.com
○ Password - td@udemy26
○ Course link:
https://www.udemy.com/course/php-with-laravel-for-beginners-become-a-master-
in-laravel/
● Laravel Documentation - ​https://laravel.com/docs/6.x
● Postman
Tutorials-​https://www.youtube.com/watch?v=YKalL1rVDOE&list=PLM-7VG-sgbtBsenu0
CM-UF3NZj3hQFs7E

You might also like