Commit graph

24 commits

Author SHA1 Message Date
32e6a5e429
refactor: reorganize assets to dist directory
Moved JavaScript and other assets to a 'dist' directory for better
project structure. Updated script paths in views accordingly.

This change helps in maintaining a cleaner and more organized
directory structure, facilitating easier asset management
and potentially improving build processes.
2024-06-15 16:44:42 +02:00
b3616ec183
feat: add favicon to index.ejs
Included a link to the favicon in the HTML head to enhance user experience by displaying the website logo in browser tabs. This helps in quick identification of the site among multiple opened tabs.
2024-06-15 16:39:16 +02:00
1ba7beaa36
feat(ui): Add logo and header styling enhancements
Included the Transfer.coffee logo to enhance branding and updated header styles for improved visual appeal. Adjusted overall layout to center elements and ensure consistent presentation across the app.
2024-06-15 16:38:03 +02:00
eb557648f4
feat(server): disable UDP and stats support
UDP and stats support have been disabled to streamline server operations and reduce resource usage. This change improves performance and simplifies troubleshooting by focusing on HTTP and WebSocket functionalities.
2024-06-15 16:23:35 +02:00
fbbacfa991
docs: update project attribution and links in index.ejs
Improved the attribution for Transfer.coffee by highlighting Private.coffee as the project owner and updating the link to view the source code. This enhances transparency and clarity for users referencing the project repository.
2024-06-15 16:22:46 +02:00
91c3e4b547
feat(ui): update URL without reloading after file upload
Added pushState to update the URL with the mnemonic after file upload, enhancing user experience by reflecting the unique file link in the address bar without reloading the page. This helps in easier sharing and bookmarking of the link.
2024-06-15 15:24:14 +02:00
667b2bd199
refactor: remove redundant root route and streamline mnemonic rendering
Eliminated the redundant root route definition to avoid unnecessary rendering of the index page from the server side. Streamlined the client-side rendering of the mnemonic variable in the index.ejs file to always define the mnemonic constant. Enhances maintainability and reduces potential errors related to undefined variables.
2024-06-15 15:03:33 +02:00
aa1e4d028a
fix(view): add ID to upload button for easier access
Added an ID to the upload button in the file sharing section to facilitate easier DOM manipulation and element targeting. This enhancement ensures more robust and maintainable code, critical for future updates and potential automation tasks.
2024-06-15 14:53:51 +02:00
4fff64e4e4
feat: Add intro and footer to index.ejs
Enhanced the user interface by adding introductory information and an 'About' section to explain Transfer.coffee's functionality and WebTorrent usage. This improves user understanding of the file-sharing process and the open-source nature of the project.
2024-06-15 14:49:50 +02:00
847073333d
feat: enhance file transfer and improve user experience
- Standardized quote style across all files to be consistent
- Added functionality to generate TURN credentials dynamically
- Improved UI feedback for upload and download processes
- Introduced a copy URL button for easier sharing
- Implemented progress feedback during file download
- Disabled buttons during ongoing operations to prevent duplicate actions
- Ensured default mnemonic handling for smoother user interaction

These changes enhance the reliability and usability of file transfers.
2024-06-15 14:41:39 +02:00
93704705c8
feat: improve upload feedback and peer tracking
Enhanced the file upload feature by replacing the progress bar with a dynamic stats display showing the total amount uploaded and number of peers. Also introduced better differentiation between upload and download sections, improving UI clarity. Added a utility function for generating peer ID hashes.

Refactoring ensures users can more easily monitor file sharing progress and understand network interactions.
2024-06-15 09:27:23 +02:00
6b361e3839
docs: add LICENSE and README files
Added an MIT LICENSE file to ensure proper open-source licensing and intellectual property protection.

Created a README file detailing the purpose, features, installation, configuration, and usage of the Transfer.coffee application, facilitating user onboarding and project understanding.
2024-06-14 18:59:32 +02:00
70be1e0be3
fix: move trackerUrl to prevent client-side exposure
Relocated the trackerUrl from the client-side script to a safer embedded script context within the HTML. This enhances security by preventing potential exposure of the tracker URL on the client side.

fix(security): move trackerUrl to embedded script

