/updatelog

Primary LanguageTypeScript

updateslog

API to allow users to log updates to their products

Problem Statement

Solution Description

Features

  1. User can create/view/update a product
  2. User can log update(s) to a product
  3. User can view an(all) update(s) to a product
  4. User can view all products
  5. User can signin/signup

Tech Stack

Database : PostgreSQL(Render) Backend : Node.js, Express.js Deployment : Render/Vercel

Technical Designs

Erasor.io Designs Figma Designs

DB Schema

DB Schema design

API Flow

Setup

  1. Clone the repository
  2. Run npm install to install all the dependencies
  3. Run npm start to start the server
  4. Run npm test to run the tests

API Documentation

The API documentation can be found here

References

  1. API design v4 by Scott Moss

Learnings

  1. Build small features, test them and then build on top of these tested features.
  2. More complex the feature, more time it takes to build and test. So divide it in chunks and build and test them separately.
sequenceDiagram
    participant browser
    participant server

    browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/notes
    activate server
    server-->>browser: HTML document
    deactivate server

    browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/main.css
    activate server
    server-->>browser: the css file
    deactivate server

    browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/main.js
    activate server
    server-->>browser: the JavaScript file
    deactivate server

    Note right of browser: The browser starts executing the JavaScript code that fetches the JSON from the server

    browser->>server: GET https://studies.cs.helsinki.fi/exampleapp/data.json
    activate server
    server-->>browser: [{ "content": "HTML is easy", "date": "2023-1-1" }, ... ]
    deactivate server
Loading