Coder Social home page Coder Social logo

takenoteinc / takenotes Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 360 KB

Backend for TakeNotes frontend, built using AWS serverless application model.

License: MIT License

Shell 6.53% JavaScript 93.47%
aws aws-lambda cognito dynamodb serverless

takenotes's People

Contributors

gurmehars avatar kaiferrall avatar krishnasolo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

athulya-aji

takenotes's Issues

Update Architectural Diagram

Since DB now has only one table, will need update the diagram to reflect new structure.
Also remove elasticsearch.

Create PUT request for notes.

Create PUT request for notes at {base_url}/users/{id}/notes/{notes_id}. This endpoint will be used to update the users notes. Input should be a note object, output/response can be the updated user object.

REST POST endpoint/function

Need to add a POST request to our main endpoint. This POST request should route to a handler just for POST requests.

Users should be able to send a POST request to {base_endpoint}/. The request body (input) will contain a brand new JSON User object. The function should add this user into our database and return a 200 on success.

Create POST requests for notes.

Create POST request for notes at
{base_ur}/users/{id}/notes. This endpoint will be used to create a new note object. Input should be a note object and output will be updated user object.

REST DELETE endpoint/function

Need to add a DELETE request to our main endpoint. This DELETE request should route to a handler just for DELETE requests.

Users should be able to send a DELETE request to {base_endpoint}/{id}. The function should delete the User corresponding to {id} and return 200 on success.

Front-End Week Timeline

Building navigational timeline which will change the state of the app on week selections.

REST GET endpoint/function

Need to add a GET request to our main endpoint. This GET request should route to a handler just for GET requests.

Users should be able to send a GET request to {base_endpoint}/{id}. The function should grab the User corresponding to the {id} and return it in JSON format. There is no need for input parameters or an input body because we just need to return the entire User object.

Create POST for entries.

Create POST request for entries at
{base_ur}/users/{id}/journal/weeks/{weekIdx}/entries/{entryIdx}. This endpoint will be used to create a new entry object. Input should be a entry object in body under entry property. Output will be new item under data field and id field in response will be id of new entry to put in dataset.

Add IDs to notes

Notes should have id's to prevent over writing the entire notes body everytime we update one note. Also as a result we should support CRUD at note level.

The focus for now - to add id on put request.
The notes field in DB will be a map and the id
will be used to index the map. The value associated with the ID key will be a note object with an id field holding the key and a header and content field representing the note.

Create DELETE request for notes.

Create DELETE request for notes at {base_url}/users/{id}/notes/{notes_id}. This is to allow a user to delete a note. Input should be nothing and output will be the old userObject?

Update template.yaml

Update template to trigger post User endpoint on post confirmation event from cognito. Update naming of resources to ref stage parameter.

Create PUT request for journals.

Create PUT request for journal at {base_url}/users/{id}/journal. This endpoint will be used to update the users journal. Input should be a journal object, output/response can be the updated user object.

Create PUT request for weeks.

Create PUT request for weeks at {base_url}/users/{id}/journal/weeks/{weekIdx}. This endpoint will be used to update a specific week in the users journal. Input should be a week object, output/response can be the updated user object.

Standardize response formats.

Convert JSON response structures to be standard across all routes. Currently some have the user doc on data.data.Attributes and some send back with user on data.Item

i.e

{
data: { updatedUserObject }
}

YAML setup research

Document what each line means
Add tags where we need to change or update stuff

Create DELETE request for entries.

Create DELETE request for entries at {base_url}/users/{id}/journal/weeks/{weekIdx}/entries/{entryIdx}. This endpoint will be used to delete the users entry given ID. Input should be a entry id, output/response will be the old user object.

REST PUT endpoint/function

Need to add a PUT request to our main endpoint. This PUT request should route to a handler just for PUT requests.

Users should be able to send a PUT request to {base_endpoint}/{user_id}, the input request body should be the entire User object, and should overwrite the User object in our database. Essentially updating the User.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.