Skip to content
On this page

Overview

Technology stack

Backend

  • language and framework: rust + tauri
  • responsible for:
    • read / write file
    • decrypt / decrypt
  • Encryption Algorithm: chacha20poly1305

Frontend

  • language and framework: typescript + vue + vite
  • responsible for:
    • visual function
    • user data synchronization
    • note editor: editorjs
  • User interface

Encryption

Default encryption Algorithm is XChaCha20Poly1305. Because it saves memory when encrypting large files

Refer XChaCha20 Encryption vs AES-256: What’s the Difference?

Custom encryption

  • Modify the params of Encryption Algorithm

    • Modify the gen_key and gen_nonce function in src-tauri\src\utils\encrypt.rs
  • Change encryption Algorithm

    • Modify all the encrypt_xxx and decrypt_xxx function in src-tauri\src\utils\encrypt.rs

Naming methods

  • CSS class prefix:.enas, like: .enas-list
  • CSS varable prefix: --enas-, like: --enas-border-color
  • TS event prefix: on, like: onClickButton
  • TS struct name with a "Info" postfix, like: StructNameInfo
  • Editor attachments path prefix: attaches://, like: attaches://ebfa511124ae8a7b3f4f0252e846954d

Time about file and data:

  • ctimeUtc: create timestamp(UTC time)
  • dtimeUtc: delete timestamp(UTC time)
  • mtimeUtc: modify timestamp(UTC time)

File struct and inner data struct

Install from source code

Install tauri dependencies

Troubleshooting

window10 / 11

Install Microsoft Visual Studio C++ Build Tools

If get error in powsershell, run set-executionpolicy remotesigned.