The following inputs would be useful:
-
I’m using AnonyMail as the working name for the project, will use it in logo text but not hard set it anywhere, if the service name is decided I can use that, and also design a working logo around it to help lay out the front page
-
Will build a skeletal layout with some nice design tweaks, but this is simply for the purpose of presentation of functionality. If you’re happy with keeping the design that way, that’s fine, otherwise I’m open to suggestions.
-
Any copy or sample text to be used in the layouts would also be useful, but not critical, can use lorem ipsum text for now
-
Any details on required level of testing (unit/functional/integration)
-
Rake task added which uses the MailQueue.dispatch function to pull the items waiting in the mail queue. At present time this delivers text-based mail. This will be connected into the scheduler add-on to Heroku, or a crontab if hosted on another server.
-
Devise authentication set up to work via API using an auth token instead of session-based management
-
Addition of rolify gem to provide separation of user and admin roles, redirect an admin straight to the admin account on sign-in
-
Add Attachment saving to email storage, best to keep these in S3 rather than in memory in Redis
-
mail_queue -> list of mail GUIDs, these will be popped out of the list by background job and the mail dispatched
-
mailbox_uid -> mailbox with the suffix of the user’s anonymous email address prefix, contains a list of mail_guids
-
mail_guid -> will contain the contents of the message along with any metadata, either json encoded or as a hash
-
mail_errors -> contains a list of delivery errors
Note: This should be done over an SSL connection if they API is located on a different server, as the credentials will be supplied/returned in plaintext
-
User login is accomplished by first acquiring a token via passing login credentials via POST params to /api/tokens.json, the result will be an auth_token used to achieve authentication on subsequence requests
Example of the login process, and accessing a user’s account details, this assumes using curl from the command-line (any tool that can send test requests will do):
-
curl -d “email=example%40example.com&password=examplepassword” shielded-taiga-5671.herokuapp.com/api/tokens.json
-
If credentials are correct (the user in the above example has been created and should work) the returned result would be {token: <token>}
-
Tested result {“token”:“QpA83tDb2948xzpyftpa”}
-
curl shielded-taiga-5671.herokuapp.com/api/account.json?auth_token=QpA83tDb2948xzpyftpa
-
This should return the user’s account details, just a sample result to demonstrate use
-
Tested result {“email”:“example@example.com”,“received_emails”:0,“anonymous_email”:“gynqmevg@personal.bosonstudios.com”}
-
curl shielded-taiga-5671.herokuapp.com/api/users/16/mailbox.json?auth_token=QpA83tDb2948xzpyftpa
-
This should return the user’s mailbox details
-
Tested result [{“sender”:“Ray”,“name”:“”,“address”:“example@example.com”,“uid”:“gynqmevg”,“text”:“test emailnn”,“html”:“u003Cdiv dir="ltr"u003Etest emailu003Cbru003Eu003C/divu003Enn”,“subject”:“testing”,“has_attachments”:“0”,“sent”:“1”}]
-
-
User
-
/api/tokens.json
-
methods ->
-
CREATE
-
DESTROY
-
-
In order to log in, the user passes an email and password as post params to this endpoint, if successful it will return {token: <auth_token>} which will be used in subsequent requests to verify the user’s credentials
-
-
-
Account
-
Mailbox
-
Mail