You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -87,8 +87,8 @@ DropSilk is built on a few key architectural principles to ensure performance, p
87
87
88
88
1.**WebRTC for Peer-to-Peer Communication:** Instead of a traditional client-server upload/download model, DropSilk uses WebRTC. This creates a direct, encrypted connection between the two users' browsers. This means files never touch our server, dramatically enhancing privacy and speed, especially on a local network.
89
89
2.**Decoupled Signaling:** A lightweight WebSocket server acts as a "rendezvous" point. Its only job is to help two peers find each other and exchange the metadata needed to establish the direct WebRTC connection. Once the connection is made, the signaling server is no longer involved in the transfer itself.
90
-
3.**Non-Blocking File Processing with Web Workers:** Reading large files on the main browser thread can freeze the UI. DropSilk delegates all file reading and chunking to a dedicated Web Worker. The main thread simply sends the file object to the worker and receives ready-to-send chunks, ensuring the interface remains fluid and responsive at all times.
91
-
4.**OPFS for Stability (Safe Mode):** Browsers have memory limits. Attempting to buffer a multi-gigabyte file in RAM can cause the tab to crash. The "Safe Mode" feature leverages the **Origin Private File System (OPFS)** to stream incoming file chunks directly to disk instead of memory, making the application robust enough to handle massive files.
90
+
3.**Non-Blocking File Processing with Web Workers:** Reading large files on the main browser thread can freeze the UI. DropSilk delegates all file reading and chunking to a dedicated Web Worker. The main thread simply sends the file object to the worker and receives ready-to-send chunks, ensuring the interface remains fluid and responsive at all times. This logic is cleanly separated into dedicated modules like `fileSender.js` and `queueManager.js` for improved maintainability.
91
+
4.**OPFS for Stability (Safe Mode):** Browsers have memory limits. Attempting to buffer a multi-gigabyte file in RAM can cause the tab to crash. The "Safe Mode" feature leverages the **Origin Private File System (OPFS)** to stream incoming file chunks directly to disk instead of memory, making the application robust enough to handle massive files. This is managed by a dedicated `opfsHandler.js` module, which keeps the main receiving logic simple and focused on orchestration.
92
92
5.**Performance-First UI Rendering:** The application is engineered to feel fast, not just transfer files fast. Hidden UI elements with infinite animations (like loading spinners) are paused to prevent background CPU usage. All browser resources are hence dedicated to the user's current interaction for a smooth, lag-free experience.
93
93
94
94
### Project Structure
@@ -112,6 +112,7 @@ The following is a list of most of the important files and folders.
112
112
<summary>scripts/</summary>
113
113
<ul>
114
114
<li>update-locales.js</li>
115
+
<li>generate-version.js</li>
115
116
</ul>
116
117
</details>
117
118
</li>
@@ -178,6 +179,19 @@ The following is a list of most of the important files and folders.
178
179
<details>
179
180
<summary>js/</summary>
180
181
<ul>
182
+
<li>
183
+
<details>
184
+
<summary>features/</summary>
185
+
<ul>
186
+
<li>chat/</li>
187
+
<li>contact/</li>
188
+
<li>invite/</li>
189
+
<li>settings/</li>
190
+
<li>theme/</li>
191
+
<li>zip/</li>
192
+
</ul>
193
+
</details>
194
+
</li>
181
195
<li>
182
196
<details>
183
197
<summary>network/</summary>
@@ -201,7 +215,13 @@ The following is a list of most of the important files and folders.
201
215
<details>
202
216
<summary>transfer/</summary>
203
217
<ul>
218
+
<li>etrCalculator.js</li>
204
219
<li>fileHandler.js</li>
220
+
<li>fileReceiver.js</li>
221
+
<li>fileSender.js</li>
222
+
<li>opfsHandler.js</li>
223
+
<li>queueManager.js</li>
224
+
<li>transferUI.js</li>
205
225
<li>zipHandler.js</li>
206
226
</ul>
207
227
</details>
@@ -211,10 +231,12 @@ The following is a list of most of the important files and folders.
211
231
<summary>ui/</summary>
212
232
<ul>
213
233
<li>dom.js</li>
234
+
<li>drawer.js</li>
214
235
<li>effects.js</li>
215
236
<li>events.js</li>
216
237
<li>modals.js</li>
217
238
<li>onboarding.js</li>
239
+
<li>streaming.js</li>
218
240
<li>view.js</li>
219
241
</ul>
220
242
</details>
@@ -225,6 +247,7 @@ The following is a list of most of the important files and folders.
225
247
<ul>
226
248
<li>audioManager.js</li>
227
249
<li>helpers.js</li>
250
+
<li>security.js</li>
228
251
<li>toast.js</li>
229
252
<li>uploadHelper.js</li>
230
253
</ul>
@@ -234,6 +257,7 @@ The following is a list of most of the important files and folders.
234
257
<li>config.js</li>
235
258
<li>i18n.js</li>
236
259
<li>state.js</li>
260
+
<li>version.gen.js</li>
237
261
</ul>
238
262
</details>
239
263
</li>
@@ -262,6 +286,7 @@ The following is a list of most of the important files and folders.
262
286
<li>audio.css</li>
263
287
<li>boarding.css</li>
264
288
<li>buttons.css</li>
289
+
<li>chat.css</li>
265
290
<li>connections.css</li>
266
291
<li>dashboard.css</li>
267
292
<li>docx.css</li>
@@ -303,6 +328,22 @@ The following is a list of most of the important files and folders.
303
328
</ul>
304
329
</details>
305
330
</li>
331
+
<li>
332
+
<details>
333
+
<summary>locales/</summary>
334
+
<ul>
335
+
<li>en.json</li>
336
+
<li>es.json</li>
337
+
<li>fr.json</li>
338
+
<li>it.json</li>
339
+
<li>ja.json</li>
340
+
<li>ms.json</li>
341
+
<li>pt.json</li>
342
+
<li>sw.json</li>
343
+
<li>zh.json</li>
344
+
</ul>
345
+
</details>
346
+
</li>
306
347
</ul>
307
348
</details>
308
349
</li>
@@ -370,17 +411,17 @@ Open your browser and navigate to `http://localhost:5173` (or the address provid
370
411
When the user clicks “View Email” in the Contact modal, the app renders a reCAPTCHA challenge and, on success, exchanges the token with the backend to retrieve the email address.
371
412
372
413
- Env vars:
373
-
- `VITE_RECAPTCHA_SITE_KEY` must be set at build time (Vite only injects `VITE_*` variables).
374
-
- `VITE_API_BASE_URL` must be a full URL (include `http://` or `https://`).
414
+
- `VITE_RECAPTCHA_SITE_KEY` must be set at build time (Vite only injects `VITE_*` variables).
415
+
- `VITE_API_BASE_URL` must be a full URL (include `http://` or `https://`).
0 commit comments