https://github.com/jvegar/ts-dropbox-folder-sync
Folder Sync app for Dropbox
https://github.com/jvegar/ts-dropbox-folder-sync
dropbox-api mongodb prisma-orm
Last synced: 11 months ago
JSON representation
Folder Sync app for Dropbox
- Host: GitHub
- URL: https://github.com/jvegar/ts-dropbox-folder-sync
- Owner: jvegar
- Created: 2024-03-14T21:09:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T07:19:42.000Z (almost 2 years ago)
- Last Synced: 2025-03-31T06:33:02.046Z (11 months ago)
- Topics: dropbox-api, mongodb, prisma-orm
- Language: TypeScript
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dropbox-folder-sync
Console app for syncing a local folder with a dropbox folder
## Steps to run app
1. Install packages
```
npm install
```
2. Create .env file from .env.local and replace the required values
```
cp .env.local .env
```
3. 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