Kurabu-chan / Kurabu

monorepo for the Kurabu project
BSD 3-Clause "New" or "Revised" License
7 stars 4 forks source link

Add knex.js and configure a basic database in the api #138

Closed rafaeltab closed 2 years ago

rafaeltab commented 2 years ago

Authentication database

erDiagram
  User }o--|{ Role : "is assigned"
  Role }|--o{ Scope : "has"
  User }|--o{ ExternalConnection : "has"
  ExternalConnection }o--|| ExternalApplication : "with"
  ExternalConnectionRequest }o--|| ExternalApplication : "for"
  Client ||--o{ RedirectUri : "with"

  User {
    uuid userId
    string email
    string hash
  }
  Client {
    uuid clientId
    string name
  }
  RedirectUri {
    uuid redirectUriId
    string b64Uri
  }
  Role {
    uuid roleId
    string name
  }
  Scope {
    uuid scopeId
    string name
  }
  ExternalApplication {
    string b64AuthenticationOptions
    string name
  }
  ExternalConnection {
    string accessToken
    string refreshToken
    DateTime accessTokenExpire
    DateTime refreshTokenExpire
  }
  ExternalConnectionRequest {
    string redirectUri
    string authorizationCode
  }