BaseCard and UserCard schema improvements + local dynamodb smoke tests - #48
Open
cboiteux2765 wants to merge 1 commit into
Open
BaseCard and UserCard schema improvements + local dynamodb smoke tests#48cboiteux2765 wants to merge 1 commit into
cboiteux2765 wants to merge 1 commit into
Conversation
✅ Deploy Preview for lingolm ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds the BaseCard/UserCard persistence contract and a server-side DynamoDB implementation for saving and resetting vocabulary cards.
BaseCard,UserCard, nested content, annotations, and warnings contracts.{ card: BaseCard }and updates the lookup UI to consume it.POST /api/cardsto create a user-owned card from an already-available BaseCard, without calling the lookup Lambda.POST /api/cards/:cardId/resetto restore editable content from the stored BaseCard while preservinguserId,cardId,createdAt,baseRef, notes, and warnings.S,N,BOOL,M,L, andNULL).Type of change
How did you test this?
With DynamoDB Local running at
http://127.0.0.1:8000:Results:
npm run buildcompleted successfully.BaseCardsandUserCardstables, saved a sample BaseCard-derived UserCard, printed the raw DynamoDB wrappers, simulated an incorrect definition, and verified reset restored the BaseCard definition while retaining the user note.put_itemAPI. It verifiedcontentis anM,content.definitionsis anL, definition text is anS, and revision is anN.Checklist
Next steps
{ card: BaseCard }payload.AWS_REGION,USER_CARDS_TABLE_NAME, andBASE_CARDS_TABLE_NAME, then grant the deployed server runtime least-privilege DynamoDB access.lookup Lambda -> save endpoint -> UserCards -> reset endpoint -> BaseCards.GenAI usage