This repository was archived by the owner on Dec 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
docs: add API design overview #16
Open
sf-clouder
wants to merge
14
commits into
Superformula:master
Choose a base branch
from
sf-clouder:sf-code-test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d82182c
docs: add API design overview
sf-clouder d3f03d0
chore: project init
sf-clouder c0f870e
style: install prettier and eslint
sf-clouder a8e7a87
chore(cdk): install aws cdk core
sf-clouder 74cff4f
chore(cdk): install cdk packages for apig, dynamo, lambda, sqs
sf-clouder d3ed2eb
feat(stack): basic cdk stack with dynamo table
sf-clouder fa3035a
feat(dynamo): add gsi for sk-state-city-zip
sf-clouder 3e24cc3
feat(stack): add api gateway with resources for /users and /users/{id}
sf-clouder 8fb7ee0
chore(lambda): install clone, clean, merge and logging packages
sf-clouder 8051c09
feat(stack): add lambda layer to stack
sf-clouder 72a48bf
feat(lambda): add create, read, update, delete functions
sf-clouder ef79d9b
feat(api): add user model to api for payload validation in front of c…
sf-clouder 1d59d3b
docs: remove outdated api design overview
sf-clouder e3154f8
docs(readme): modify readme.md with info about architecture, deployme…
sf-clouder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?) | ||
|
||
2. Should the API generate the unique user ID? Or does the user request the User ID, and the API determines it's uniqueness? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
} | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.