Coder Social home page Coder Social logo

atypicalspeech's Introduction

atypicalspeech's People

Contributors

ameriania avatar forrestpark avatar maxzinkus avatar

Stargazers

 avatar

Watchers

 avatar  avatar

atypicalspeech's Issues

Add two-factor TOTP authentication to admin login

Passwords are often not a sufficient protection against unauthorized login. Adding time-based OTP (TOTP) using a standard node.js library and pairing it with an app such as Google Authenticator or Microsoft Authenticator on admin's personal devices (i.e. smartphones) would dramatically improve security.

Audio Distortion

Audio recordings made with distortions - sample recordings with distortions

The issue seems to be happening for a couple of other users of the 'audio-react-recorder' library. Link to issue

Depends on the device, but on the device currently deployed at the hospital, distortion starts to happen around the 7th or 8th consecutive recording with the distortion worsening afterwards.

I have tried modifying audio settings of audio-react-recorder (ex) and have attempted changing audio formats but have not been able to produce any meaningful improvement in audio quality.

'audio-react-recorder' does seem to be an abandoned library; have also explored other libraries as a last resort (ex). Please let me know if you have any recommendations on switching to another recording library, or potentially build one ourselves (expensive, though).

Admin Pages 404

Seems like the version being built are the same between development and prod mode, so the issue should be addressed at the router can't route to the right page

Add logout button

As discussed in Zoom, add a logout button to the admin which invalidates the JWT on the server-side and deletes the cookie from the client.

Welcome Page Reconstruct

Page:
image

Code:
image

intuition:
Reconstruct the Welcome Page with a straightforward HTML structure to extend more easily later in the future

Compiling Error

Scenario:

There is an error happened while we try to deploy our production code to the server, here is the error as below:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR!   peer react@">=16.8.0" from @emotion/[email protected]
npm ERR!   node_modules/@emotion/react
npm ERR!     @emotion/react@"^11.10.5" from the root project
npm ERR!     peer @emotion/react@"^11.0.0-rc.0" from @emotion/[email protected]
npm ERR!     node_modules/@emotion/styled
npm ERR!       @emotion/styled@"^11.10.5" from the root project
npm ERR!       3 more (@mui/material, @mui/styled-engine, @mui/system)
npm ERR!     3 more (@mui/material, @mui/styled-engine, @mui/system)
npm ERR!   20 more (@emotion/styled, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from [email protected]
npm ERR! node_modules/audio-react-recorder
npm ERR!   audio-react-recorder@"^1.0.4" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^16.0.0" from [email protected]
npm ERR!   node_modules/audio-react-recorder
npm ERR!     audio-react-recorder@"^1.0.4" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/runner/.npm/_logs/2023-05-16T19_56_23_565Z-eresolve-report.txt

Issue Address:
When deploying, the script in deploy.yml will be run, and the crash happens in the code I've stressed:
image
The reason is when we're using npm version 7+, it adds a new feature named "peer dependency", which analyzes the shared libraries like react and react-dom in each third-party plugin whether are using the same version or a permitted version.

Solution:
In package.json, we add this rule as follows, and it will force third-party plugins to use the same version of shared libraries and avoid installing repeated ones again and again.
image

FYI:
--force and --legacy-peer-deps are also temporary solutions to help to deploy not blocking the whole process, but it's definitely not an ideal way to use in a production environment.

References:
https://medium.com/@reemshakes/devdependencies-vs-dependencies-in-reactjs-db7261e13012
https://jsramblings.com/do-dependencies-devdependencies-matter-when-using-webpack/
https://stackoverflow.com/questions/66020820/npm-when-to-use-force-and-legacy-peer-deps
https://developer.aliyun.com/article/1060855

Read database credentials from Environment Variables

const sequelize = new Sequelize('database_speech', 'database_speech', 'database_speech', {

Even though our database is only locally accessible, it's generally considered far more secure to read credentials from secure storage or at least from the environment. This way, we don't have credentials in the git history. Once this change is adopted, the credentials can be updated.

Signal Indicator

The thing is that as users can have several microphones in their system, it could happen that no mic is selected (or a silent source is selected) and the person will not be recording any audio. It will still generate a file, but it will be just silence. I think we should have some type of signal indicator (waveform, vu-meter, whatever)

BE - vulnerabilities in node modules

App(Node)

After fixed: from 23(3 high) to 6(moderate)

Image

Client

from
Image

to:
Image

react-scripts is the official library of react.js, although it contains vulnerabilities, it's still trustworthy.

PRD - Dashboard Prototype

DataFlow Diagram:
image

Todo List:
Need to make it into a user interface prototype, then figure out what modules should be done.

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.