stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

10h 12m 36s logged

Devlog #12: Architectural Cleanup

Dropbox and OneDrive providers are complete

I reused the same overall logic for the Google Drive provider to write code for the Dropbox and OneDrive providers. I’m using the .NET REST APIs for both to handle file chunking and uploads automatically.


Implement PKCE for all provider OAuth2 flows for better security

To enhance the security of the OAuth2 process from a local desktop app like mine, I’ve implemented the PKCE security extension for all providers, to prevent authorization code interception and injection.


Resolve Architectural Drift

Over the development of this app, I’ve been continually implementing new ideas and removing what hasn’t worked. Eventually, it got to a point where I had thousands of lines of redundant or mismatched code for the sync engine, redundant features laying in my scripts that were no longer planned or used, and many redundant properties for the database schemas as well. Overall I was losing track of my original vision and goals, and development was becoming increasingly slow and stressful.

To help me get out of this development rut, I turned to AI. Specifically, here was a portion of my prompt to Github Copilot:

Please do the following:
1. Analyze my code to figure out the current architecture
2. Identify: 
   a) areas of weakness
   b) inconsistencies
   c) what doesn't work, dead code, etc.
3. Ask me necessary questions needed to clear up any design (or for us to figure out the system architecture together)

Finally, only help me fix any issues in the code once we have a clear idea of everything (and I give you the go ahead).

Over the next day, I went over each of the identified errors or weaknesses one-by-one with the AI. It helped me pinpoint exactly the areas of my code that needed work, and I used it to successfully reintegrated the code with my original vision.

Note: I use ‘cloud’ to refer to a provider-account pair. For example, a Google Drive provider with a specific email is one cloud. A different cloud would be the same provider but a different email, or a different provider altogether.

Here’s a breakdown of what I did:

  1. Remove architectural drift, abandoned code, and unused features (e.g. GlobalIgnoreRules, automatic destination selection, FileSyncRecord and FolderSyncRecord)
  2. Implement a new-cloud bootstrap (when the user uploads stuff to a new cloud, perform a bootstrap operation to create all existing files and folders)
  3. Implement destructive cloud removal for when the user removes a cloud assignment
  4. Add pre-sync validation (reject missing local roots, reject invalid assignments)
  5. Make Watcher queuing reliable (detect unmonitored changes, etc.)
0
12

Comments 0

No comments yet. Be the first!