Create a Django app on Amazon that accepts POST requests and returns JSON - no front end
$500-4999 USD
Dibatalkan
Dibuat hampir 13 tahun yang lalu
$500-4999 USD
Dibayar ketika dikirim
Create an API using Django and Amazon EC2, which lets users keep their GPS data backed up and synced "in the cloud." No front-end, we will set up our mobile app to use your API.
Please see the detailed project info for a full spec.
The API should accept the following POSTs:
/check_for_updates
/register_device
/reset_password
/update_password
## Deliverables
I develop an iPhone app that lets people record waypoints and tracks as they walk around.
I would like you to create an API using Django and Amazon EC2, which lets users keep their data backed up and synced "in the cloud." There is no front-end UI for you to make - I will implement the API you provide within the app.
Database and Model
The app should use Django, which includes a Geo-Django module for doing geographic storage and lookups.
There will be four tables in the database: Waypoint, Track, User, and Device. A User can have any number of Waypoints, Tracks, and Devices associated with them.
API
The API should accept the following POSTs:
/check_for_updates
* Parameters: email_address, password, app identifier, UDID, last_check_date, waypoint_data, track_meta_data, tracks
The waypoint_data and track_meta_data will be sent as a JSON list. The track_meta_data will reference tracks, which are text files for each track.
* REQUEST: The client phone will send email_address, password, and the device ID (UDID), along with new waypoints and tracks the user has created or edited since last_check_date.
* RESPONSE: The server will merge the new data, and send back JSON that lists the user's waypoints and tracks that have changed or were created since last_check_date
* ERROR RESPONSE - The server will indicate an error if the email_address or password is wrong
If last_check_date is not given, the server sends back all of the user's waypoints and tracks.
/register_device
* Parameters: email_address, password, UDID, app identifier
* REQUEST: The client phone will send email_address, password, app identifier, and the device ID (UDID).
* RESPONSE: The server will create the user if it does not exist, and the server will create a device for the udid and associate it with the user. If this succeeds, it will send back a success response.
* ERROR RESPONSE - The server will indicate an error if the UDID is associated with a different user or the password is incorrect
The server will send an error response if the password doesn't match
/reset_password
* Parameters: email_address
* REQUEST: The client phone will send an email address.
* RESPONSE: The server will send an email to the user with a URL that includes a secret key.
* ERROR RESPONSE - The server will indicate if the email address does not exist.
/update_password
* Parameters: secret_key, email_address, new password
* REQUEST: The client will send the key it received in email and the new password (which was embedded in the reset URL)
* RESPONSE: The server will indicate success.
Merge Policy
Order of edits - The server will always apply the last edit it received as current.
Example - A user deletes a waypoint on a device, and then edits that waypoint on another device.
scenario #1 - He syncs the delete device, and then the edit device. In this case, the waypoint will be deleted, and then saved as new.
scenario #2 - He syncs the edit device, and then the delete device. In this case, the waypoint will be edited, and then not deleted since the delete edit was older.
Backups
Database should be backed up to S3 automatically
An ec2 image containing the django and database set up, and code should be made available. This doesn't need to be automatically monitored and launched, but should be able to be set up, the code updated, and data copied over from S3 in a few commands. Data Schema
Waypoint
- name
- unique identifier
- create date
- updated date
- notes
- latitude,lLongitude (geo-django coordinates field)
- ID (unique across multiple device databases)
Track
- name
- create date
- updated date
- notes
- unique identifier
- filename (points to a text file on the server)
- waypoints
-ID (unique across multipel device databases)
User
- email
- password
- devices
- tracks
- waypoints
Device
- UDID
Checkin
- device
- app identifier
- date_created