Giter Site home page Giter Site logo

itforge-eros / soa2019-group5 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.18 MB

A note-taking application with voice recording

Home Page: https://lectio.itforge.io

License: MIT License

HTML 2.31% CSS 1.52% TypeScript 61.02% Scala 21.51% Dockerfile 0.39% JavaScript 13.25%
react scala web-application

soa2019-group5's People

Contributors

kavinvin avatar nzartre avatar tonthanathep avatar xiikjiix avatar yupiiina avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

soa2019-group5's Issues

CORS problem calling API

api.lectio.itforge.io is using the Same Origin policy, hence the following error

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.lectio.itforge.io/memos/1556803406100. (Reason: CORS request did not succeed).

Require a more practical way for loggin in

Current flow (not yet implemented on PWA):

  1. Open the external login page. This will happen every time a user launches the app to avoid a token timeout.
  2. User enters credentials and submits.
  3. Login page returns a token in a query string.
  4. PWA stores in sessionStorage.
  5. PWA proceeds to Home page.

Proposed flow:

  1. In https://asia-northeast1-kavinvin-211411.cloudfunctions.net, allow localhost:3000 origin in CORS. I know this is not a safe way in production but as the deadline approaches, I want to make it just work ASAP. Or you guys could create a new endpoint in api.lectio.itforge.io that will forward the login credentials to the mentioned host, for security reasons.
  2. PWA automatically submits credentials to the above endpoint.
  3. Login endpoint returns a token in a query string.
  4. PWA stores in sessionStorage.
  5. PWA proceeds to Home page.

Display a summary in Summary page

Currently, the transcript of a current note is displayed for TESTING purpose. We need to send that transcript to the server, get a summary, and then display it.

POST to `/api/memos` returns 404

A POST request to http://lectio.itforge.io/api/memos (to create a new memo) returns 404 page not found response.

Authentication (Bearer eyxxxxxxxxxx) with a valid token (from logging in) exists in request header.

Expected behaviour: a memo is created and 201 Created response is returned.

Consider updating `tags` schema in Memo

The current schema for Memo.tags is

"tags": [
    name: string
]

Proposed enhancement to reflect the schema used in PWA:

"tags": [
    { id: string, name: string }
]

For example:

"tags": [
    { id: "computer-science", name: "Computer Science" }
]

Consider updating `Location` header when creating a memo

Maybe @kavinvin is responsible for this (?)

When creating a new memo, the server returns Location header as /api/memos/a9a995f0-3092-4e43-ada1-f7a31eec8127 whereas the current API host is api.lectio.itforge.io (no more /api).

Should Location header be updated to be something like /memos/a9a995f0-3092-4e43-ada1-f7a31eec8127?

Enable HTTPS for API

Some client API's (e.g. microphone access) require PWA to be served through HTTPS. It is. The problem is that when serving a page through HTTPS, every resource loaded to that page must also be served through HTTPS.

Please enable HTTPS on the API side (api.lectio.itforge.io).

Should be able to create a new memo with data

The current endpoint doesn't accept memo body. This creates an unnecessary overhead on the client: create an empty memo first, wait for its ID and then send another request to update it.

POST request on /memos should accept memo body.

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.