Skip to content

jvegar/ts-dropbox-folder-sync

Repository files navigation

dropbox-folder-sync

Console app for syncing a local folder with a dropbox folder

Steps to run app

  1. Install packages
npm install
  1. Create .env file from .env.local and replace the required values
cp .env.local .env
  1. Run app:
npm run dev

Architecture

  • Source of Truth: Dropbox folder

  • Client:

    • Initialize:

      • If local folder is empty:

        • Download remote files to local
        • Regenerate local database (clean->populate)
      • Else:

        • Get remote files and iterate:

          • If file exists on local:
            • If local file is newer:
              • Leave local file intact
              • Update content remote file
              • If local file exists on local database:
                • Update local file metadata (modified)
              • Else:
                • Insert local metadata file Else:
              • Overwrite local file
              • If local file exists on local database:
              • Update local file metadata (modified)
              • Else: - Insert local metadata file Else:
            • Download remote file to local
        • Get local files and iterate:

          • If local file doesn't exist:
            • Upload local file to remote
            • If local file exists on local database:
              • Update local file metadata (modified)
            • Else:
              • Insert local metadata file
    • Online/Offline:

      • Update local database
      • Generate update remote folder task
        • Process task (Pending | Running | Error | Completed)
  • File:

    • ID: remote ID generated by DropBox
    • Path: file path
    • Modified: modified datetime
    • Created: created datetime
    • Status: file status

About

Folder Sync app for Dropbox

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published