Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

docs: add API design overview #16

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions api-design-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SuperFormula Back End design test

## Environment

- AWS Cloud Native
- API Gateway per-route entry points
- CRUD routes trigger Lambdas
- DynamoDB storage
- DLQ for catching errors
- Infrastructure as configuration/code

## Questions

1. Do we need to secure the API? (API key, lambda authorizer, something else?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great question. Please secure the API with an authorizer lambda, if time allows.


2. Should the API generate the unique user ID? Or does the user request the User ID, and the API determines it's uniqueness?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would ask the same question back to you: what would you recommend and why?


3. Do we want to store the data exactly as shown in the model? (i.e. address as a simple string). Or do we want to break address into an object with attributes like street, city, state, zip, etc?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model shown is only for the sake of simplicity.

However, we would welcome further improvements into an object model based on what you might deem appropriate. Address as an object definitely makes sense to me, in that regard.


```json
{
"id": "xxx", // user ID (must be unique)
"name": "backend test", // user name
"dob": "", // date of birth
"address": "", // user address
"description": "", // user description
"createdAt": "", // user created date
"updatedAt": "" // user updated date
}
```