Você está na página 1de 4

We require a laravel app and database to be built which will serve as back end only (the front end

is separate
and already made).
The laravel app you need to build will be a REST API service for our mobile app that we have built.
For your info, you can see our draft mobile app here: ​http://taxea.co/
The mobile app will call the laravel REST API using Ajax.

Based on our mobile app (​http://taxea.co/​), to begin with, you need to develop the below API endpoints.
We would appreciate it if you review our above front end link and provide any other recommendations you have
or any recommended changes to the below. We can discuss before you begin.

Adding expense records:


There are 3 types of expense records to add. This will be 3 tables in the database.

POST /generalExpense/
This will submit a generalExpense record in to the database.

POST /kilometersExpense/
This will submit a kilometersExpense record in to the database.

POST /propertiesExpense/
This will submit a propertiesExpense record in to the database.

FYI here’s how the 3 forms look, you can also see them in ​http://taxea.co/
Listing expense records:
For all 3 of the above tables
(generalExpense, kilometersExpense, propertiesExpense),
We also need a ​/GET/​ endpoint for each one, that will return the whole list of records (with all columns).
The list returned should be in JSON format. We’d like to use JSON data type when posting and getting from the
backend API.

Editing expense records:


For all 3 of the above table items
(generalExpense, kilometersExpense, propertiesExpense),
We also need a ​/PUT/[id]​ endpoint for each one, to edit individual records, and DELETE to delete records.

Profiles

/POST/ - add new profile


/GET/ - get all profiles
/PUT/[id] - edit a profile
/DELETE/[id] - delete a profile

The ‘user’ field in the expense items (generalExpense, kilometersExpense, propertiesExpense) relates to these
profiles. So in other words, each expense item is tied to a profile.
Here are the profile fields below.
Properties

/POST/ - add new property


/GET/ - get all properties
/PUT/[id] - edit a property
/DELETE/[id] - delete a property

The ‘property’ field in the propertiesExpense items relates to these properties. So in other words, each
propertiesExpense item is tied to a property.
Here are the property fields below.

The ‘owner’ field is tied to a profile in the Profiles table.


Users

Finally, we have a standard ‘users’ table.


We will use this for authentication.
All data (expense items, properties, profiles, ect) are tied to a user.
Here are our user fields:

API Authentication

For authentication, we would like to use laravel passport.


https://laravel.com/docs/7.x/passport
This assigns a random token to each user, and checks/verifies that each API call has the correct token for that
user.

Other notes:
● Ideally we’d like to use Laravel 6 or 7
● Work should be committed to bitbucket regularly

Please advise:
- Hours estimate for all the above work only. There will be more work after we finish this initial build.
- How long do you think it will take to finish it based on your current availability?
- Any comments, questions or notes you have on the above?

Você também pode gostar