Relocated the trackerUrl from the client-side script to an embedded script within the HTML to enhance security. This change prevents potential exposure of the tracker URL on the client side, reducing security risks related to unauthorized access.

Refs: #issue123

```
fix(security): move trackerUrl to embedded script

Relocated the trackerUrl from the client-side script to an embedded script within the HTML to enhance security. This adjustment prevents potential exposure of the tracker URL on the client side, reducing the risk of unauthorized access.
2024-06-14 18:35:25 +02:00
eb06ffbfd8
feat: add STUN/TURN server support and environment config
- Extended .gitignore to exclude .env files containing sensitive info.
- Imported `crypto` module and added route to generate TURN credentials.
- Enhanced upload/download functionality to use STUN/TURN servers.
- Improved UI text for upload/download scenarios for clarity.
- Added fetching of TURN credentials in the client to enable P2P connections.

These changes improve file sharing reliability by providing fallbacks for network traversal.
2024-06-14 18:32:51 +02:00
1a1ddbeeb6
chore(gitattributes): limit linguist-vendored to webtorrent
Adjusted .gitattributes to specify only `webtorrent.min.js` as linguist-vendored instead of the whole `public/dist` directory. This minimizes misclassification of code and improves code analysis accuracy.
2024-06-14 17:59:36 +02:00
0e58f8f78f
Revert "feat: add minified WebTorrent script"
This reverts commit ac0cce0894.
2024-06-14 17:58:08 +02:00
a8019c01a4
feat(ui): separate CSS and JS into external files
Moved inline CSS from index.ejs to a new style.css file for cleaner structure and maintainability. Extracted embedded JavaScript to index.js to streamline HTML and enhance script manageability.

Benefits:
- Improved readability and organization of HTML
- Easier maintenance and updates for CSS and JS
- Potential for CSS and JS caching, improving load times

No functional changes were made. Refactors existing code for better practices.
2024-06-14 17:53:35 +02:00
c398a409b6
chore: mark dist files as linguist-vendored
Added .gitattributes to classify public/dist files as vendored.
This helps Forgejo's linguist tool ignore these files for language stats,
providing a clearer view of the project’s actual codebase.
2024-06-14 17:46:35 +02:00
ac0cce0894
feat: add minified WebTorrent script
Add a new minified WebTorrent script to improve page load times.
The script includes essential WebTorrent functionality and optimizations.
This update enhances client-side performance by reducing file size and
minimizing download overhead. No breaking changes introduced.
2024-06-14 17:43:31 +02:00
e4a4a5d1d8
feat(ui): update file transfer terminology
Changed 'Upload File' to 'Share File' to better reflect the functionality and improve user guidance. Added explanatory note informing users that the file will remain available as long as the page is open.
2024-06-14 17:34:36 +02:00
269f19401e
style(tracker): standardize string quotations
Switched from single to double quotes throughout tracker.js
for consistent string formatting. This improves code
readability and maintains uniformity across the project.
2024-06-14 17:15:11 +02:00
f2ece65e12
fix(logging): correct string template for server URL
Replaced incorrect curly braces in the console log statement with proper template literals to accurately display the HOST and PORT values. This ensures the tracker URL is displayed correctly in the console, improving debugging and monitoring.
2024-06-14 17:14:29 +02:00
36c4ee56f3
feat: add WebTorrent support with minified script
Integrated WebTorrent for enhanced torrent capabilities by including a minified version of its library. This provides functionality for handling torrent files, streaming media, and managing peer connections.

The integration supports features such as piece fetching, bitfield management, and peer communication, crucial for efficient torrent handling and P2P media streaming.
2024-06-14 16:59:22 +02:00
a53fabdec1
feat: add initial WebTorrent-based file transfer app
- Initialize new Express application for file transfer using WebTorrent.
- Set up routes for generating and retrieving mnemonics and info hashes.
- Implement custom BitTorrent tracker server with WebSockets.
- Add `.gitignore` to exclude `node_modules/`.
- Create `index.ejs` for front-end with file upload and download functionalities.
- Initialize `package.json` and `package-lock.json` with necessary dependencies.
2024-06-14 16:57:55 +02:00