Giter Club home page Giter Club logo

document-center-be's Introduction

K8s prerequisites

You will need a secrets.yml in the k8s folder with the following content:

apiVersion: v1
kind: Secret
metadata:
  name: document-center-be-secrets
  namespace: document-center
type: Opaque
data: 
  POSTGRES_PASSWORD=REPLACE_ME
  POSTGRES_USER=REPLACE_ME
  POSTGRES_DB=REPLACE_ME
  DATABASE_URL=REPLACE_ME

---
apiVersion: v1
kind: Secret
metadata:
  name: postgres-secrets
  namespace: document-center
type: Opaque
data:
  POSTGRES_DB: REPLACE_ME
  POSTGRES_USER: REPLACE_ME
  POSTGRES_PASSWORD: REPLACE_ME

---
apiVersion: v1
kind: Secret
metadata:
  name: minio-secrets
  namespace: document-center
type: Opaque
data:
  MINIO_ACCESS_KEY: REPLACE_ME
  MINIO_SECRET_KEY: REPLACE_ME

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

document-center-be's People

Contributors

grace0950 avatar github-actions[bot] avatar yjack0000 avatar yu-rou-weng avatar tsaiet avatar cthua avatar snyk-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar

document-center-be's Issues

CI 的一些修正(scan, test, save)

可以幫我改成先 scan 在 test 嗎~
如果可以了話麻煩看一下 snyk 是不是會在有太嚴重的 dependency 問題時中斷 CI,不然無限放過也蠻怪的。
還有 test 和 scan 的結果最好能存起來,像是作業那樣。

Swagger login is fake

swagger docs use input as Bearer
Screenshot 2024-05-29 at 6 07 26 AM

But we use cookie like this in cookie
Screenshot 2024-05-29 at 6 07 35 AM

So Bearer is fake, if you want to log in jus need to manally call /api/auth/github

And also, we are missing logout functionality that mention in #7

Test Cases Run Failed Module Not Found Error

image image image
  • Have tried but not work
    Example:
    1. from 'src/helper/helper.service';
      Change to relative path '../helper/helper.service';
    2. Or add following snippet in tsconfig.ts
"paths": {
 "src/*": [
 "src/*"
 ]
 }
  • Preliminary hypothesis: jest's problem

Fetch superuser data Error

image

  1. User Name Undefined. Might caused by parser
  2. Fetching superuser data with cookie on local got error (unauthorized)

Deleted document can also be assign

  • Deleted Document won't appear in review
  • [ ] But while assign an deleted document to user, it will still complete the transfer event and send mail to reviewer.

Fetch Documents Error when no cookies provided

Curl did not carry the cookie when http/https request in default. But still can fetch the data.

Reproduce

  1. Direct use curl in terminal
  2. Test the following api

/api/users : Can get the users directly
/api/documents/me: {"statusCode":500,"message":"Internal server error"}. Perhaps server got the empty user
/api/comments: {"data":[],"page":1,"limit":10,"total":0}

image

Enhance API responses by including username with userId for frontend display

In order to enhance the usability and clarity of our frontend display, it is proposed that all APIs currently returning a userId should be modified to return a nested object containing both userId and username. This change will facilitate better integration and usability on the frontend by providing more context to the user data being displayed.

User Name Undefined

It seems the parser has some problem. Need to handle the First name or the Last name is/are empty.

Btw, should we handle the order of the chinese name?

image

User Name Undefined

It seems the parser has some problem. Need to handle the First name or the Last name is/are empty.

Btw, should we handle the order of the chinese name?

image

[ERROR] Occurs Internal Server Error when Deleting

Deleting the document occurs errror when status of the document is review.
BTW, there is no error if the documents are edit. (I forgot the senario of the pass. I think it is well.)

This is the log from the Argo
image

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.