1. Introduction
aDrive Desktop tool is designed to seamlessly integrate with Asite Cloud, providing users with a powerful and intuitive way to manage their cloud files and folders locally. With aDrive Desktop, users can easily download and edit files stored on the Asite Cloud using the default file editor of their local machine. The application also offers robust two-way synchronization, ensuring that changes made locally are mirrored in the cloud, and vice versa, keeping files up to date and consistent across all devices.
The application aims to enhance the user experience by offering:
Effortless File Editing: Users can download files from Asite Cloud and open them in their local default editor for quick and easy editing.
Two-Way Sync: Any modifications made to files or synced folders, whether locally or in the cloud, are automatically synchronized between the local machine and Asite Cloud, providing a continuous and reliable workflow.
Cloud Integration: Direct access to files on Asite Cloud enables users to efficiently manage their cloud storage while working offline or online.
With its user-friendly interface and seamless cloud synchronization, aDrive Desktop ensures that users can focus on their tasks without worrying about manually updating files or managing cloud storage.
1.1. Key features
Below are the key features provided by the aDrive Desktop tool:
Support SSO login and 2FA Authentication :
aDrive Desktop supports Single Sign-On (SSO), allowing users to log in securely and seamlessly with their existing credentials from supported identity providers.
Additionally, it incorporates a Two-Factor Authentication (2FA) system, enhancing security by requiring an additional layer of verification during login, ensuring that user accounts are protected from unauthorized access.
Edit file locally :
The Edit File Locally feature allows users to download a file from the cloud and open it in their default editor.
When the file is edited, it gets checked out on the cloud, locking it for other users. If the user has enabled automatic sync, changes are automatically synced back to the cloud, and the file is unlocked for other users to edit.
If automatic sync is disabled or set to ask before syncing, the user is presented with two options: 'Upload-Finish' to sync the changes and unlock the file for others, or 'Upload-Continue' to sync the changes without unlocking the file, keeping it locked for others.
This ensures flexibility in file management while maintaining control over when changes are made available to other users.
Convert a template into a document :
The Convert Template into Document feature allows users to upload template files to the cloud.
Once uploaded, users can create new documents based on these templates.
After creating a document, they can begin using the Edit File Locally feature to download, edit, and sync the document with the cloud, enabling efficient document creation and collaboration.
File Upload with Custom Attributes
The Edit File Locally, Convert Document into a Template, and Auto Upload features all support file upload functionality, ensuring that files uploaded with custom attribute if the custom attribute upload is enabled on cloud folder. This ensures consistency in file metadata between the local and cloud environments during the upload process.
Offline Support :
The Offline Support feature allows users to continue making changes and performing activities on synced files and folders even when they are not logged in or when the internet is unavailable.
Once the user logs in and the internet connection is restored, all offline changes and activities are automatically synced with the cloud, ensuring data consistency and seamless synchronization.
Two way sync Feature :
Two way sync feature comes with two sub features : Cloud to Device and Devie To Cloud Synchronization.
o When a user enables two-way sync for any folder, all the files will get synced on both platforms (local & cloud ) , all activities within the synced folder—both in the local file system and on the cloud—are automatically synchronized. These activities include:
File uploads
New revision uploads for any file
Deactivating/reactivating file revisions
Deactivating/reactivating the entire document
Moving files between folders
Linking files between folders
Renaming folders
With two-way sync enabled, any changes made in the local folder or on the cloud are mirrored across both platforms, ensuring data consistency and up- to-date synchronization.
This feature enables seamless collaboration and efficient file management, as it keeps all files and folders in sync in real time, regardless of where the changes are made.
Under this feature we are also showing sync status icons on files and two way synced folders in local file system.
Efficient Upload Mechanism [ Device to cloud ] :
The Efficient Upload Mechanism feature enables users to copy and paste thousands of files into a two-way synced folder on their local file system, which are then automatically synced with the cloud.
During the upload process, users are shown a progress count of how many files have been uploaded and how many remain.
Additionally, users can pause and resume the upload process as needed.
If the internet connection is lost, or if the user logs out or exits the application, the upload will automatically resume once the connection is restored or the user returns, ensuring a seamless and uninterrupted syncing experience.
Efficient Auto-Download Feature (Cloud to Device) :
When a user enables two-way sync for any folder, there are two ways to sync the files.
Meta-Data Only (Default): Only the meta-data of cloud files is downloaded and displayed in the local file system, saving the user's storage space.
Full Content Download: All files in the cloud are downloaded, including their content. A progress notification is shown to the user, indicating how many files have been downloaded and how many remain.
The download process also supports resumability. Users can pause and resume the download manually, or if the user logs out or exits the app, the download will automatically resume once they log back in or the app is reopened.
This feature ensures efficient use of local storage and seamless file management.
Error Handling :
If an interruption occurs during the download or upload process of any file, the affected file will be displayed in the Error tab. This allows users to easily identify files with issues and retry the operation at a later time, ensuring smooth and uninterrupted file synchronization.
User Permissions for File Upload/Download
For all the above-mentioned features, we ensure that the user has the necessary permissions to upload or download files within a specific folder. Before performing any file operations, such as uploading, downloading, or syncing, the system verifies that the user has the appropriate access rights for the targeted folder, ensuring secure and authorized file management.
Rename folder for Two-way Sync folders :
If a user renames a two-way synced folder, either on the cloud or on their local device, the folder will automatically be renamed on both platforms, ensuring consistency across the cloud and local file system.
Users can select their preferred language on the cloud (web app), and that language setting will automatically be applied to the user interface of the desktop application. This feature ensures a consistent and localized experience across both platforms, allowing users to interact with the application in their chosen language for improved usability and comfort.
Users will receive notifications whenever there is an app update, whether it's for bug fixes or new features. The application differentiates between mandatory and non- mandatory updates, ensuring that critical updates are highlighted, while non-mandatory updates allow users to choose when to install them. This feature keeps users informed and ensures they stay up-to-date with the latest improvements and fixes.
1.2. Affected Areas
Local File System
Asite Cloud
1.3. Scope
The scope of this technical documentation includes the following:
Target Audience: The documentation is intended for developers, administrators, and technical support personnel who are responsible for integrating, managing, and troubleshooting the app.
Core Features:
File storage and management (upload, download).
Synchronization of files across devices and platforms.
User authentication and authorization mechanisms.
System Architecture:
Overview of the client-server architecture (backend, storage, and APIs).
Integration between the aDrive Desktop and cloud (adoddle).
APIs and Integrations:
Description of the core APIs for file management, synchronization, and sharing.
Integration details with different authentication systems (e.g., MFA, SSO).
Security:
Encryptionmechanismsfordataprotection.
2. Technology Stack
1. Front-End [ Renderer Process ]
Front-End represents the user interface of application, built using web technologies. It handles the interaction with the user, displaying content, and passing data to the backend.
Technologies:
HTML, SCSS, JavaScript, TypeScript for UI layout, styles, and logic.
Angular & Angular Material for building a structured, responsive UI using a component-based architecture.
Key Components:
User Interface (UI): Handles all front-end rendering and interactivity.
Angular Components: Used for managing different views (e.g., file listing, sync status, settings).
IPC Renderer: For communication with the backend (desktop app).
2. Backend [ Node.js Main Process ]
This is where the main logic of application resides, including file system management, real-time synchronization, and communication with external services.
Technologies:
Electron: Used to build the desktop app with a web front-end and native desktop capabilities (like window creation, native OS interactions, etc.).
FS Module (File System): Provides access to the file system for file operations (create, delete, read, write).
Chokidar: Watches for changes in the application’s source directory to detect events like file/folder changes, add, rename, or deletion.
rSync Algorithm: Used to create delta-match files to sync only the changed parts of a file, reducing the amount of data transferred.
Axios: For making HTTP requests to communicate with the web backend (i.e adoddle server ) or external APIs.
Clipboardy: Allows the app to copy file paths to the clipboard.
Electron-log: Handles logging for debugging and tracking application behavior.
WebSocket (WS): Facilitates real-time communication between the desktop app and other services (e.g., web app, server).
Crypto: Handles encryption and password management for user authentication and secure file storage.
Spark-md5: Generates hashes of files to detect changes or for integrity verification.
Sparse.node (C++ addon): Optimizes file space by creating sparse files, ensuring minimal physical disk usage.
Key Components:
File System Module: Manages file creation, deletion, and tracking changes.
Sync Engine: Uses the rSync algorithm to detect changes in files and create delta updates.
WebSocket Client: Listens for changes from the server and synchronizes the files.
Logging & Debugging: Handles all logging related to the application’s processes.
Crypto & Security: Responsible for securing passwords and verifying file integrity.
Database Management and Security
The application uses SQLite3 as its embedded relational database to store and manage data locally. To interact with the SQLite3 database, the application leverages the better- sqlite3 npm package, which provides a fast and synchronous interface for executing SQL queries.
To optimize performance, the database schema is designed with indexes and optimized queries to ensure fast data retrieval and efficient operations, even when handling large datasets.
For enhanced security, the database is encrypted using the SQLCipher algorithm. This ensures that all data stored in the SQLite database is securely encrypted, preventing unauthorized access and ensuring that sensitive information remains protected. The encryption process is transparent to the application, providing a seamless experience for users while maintaining strong data security.
Native Extensions (C# & DLLs)
For platform-specific functionality like context menus, sync status indicators, and other native OS interactions.
Technologies:
DynamicSubMenus.dll (C#): Adds context menu items and submenus within Windows Explorer, allowing the user to interact with files/folders directly.
ReadOnlyFileIconOverlayHandler.dll (C#): Adds sync status icons to files and folders in the file explorer using alternate data streams in Windows.
RegAsm (C#): A .NET tool used for registering or unregistering the DLLs after installation, enabling proper integration with the Windows OS.
.nsh script: Runs a batch file during installation and uninstallation to register/unregister the DLLs.
syncStatus.appex : It’s an finder extension built using swift language to show sync status icons inside MAC OS.
Key Components:
Windows Shell Integration: Registers context menu and sync status icons to interact with the system’s file explorer.
DLLs: Perform specific functions like adding context menus and displaying sync status.
Build and Packaging
This layer focuses on building, packaging, and signing the application for distribution across different platforms.Technologies:
Electron-builder: Used for packaging and distributing the Electron app for different platforms.
Win-verify-signature: Ensures that updates for the Windows platform are verified and secure.
Electron/notarize: Signs the app for the Darwin (macOS) platform, ensuring it meets Apple’s security requirements.
Digicert Smctl: Used for signing executable files for Windows.
Key Components:
App Packaging: Converts the app into a distributable format for Windows, macOS, and Linux.
Code Signing: Ensures the application is securely signed for distribution, preventing tampering.
Networking and Communication Layer
This layer handles real-time communication and ensures synchronization between different parts of the app.
Technologies:
WebSockets (WS): Used for real-time communication between the desktop application and the web app or backend. Enables features like instant file synchronization and status updates.
Key Components:
Real-time Sync: WebSocket communication for syncing files between desktop and web applications.
Installation and Setup Layer
Handles the installation process of your desktop application and ensures smooth setup on different platforms.
Technologies:
Electron-builder: For packaging the application for different OS platforms (Windows, macOS, and Linux).
.nsh Script: Used for running a batch file to register/unregister the native DLLs during installation and uninstallation.
Key Components:
Installer: Automates the installation of required components (e.g., DLLs, configuration files) and ensures that dependencies are correctly set up.
Uninstaller: Properly removes the application and any associated components from the system.
3. Proposed Solution
3.1 High-level Design Overview
Install aDrive Desktop
Below steps will get executed after install:
Run .nsh file.
Register aDrive Desktop’s default working directory into windows registry.
With this, we are creating shortcut virtual link in Windows to access aDrive Desktop’s default working directory.
Please refer to the screenshot below:
Login flow with 2-Factor Authentication and SSO
Download file using Edit File option :
Cloud to Device (Auto download and Meta-Data) Feature :
We have given preference to user while syncing whether to download all files with content or only meta-data only.
Auto Download Slot wise [ Full Content ] :
Create file version in aDrive Desktop by file edit in its native application (delta-match file creation)
Upload delta-match file version wise to cloud (web app) by clicking on Upload buttons
Auto Upload files from Device to Cloud by enable two-way sync against folder
Convert template into document.
Rename Folder from aDrive Desktop for Two-way sync folders
3.2 Server-Side Design
The server-side utilizes the same technologies as the CDE Web application, and aDrive Desktop will communicate with the server via APIs.
3.3 Client-Side Implementation
Screenshot
Login screen
SSO Login
SSO provider page
SSO approval page
2FA page
Access-unavailable screen :
Preference Screen
Welcome screen
Edit from Webapp
User has not installed or is not logged in
Tray icon menu
Download Notification to User
Change Notification
Edit Files list
Revision tab upload
Upload In Progress
Recent Upload tab
Unlock checked out File
Auto Update Notification
Auto Update Process
Auto Update Success
Mandatory Update Screen
Two Way sync feature
1) EnableSyncoption
2) Folder list window with tree-based structure
3) upload/download process
4) Upload/download process success
5) Error while syncing process
6) Error Tab
Template Feature
1) Available File Templates List in Webapp under Admin Tab.
2) Upload File as Template
3) Check User has Privilege of “Can Create Files from Document Templates” on Workspace.
4) Create File Option Available on Files Tab
5) When you edit file from web app it will get downloaded and opened in native editor you can edit it instantly or later, when you edit the template file below notification will be shown
6) Enter Template Name Screen
7) Template file is Open notification
8) Template file upload in progress
9) Template File Upload complete.
10) File Upload with custom attribute
File Association Screen
Auto Upload attribute fill notification :
Attribute Screen for auto-upload :
Rename Folder
1 ) When you rename any two way synced folder below notification screen will be shown with different messages.
4. REST API Endpoints
Login related api calls: -
Get SSO details - https://dmsak.asite.com/api/user/getSsoDetailsForUser"
2FA verification - /commonapi/aDrive/resetSecureKey
forgotpassword - “https://adoddleak.asite.com/commonapi/user/sendPasswordLink"
After login get some mandatory data calls: -
Get property values - “https://adoddleak.asite.com
/commonapi/aDrive/getPropertyValues”
CSRF Token generate - “https://adoddleak.asite.com/adoddlenavigatorapi/csrf/generateCSRFToken"
get language specific - “https://adoddleak.asite.com
/commonapi/language/getLanguageKeyValues”
Download file from cloud to device: -
special character file data - “https://adoddleak.asite.com
/adoddle/search?action_id=174”
file or folder permission check - “https://adoddleak.asite.com/adoddle/dashboard?action_id=207"
download single file – “https://downloadak.asite.com/download/document/single?revisionId=${#}&projectId=${#} &isLockedForEditing=true&dcId=${#}&t=${#}”
get latest file revision - “https://adoddleak.asite.com
/commonapi/document/getLatestFileRevision”
for project list - “https://adoddleak.asite.com/adoddle/home?action_id=5"
for file list - “https://adoddleak.asite.com/adoddle/listing"
Upload file from aDrive to Cloud: -
upload binary content of file - “https://adoddleak.asite.com/adoddle/adoddleUpload?action_id=1203"
get latest hash values - “https://adoddleak.asite.com/commonapi/dataObjectService/getParameterValues"
check folder permission to upload - “https://adoddleak.asite.com/commonapi/document/getDocumentPermission"
perform event validation - “https://adoddleak.asite.com/commonapi/event/uploadEventValidation"
check mandatory attributes applied on folder - “https://adoddleak.asite.com/adoddle/upload?action_id=137"
commit file after file binary upload success - “https://adoddleak.asite.com/adoddle/upload?action_id=184"
commit file if file size or total file count meets AKAMAI specified limit of file/s - “https://adoddleak.asite.com/adoddle/aDriveUpload?action_id=184"
status check of sync commit call which used ‘/aDriveUpload’ api - “https://adoddleak.asite.com/adoddle/upload?action_id=803"
checkout / undoCheckout file - “https://downloadak.asite.com/download/checkout/undoCheckout/"
Rename folder in cloud from aDrive Desktop (for Two-way-sync folders)
check folder name exists - “https://adoddleak.asite.com/commonapi/folder/checkForFolderNameExist"
edit folder Name - “https://adoddleak.asite.com/commonapi/folder/editFolderName"
Create folder in cloud -
get folder security data - “https://adoddleak.asite.com/commonapi/folder/getFolderSecurityData
create folder on cloud - “https://adoddleak.asite.com/commonapi/folder/createFolder
mark folder 2-way-sync on cloud - https://adoddleak.asite.com/commonapi/aDriveNotification/saveResource
5. Scalability
To ensure the application can handle future growth, we have planned for scalability in terms of increasing users, data volume, and transaction rates.
We have set performance targets such as managing thousands of file uploads and downloads concurrently.
To optimize server load and maintain performance, client-side throttling mechanisms have been implemented.
These changes limit the number of concurrent upload/download requests from clients, ensuring that the server is not overwhelmed during high traffic periods, thus enabling the system to scale efficiently while minimizing load on the server.
Additionally, we have optimized database queries to minimize execution time, even when working with large datasets containing over 300,000 rows.
This ensures efficient data handling and reduces latency, further enhancing the system's scalability to accommodate increasing data volume without compromising performance.
6. Performance
To enhance performance, we have implemented an incremental file upload strategy where only the changes made to a file are uploaded, rather than the entire file.
This significantly reduces the data transfer size and improves upload speeds, especially when dealing with large files, such as a 1GB file.
Additionally, most of the application code has been optimized for asynchronous execution, ensuring that the app remains responsive and does not enter a "not responding" state.
To further accelerate file transfers, we allow for the simultaneous upload and download of up to three files at a time, enabling thousands of files to be processed in a minimal amount of time.
7. Security
To enhance security, we have upgraded all technologies to their latest versions to eliminate known vulnerabilities.
The database is encrypted using the SQLCipher algorithm, and all sensitive information is stored in an encrypted format.
Additionally, we ensure that no sensitive data is logged in the application logs to prevent unauthorized access.
All API calls require a valid session ID, and the data is appended with a hash based on the session ID to ensure integrity and secure communication. Furthermore, we use both session IDs and CSRF tokens in all API calls where required, adding an extra layer of protection against cross-site request forgery attacks.
These measures collectively strengthen the overall security of the application.
8. Design Checklist
☒ Adhere to SOLID principles.
☐ Design should be towards microservice based Architecture.
☒ Re-use/extend existing modules instead of rewriting from scratch.
☐ Indexing (Runtime Indexing ADIH/Mismatch)
☐ Caching, Transaction Management, Logging
☒ Supporting feature for Adoddle Web/Navigator/Field/aMessage
☒ Multi DC Scenario
☐ Multiple Viewer (Brava, PDFTron, ActiveX, Hoops Communicator, Hoops 3DF)
☐ UI Guidance (Responsive UI)
☐ AWS, Archiving, Cloning/Inheritance
☒ Validation & Security Aspects (Hashing/Secure Cookie/Server-Side validation)
☒ Authentication/Session Timeout/Session Overridden.
☒ Integration with workflow
☒ Impact on Existing API users
Next Article: Domains and IP addresses used by aDrive Desktop