Backend Application

Database Entities

For the development, we used MariaDB/MySql as the database of LRBSL project. However, by using the TypeORM which is an object relation mapping tool, the database-backend development could be able to complete independently from database type. The database entities which are based on TypeORM can be found at "/blockchain/packages/server/src/entities" location.

  • user.entity : parent class for main 3 user entities
  • user.auth.entity : contains authentication user information
  • user.notary.entity : contains notary related user information
  • user.surveyor.entity : contains surveyor related user information
  • user.rlr.entity : contains regional land registry related user information
  • nic.entity : contains national identity card information
  • land.entity : contains land information which are not in blockchain
  • land.deed.entity : contains deed information for each land
  • land.plan.entity : contains plan information for each land

The services for database entities can be found at "/blockchain/packages/server/src/services" location.

  • user.service :
    • Auth User related services
      • getAuthUserById(id: string)
      • getAuthUserByCredentials(email: string, password: string)
      • createAuthUser(email: string, password: string, type: string)
      • updateAuthUser(user: AuthUser)
      • updateAuthUserPassword(id: string, password: string)
      • deleteAuthUserById(id: string)